Commit e86e844f authored by unknown's avatar unknown
Browse files

Check for NULLs only if we don't replace column results,

get real results after all checks.
(see bug #14254: func_crypt.test fails on FreeBSD with --ps-protocol).


client/mysqltest.c:
  Check for NULLs only if we don't replace column results,
  get real results after all checks.
parent a006453f
Loading
Loading
Loading
Loading
+9 −4
Original line number Diff line number Diff line
@@ -3272,19 +3272,24 @@ static int run_query_stmt(MYSQL *mysql, struct st_query *q, int flags)
        /* Read result from each column */
        for (col_idx= 0; col_idx < num_fields; col_idx++)
        {
          /* FIXME is string terminated? */
          const char *val= (const char *)bind[col_idx].buffer;
          ulonglong len= *bind[col_idx].length;
          const char *val;
          ulonglong len;
          if (col_idx < max_replace_column && replace_column[col_idx])
          {
            val= replace_column[col_idx];
            len= strlen(val);
          }
          if (*bind[col_idx].is_null)
          else if (*bind[col_idx].is_null)
          {
            val= "NULL";
            len= 4;
          }
          else
          {
            /* FIXME is string terminated? */
            val= (const char *) bind[col_idx].buffer;
            len= *bind[col_idx].length;
          }
          if (!display_result_vertically)
          {
            if (col_idx)                      /* No tab before first col */