summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
authorunknown <kostja@bodhi.(none)>2007-12-13 23:58:55 +0300
committerunknown <kostja@bodhi.(none)>2007-12-13 23:58:55 +0300
commit37a2c4590a7453d5c8e5b67c2f512162323ac738 (patch)
tree5b1e35ecfb3c06d25e3fab02b488f661e7c476d0 /libmysqld/lib_sql.cc
parenta3a0d4359fef580a30704797ceeed613600deedc (diff)
downloadmariadb-git-37a2c4590a7453d5c8e5b67c2f512162323ac738.tar.gz
Fix broken embedded build (broken by the patch for Bug#12713, first part).
client/mysqltest.c: Remove a call to my_message() (server call) in case of a client error. It asserts in the embedded build now, since is called after send_ok(). libmysqld/emb_qcache.cc: Use net_send_eof (embedded implementation) in embedded query cache/ send result to client, since send_eof currently does not send anything. libmysqld/emb_qcache.h: Declare net_send_eof. libmysqld/lib_sql.cc: Fix the main loop of the embedded server to use the new Diagnostics_area API. sql/log.cc: Silence errors of open_performance_schema_table. This function is called for general logging, and it happens after the error has been sent to the client, and thus triggers an assert. storage/myisam/ha_myisam.cc: Remove an old hack that broke repair.test in embedded build: unless we clear an error here, the server attempts to send OK after ERROR. This currently asserts.
Diffstat (limited to 'libmysqld/lib_sql.cc')
-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 df6d68c7582..f13129cc52d 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -87,6 +87,7 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
/* Clear result variables */
thd->clear_error();
+ thd->main_da.reset_diagnostics_area();
mysql->affected_rows= ~(my_ulonglong) 0;
mysql->field_count= 0;
net_clear_error(net);
@@ -625,6 +626,7 @@ int check_embedded_connection(MYSQL *mysql, const char *db)
strmake(sctx->priv_host, (char*) my_localhost, MAX_HOSTNAME-1);
sctx->priv_user= sctx->user= my_strdup(mysql->user, MYF(0));
result= check_user(thd, COM_CONNECT, NULL, 0, db, true);
+ net_end_statement(thd);
emb_read_query_result(mysql);
return result;
}