Bug #13231 mysqltest: fails to dectect when mysql_next_result fails
Submitted: 15 Sep 2005 18:22 Modified: 12 Oct 2005 11:26
Reporter: Magnus Blaudd
Status: Closed
Category:Client Severity:S2 (Serious)
Version:mysql-5.0.13 OS:Any (all)
Assigned to: Magnus Blaudd Target Version:

[15 Sep 2005 18:22] Magnus Blaudd
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 15:12] Magnus Blaudd
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 15: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 12: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 16: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 16: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 10: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 12:00] Magnus Blaudd
Pushed to 5.0.15
[3 Oct 2005 18:36] Magnus Blaudd
Pushed to 5.1.2
[12 Oct 2005 11:26] Magnus Blaudd
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