summaryrefslogtreecommitdiff
path: root/libmysqld
diff options
context:
space:
mode:
authorunknown <hf@deer.(none)>2004-08-23 13:20:34 +0500
committerunknown <hf@deer.(none)>2004-08-23 13:20:34 +0500
commit2c82ee2f643c47335cadcd90c1bffaa91dfc943c (patch)
tree0c17fad2026edcf4dd50b1b79fa8bd580b57280e /libmysqld
parent83e3d3f9a3ab6888292b8bcb15e0f77f00249289 (diff)
downloadmariadb-git-2c82ee2f643c47335cadcd90c1bffaa91dfc943c.tar.gz
Fix for bug #5066(Wrong result after subselect with an error)
In this case we have to clear thd->data after errorneous query. So i just move thd->data cleanup to emb_advanced_command libmysqld/lib_sql.cc: Cleaning thd->data moved to emb_advanced_command
Diffstat (limited to 'libmysqld')
-rw-r--r--libmysqld/lib_sql.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index f4a53343e45..8092d87b97c 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -72,6 +72,11 @@ emb_advanced_command(MYSQL *mysql, enum enum_server_command command,
THD *thd=(THD *) mysql->thd;
NET *net= &mysql->net;
+ if (thd->data)
+ {
+ free_rows(thd->data);
+ thd->data= 0;
+ }
/* Check that we are calling the client functions in right order */
if (mysql->status != MYSQL_STATUS_READY)
{
@@ -217,11 +222,6 @@ static int emb_stmt_execute(MYSQL_STMT *stmt)
THD *thd= (THD*)stmt->mysql->thd;
thd->client_param_count= stmt->param_count;
thd->client_params= stmt->params;
- if (thd->data)
- {
- free_rows(thd->data);
- thd->data= 0;
- }
if (emb_advanced_command(stmt->mysql, COM_EXECUTE,0,0,
(const char*)&stmt->stmt_id,sizeof(stmt->stmt_id),
1) ||