Bug #29719 mysql proxy dies if mysqladmin shutdown is issued against it
Submitted: 11 Jul 2007 13:37 Modified: 12 Jul 2007 12:31
Reporter: Philip Stoev Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Proxy: Core Severity:S3 (Non-critical)
Version:revision 81 OS:Linux (fedora core 6)
Assigned to: Jan Kneschke CPU Architecture:Any
Tags: qc

[11 Jul 2007 13:37] Philip Stoev
Description:
"mysqladmin shutdown" is issued against mysql proxy, it will die with assertion failed.

How to repeat:
shell1> mysql-proxy --proxy-backend-addresses=127.0.0.1:3306 --proxy-lua-script=examples/tutorial-packets.lua -D

shell2> mysqladmin -h127.0.0.1 -P4040 shutdown

shell1> file network-mysqld-proto.c: line 229 (network_mysqld_proto_get_lenenc_gstring): assertion failed: (*_off < packet->len)

Suggested fix:
Maybe the protocol handler is expecting each COM_ command to have parameters, even if some do not?
[11 Jul 2007 13:42] Philip Stoev
Crash also happens if no username and password were specified when connecting to mysql proxy:

shell1> mysql-proxy -D
shell2> mysql -h127.0.0.1 -P4040 <-- notice no username and password here
shell1> file network-mysqld-proto.c: line 229 (network_mysqld_proto_get_lenenc_gstring): assertion failed: (*_off < packet->len)
Aborted
[11 Jul 2007 21:37] Sveta Smirnova
Thank you for the report.

Verified as described.
[11 Jul 2007 21:39] Sveta Smirnova
Verified both errors: with mysqladmin and mysql
[12 Jul 2007 12:25] Jan Kneschke
the COM_SHUTDOWN command is support now (in [91])

A fix for the seconds assert() is following.
[12 Jul 2007 12:31] Jan Kneschke
the empty password + no-default-db assert() got fixed in [92].

Thanks for the report.