summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorhf@deer.(none) <>2004-08-19 15:36:05 +0500
committerhf@deer.(none) <>2004-08-19 15:36:05 +0500
commit0ce4b28b5ed848a9e6ee419f91f2bf5d40e98417 (patch)
treeb98c20512095d00b35003e248dbcedc4350ac173 /libmysqld
parent50183677ccbca1692e9524d077cc749034b18209 (diff)
downloadmariadb-git-0ce4b28b5ed848a9e6ee419f91f2bf5d40e98417.tar.gz
addition to fixes about #4700, 4701
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 5ecea557361..51a723d225a 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -108,6 +108,12 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
if (!skip_check)
result= thd->net.last_errno ? -1 : 0;
+ /*
+ If mysql->field_count is set it means the parsing of the query was OK
+ and metadata was returned (see Protocol::send_fields).
+ In this case we postpone the error to be returned in mysql_stmt_store_result
+ (see emb_read_rows) to behave just as standalone server.
+ */
if (!mysql->field_count)
embedded_get_error(mysql);
mysql->server_status= thd->server_status;