Skip to content

Commit

Permalink
Galera MTR Tests: Modify mysqltest so that if a --let = SELECT ...
Browse files Browse the repository at this point in the history
…query is interrupted, the test does not fail but the error is communicated to caller
  • Loading branch information
philip-galera authored and sciascid committed Mar 12, 2018
1 parent 8ef727b commit 05261f9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
9 changes: 1 addition & 8 deletions client/mysqltest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2678,7 +2678,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
init_dynamic_string(&ds_query, 0, (end - query) + 32, 256);
do_eval(&ds_query, query, end, FALSE);

if (mysql_real_query(mysql, ds_query.str, ds_query.length))
if (mysql_real_query(mysql, ds_query.str, ds_query.length) || !(res= mysql_store_result(mysql)))
{
handle_error(curr_command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), &ds_res);
Expand All @@ -2688,13 +2688,6 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
DBUG_VOID_RETURN;
}

if (!(res= mysql_store_result(mysql)))
{
report_or_die("Query '%s' didn't return a result set", ds_query.str);
dynstr_free(&ds_query);
eval_expr(var, "", 0);
DBUG_VOID_RETURN;
}
dynstr_free(&ds_query);

if ((row= mysql_fetch_row(res)) && row[0])
Expand Down
2 changes: 1 addition & 1 deletion mysql-test/include/wait_condition.inc
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ let $wait_timeout= 0;
let $wait_condition_reps= 0;
while ($wait_counter)
{
--error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR
--error 0,ER_NO_SUCH_TABLE,ER_LOCK_WAIT_TIMEOUT,ER_UNKNOWN_COM_ERROR,ER_LOCK_DEADLOCK
let $success= `$wait_condition`;
inc $wait_condition_reps;
if ($success)
Expand Down

0 comments on commit 05261f9

Please sign in to comment.