summaryrefslogtreecommitdiff
path: root/libmysqld/lib_sql.cc
diff options
context:
space:
mode:
authorholyfoot/hf@hfmain.(none) <>2007-12-07 10:10:02 +0400
committerholyfoot/hf@hfmain.(none) <>2007-12-07 10:10:02 +0400
commit901dc028f924a42f39c227802fea1fa732db8627 (patch)
tree9289f46a5ebd5f614a4e6156e05f12b89f4c2ef6 /libmysqld/lib_sql.cc
parentd349effe1111a1afa4eb868ca2feed1ad6af3622 (diff)
parentd26de7bee08c75618ebe12c85c1cffb1cd10c935 (diff)
downloadmariadb-git-901dc028f924a42f39c227802fea1fa732db8627.tar.gz
Merge bk@192.168.21.1:mysql-5.1-opt
into mysql.com:/home/hf/work/26921/my51-26921
Diffstat (limited to 'libmysqld/lib_sql.cc')
-rw-r--r--libmysqld/lib_sql.cc8
1 files changed, 5 insertions, 3 deletions
diff --git a/libmysqld/lib_sql.cc b/libmysqld/lib_sql.cc
index 28f6d8d354f..2c4f49050b2 100644
--- a/libmysqld/lib_sql.cc
+++ b/libmysqld/lib_sql.cc
@@ -243,9 +243,11 @@ static my_bool emb_read_query_result(MYSQL *mysql)
mysql->warning_count= res->embedded_info->warning_count;
mysql->server_status= res->embedded_info->server_status;
mysql->field_count= res->fields;
- mysql->fields= res->embedded_info->fields_list;
- mysql->affected_rows= res->embedded_info->affected_rows;
- mysql->insert_id= res->embedded_info->insert_id;
+ if (!(mysql->fields= res->embedded_info->fields_list))
+ {
+ mysql->affected_rows= res->embedded_info->affected_rows;
+ mysql->insert_id= res->embedded_info->insert_id;
+ }
net_clear_error(&mysql->net);
mysql->info= 0;