summaryrefslogtreecommitdiff
path: root/client/mysqltest.c
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.blaudden>2007-02-28 09:10:38 +0100
committerunknown <msvensson@pilot.blaudden>2007-02-28 09:10:38 +0100
commitd59d5f18c43e3165a1cdb56870702e7202a0a2b0 (patch)
tree04ff8aa721f82d5709e0b2a83817ead51d769dcf /client/mysqltest.c
parent4ff5ff2c0ba91941f0fb313bc48962d1ea2cb143 (diff)
downloadmariadb-git-d59d5f18c43e3165a1cdb56870702e7202a0a2b0.tar.gz
Bug#19410 Test 'kill' fails on Windows + SCO
- Use "mysql_stmt_field_count" to determine if there is a need to call "mysql_stmt_store_result" client/mysqltest.c: Only call 'mysql_stmt_store_result' if 'mysql_stmt_field_count' is greater than 0 indicating that this query has a result set. This change is mainly since if mysql_stmt_store_result fails the value returned by mysql_stmt_field_count will be reset.
Diffstat (limited to 'client/mysqltest.c')
-rw-r--r--client/mysqltest.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/client/mysqltest.c b/client/mysqltest.c
index 99462d82f40..4a89299e836 100644
--- a/client/mysqltest.c
+++ b/client/mysqltest.c
@@ -5048,8 +5048,9 @@ void run_query_stmt(MYSQL *mysql, struct st_command *command,
/*
If we got here the statement succeeded and was expected to do so,
get data. Note that this can still give errors found during execution!
+ Store the result of the query if if will return any fields
*/
- if (mysql_stmt_store_result(stmt))
+ if (mysql_stmt_field_count(stmt) && mysql_stmt_store_result(stmt))
{
handle_error(command, mysql_stmt_errno(stmt),
mysql_stmt_error(stmt), mysql_stmt_sqlstate(stmt), ds);