diff options
author | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-11-29 10:37:07 +0400 |
---|---|---|
committer | unknown <holyfoot/hf@mysql.com/hfmain.(none)> | 2007-11-29 10:37:07 +0400 |
commit | 084c93b51c3714a4e3317fa15cf7574a9b0c5b9a (patch) | |
tree | b0f05c1acbd1c013909f5181efe38c765e9ee4db /libmysqld | |
parent | 56973f1bd049aef816aaebf5dc3b21a49471f4b5 (diff) | |
download | mariadb-git-084c93b51c3714a4e3317fa15cf7574a9b0c5b9a.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 'libmysqld')
-rw-r--r-- | libmysqld/lib_sql.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc index 7ac663480c8..ce692169a5f 100644 --- a/libmysqld/lib_sql.cc +++ b/libmysqld/lib_sql.cc @@ -73,6 +73,7 @@ void embedded_get_error(MYSQL *mysql, MYSQL_DATA *data) net->last_errno= ei->last_errno; strmake(net->last_error, ei->info, sizeof(net->last_error)); memcpy(net->sqlstate, ei->sqlstate, sizeof(net->sqlstate)); + mysql->server_status= ei->server_status; my_free((gptr) data, MYF(0)); } @@ -1027,6 +1028,7 @@ void net_send_error_packet(THD *thd, uint sql_errno, const char *err) ei->last_errno= sql_errno; strmake(ei->info, err, sizeof(ei->info)-1); strmov(ei->sqlstate, mysql_errno_to_sqlstate(sql_errno)); + ei->server_status= thd->server_status; thd->cur_data= 0; } |