summaryrefslogtreecommitdiff
path: root/sql-common
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2006-11-29 22:54:11 +0200
committerunknown <monty@narttu.mysql.fi>2006-11-29 22:54:11 +0200
commit6bcbd7df1e3402fbc8b6730868115a2bb253f7a7 (patch)
tree18b0302fbd603b8209b054283333eefadcc91613 /sql-common
parent8f71610f9cd13fafdfd764da5554532b2624e215 (diff)
parentee1c5226b9758648c1b699e4a0ebe9c1d3f4bf30 (diff)
downloadmariadb-git-6bcbd7df1e3402fbc8b6730868115a2bb253f7a7.tar.gz
Merge bk-internal.mysql.com:/home/bk/mysql-5.1
into mysql.com:/home/my/mysql-5.1 Makefile.am: Auto merged configure.in: Auto merged sql/field.h: Auto merged sql-common/client.c: Auto merged sql/sql_parse.cc: Auto merged sql/table.h: Auto merged
Diffstat (limited to 'sql-common')
-rw-r--r--sql-common/client.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/sql-common/client.c b/sql-common/client.c
index 7d6f7024727..9714e28be83 100644
--- a/sql-common/client.c
+++ b/sql-common/client.c
@@ -682,7 +682,13 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
mysql->net.report_error=0;
mysql->info=0;
mysql->affected_rows= ~(my_ulonglong) 0;
- net_clear(&mysql->net); /* Clear receive buffer */
+ /*
+ We don't want to clear the protocol buffer on COM_QUIT, beacsue if
+ the previous command was a shutdown command, we may have the
+ response for the COM_QUIT already in the communication buffer
+ */
+ if (command != COM_QUIT)
+ net_clear(&mysql->net); /* Clear receive buffer */
if (net_write_command(net,(uchar) command, header, header_length,
arg, arg_length))