Commit 3c59ba32 authored by Guilhem Bichot's avatar Guilhem Bichot

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.
parent b0fcbc84
...@@ -6859,14 +6859,6 @@ end: ...@@ -6859,14 +6859,6 @@ end:
dynstr_free(&ds_execute_warnings); 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 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 to the server into the mysqltest builtin variable $mysql_errno. This
...@@ -6875,6 +6867,13 @@ end: ...@@ -6875,6 +6867,13 @@ end:
var_set_errno(mysql_stmt_errno(stmt)); 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; DBUG_VOID_RETURN;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment