We're updating the issue view to help you get more done.Learn more

Server crashes in get_server_from_table_to_cache on empty name

The problem exists in MySQL 5.5, but not in 5.6/5.7, I assume it was fixed at some point.

create server '' foreign data wrapper w2 options (host '');
--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--source include/wait_until_disconnected.inc
--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
Stack trace from 5.5 commit 0014bdc7ee
#3  <signal handler called>
#4  __strlen_sse2 () at ../sysdeps/x86_64/multiarch/../strlen.S:32
#5  0x000000000072daf9 in get_server_from_table_to_cache (table=0x7fb48ed4c460) at 5.5/sql/sql_servers.cc:330
#6  0x000000000072d7f7 in servers_load (thd=0x7fb491b49060, tables=0x7ffd8236d300) at 5.5/sql/sql_servers.cc:220
#7  0x000000000072d9ab in servers_reload (thd=0x7fb491b49060) at 5.5/sql/sql_servers.cc:275
#8  0x000000000072d6b0 in servers_init (dont_read_servers_table=false) at 5.5/sql/sql_servers.cc:178
#9  0x000000000058c53f in mysqld_main (argc=84, argv=0x7fb492813bb0) at 5.5/sql/mysqld.cc:4986
#10 0x000000000058421c in main (argc=6, argv=0x7ffd8236dac8) at 5.5/sql/main.cc:25



Sergei Golubchik


Elena Stepanova