summaryrefslogtreecommitdiff
path: root/sql-common/client.c
diff options
context:
space:
mode:
authormonty@mysql.com/narttu.mysql.fi <>2006-11-29 22:51:09 +0200
committermonty@mysql.com/narttu.mysql.fi <>2006-11-29 22:51:09 +0200
commit23263db66eb19b6779c6bd8708e1c3b08692eebb (patch)
treed9287bcf6cac6fec1a2d75f4ea0cb4afc3e6926f /sql-common/client.c
parent93f246d4c196d813f3870586534372d13b51fb03 (diff)
downloadmariadb-git-23263db66eb19b6779c6bd8708e1c3b08692eebb.tar.gz
Added back sql-bench directory, so that one can more easily run benchmarks on a server and add new benchmarks for new optimizations
Fixed memory leak in _db_set() (Bug#24497 Valgrind warning: get_one_option) Don't call net_clear() on COM_QUIT. This avoids a warning from net_clear() after shutdown: "skipped ## bytes from file" BUG#21428: skipped 9 bytes from file: socket (3)" on "mysqladmin shutdown"
Diffstat (limited to 'sql-common/client.c')
-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 4ca62e0649a..6bcd58cf91d 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))