summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-11-29 10:37:07 +0400
committerunknown <holyfoot/hf@mysql.com/hfmain.(none)>2007-11-29 10:37:07 +0400
commit1d062682f5098ea5c30b9b3fef844195790a095e (patch)
treeb0f05c1acbd1c013909f5181efe38c765e9ee4db /sql/protocol.cc
parent63b65169534c97f0c225859d2d6d49f3cee2bc10 (diff)
downloadmariadb-git-1d062682f5098ea5c30b9b3fef844195790a095e.tar.gz
Bug #32624 Error with multi queries in MySQL embedded server 5.1.22.
server status wasn't properly sent to the client after the error by the embedded server. Wasn't noticed before as one usually stopped retrieving results after he gets an error. libmysqld/lib_sql.cc: Bug #32624 Error with multi queries in MySQL embedded server 5.1.22. server status transferred to the client after errors sql/protocol.cc: Bug #32624 Error with multi queries in MySQL embedded server 5.1.22. set server status before net_send_error_packet() call as this function sends it to the client in the embedded server tests/mysql_client_test.c: Bug #32624 Error with multi queries in MySQL embedded server 5.1.22. testcase added
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 2bdbe83eea1..ac562a9f5ab 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -110,13 +110,14 @@ void net_send_error(THD *thd, uint sql_errno, const char *err)
push_warning(thd, MYSQL_ERROR::WARN_LEVEL_ERROR, sql_errno, err);
}
+ /* Abort multi-result sets */
+ thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
+
net_send_error_packet(thd, sql_errno, err);
thd->is_fatal_error=0; // Error message is given
thd->net.report_error= 0;
- /* Abort multi-result sets */
- thd->server_status&= ~SERVER_MORE_RESULTS_EXISTS;
DBUG_VOID_RETURN;
}