summaryrefslogtreecommitdiff
path: root/client/mysqltest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'client/mysqltest.cc')
-rw-r--r--client/mysqltest.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 0f052397d4f..a873618bf55 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -8324,6 +8324,7 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
goto end;
}
+ int err;
do
{
/*
@@ -8357,8 +8358,6 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
goto end;
}
- /* If we got here the statement was both executed and read successfully */
- handle_no_error(command);
if (!disable_result_log)
{
/*
@@ -8436,8 +8435,14 @@ void run_query_stmt(struct st_connection *cn, struct st_command *command,
}
}
}
- } while ( !mysql_stmt_next_result(stmt));
+ } while ( !(err= mysql_stmt_next_result(stmt)));
+ if (err > 0)
+ /* We got an error from mysql_next_result, maybe expected */
+ handle_error(command, mysql_errno(mysql), mysql_error(mysql),
+ mysql_sqlstate(mysql), ds);
+ else
+ handle_no_error(command);
end:
if (!disable_warnings)
{