diff options
author | Guilhem Bichot <guilhem@mysql.com> | 2009-03-16 11:09:22 +0100 |
---|---|---|
committer | Guilhem Bichot <guilhem@mysql.com> | 2009-03-16 11:09:22 +0100 |
commit | 3c59ba32ab9cca29e01bd8dd2130af83ead8bde0 (patch) | |
tree | 16d076eeca94c62c67e555f64ed74384a8877297 | |
parent | b0fcbc84ef609b1147c3624e90fe3dac66ef8c1d (diff) | |
download | mariadb-git-3c59ba32ab9cca29e01bd8dd2130af83ead8bde0.tar.gz |
Fix for BUG#43001 ""maria.maria-no-logging fails sporadically on valgrind in PS mode"
mysqltest was reading free-ed memory, which fooled the test's reconnection detection.
client/mysqltest.cc:
Fix for BUG#43001 ""maria.maria-no-logging fails sporadically on valgrind in PS mode"
mysqltest was closing (=>free()ing) the "stmt" object before reading stmt->last_errno
(and storing that into $mysql_errno). As wait_until_connected_again.inc tests the value
of $mysql_errno to know if reconnection has been accomplished, it was fooled.
-rw-r--r-- | client/mysqltest.cc | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc index aaed61ea827..9093dd80f7e 100644 --- a/client/mysqltest.cc +++ b/client/mysqltest.cc @@ -6859,14 +6859,6 @@ end: dynstr_free(&ds_execute_warnings); } - - /* Close the statement if - no reconnect, need new prepare */ - if (mysql->reconnect) - { - mysql_stmt_close(stmt); - cur_con->stmt= NULL; - } - /* We save the return code (mysql_stmt_errno(stmt)) from the last call sent to the server into the mysqltest builtin variable $mysql_errno. This @@ -6875,6 +6867,13 @@ end: var_set_errno(mysql_stmt_errno(stmt)); + /* Close the statement if reconnect, need new prepare */ + if (mysql->reconnect) + { + mysql_stmt_close(stmt); + cur_con->stmt= NULL; + } + DBUG_VOID_RETURN; } |