summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorholyfoot/hf@mysql.com/hfmain.(none) <>2007-11-29 10:37:07 +0400
committerholyfoot/hf@mysql.com/hfmain.(none) <>2007-11-29 10:37:07 +0400
commit9786ccd0a06dfd10f662a88cdff43eed763af92c (patch)
treeb0f05c1acbd1c013909f5181efe38c765e9ee4db /libmysqld
parent8c3d5135baeba8a418ded32a649ae6ca3f75be3e (diff)
downloadmariadb-git-9786ccd0a06dfd10f662a88cdff43eed763af92c.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.
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc2
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;
}