Commit 05261f97 authored by Philip Stoev's avatar Philip Stoev Committed by Daniele Sciascia

Galera MTR Tests: Modify mysqltest so that if a --let = `SELECT ...` query is...

Galera MTR Tests: Modify mysqltest so that if a --let = `SELECT ...` query is interrupted, the test does not fail but the error is communicated to caller
parent 8ef727b3
...@@ -2678,7 +2678,7 @@ void var_query_set(VAR *var, const char *query, const char** query_end) ...@@ -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); init_dynamic_string(&ds_query, 0, (end - query) + 32, 256);
do_eval(&ds_query, query, end, FALSE); 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), handle_error(curr_command, mysql_errno(mysql), mysql_error(mysql),
mysql_sqlstate(mysql), &ds_res); mysql_sqlstate(mysql), &ds_res);
...@@ -2688,13 +2688,6 @@ void var_query_set(VAR *var, const char *query, const char** query_end) ...@@ -2688,13 +2688,6 @@ void var_query_set(VAR *var, const char *query, const char** query_end)
DBUG_VOID_RETURN; 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); dynstr_free(&ds_query);
if ((row= mysql_fetch_row(res)) && row[0]) if ((row= mysql_fetch_row(res)) && row[0])
......
...@@ -39,7 +39,7 @@ let $wait_timeout= 0; ...@@ -39,7 +39,7 @@ let $wait_timeout= 0;
let $wait_condition_reps= 0; let $wait_condition_reps= 0;
while ($wait_counter) 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`; let $success= `$wait_condition`;
inc $wait_condition_reps; inc $wait_condition_reps;
if ($success) if ($success)
......
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