Bug #13231 mysqltest: fails to dectect when mysql_next_result fails
Submitted: 15 Sep 2005 16:22 Modified: 12 Oct 2005 9:26
Reporter: Magnus Blåudd Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S2 (Serious)
Version:mysql-5.0.13 OS:Any (all)
Assigned to: Magnus Blåudd CPU Architecture:Any

[15 Sep 2005 16:22] Magnus Blåudd
Description:
In function run_query_normal in mysqltest.c there is a call to mysql_error(mysql). This should be a die call instead.

mysqltest.c:3153
  } while (!(err= mysql_next_result(mysql)));
  if (err >= 1)
    mysql_error(mysql);

This should be changed to
  } while (!(err= mysql_next_result(mysql)));
  if (err >= 1)
    die("fetch of result for query '%s' failed: %d: %s", query,
        mysql_errno(mysql), mysql_error(mysql));

The same goes for run_query_stmt.

This has the effect that for example the test case for bug#6897 passes.

Other side effects can be expected. This was detected when debugging a problem that was expected to be  yassl related.

How to repeat:
Do the above change and run mysql-tets-run --do-test=query_cache
[21 Sep 2005 13:12] Magnus Blåudd
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30151
[21 Sep 2005 13:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30154
[23 Sep 2005 10:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30259
[27 Sep 2005 14:01] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30379
[28 Sep 2005 14:45] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30446
[29 Sep 2005 8:26] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/30491
[3 Oct 2005 10:00] Magnus Blåudd
Pushed to 5.0.15
[3 Oct 2005 16:36] Magnus Blåudd
Pushed to 5.1.2
[12 Oct 2005 9:26] Magnus Blåudd
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html