Commit 5d8cee44 authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-8224 Server crashes in get_server_from_table_to_cache on empty name

parent 33d480f8
create server '' foreign data wrapper w2 options (host '127.0.0.1');
create server '' foreign data wrapper w2 options (host '127.0.0.1');
--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
...@@ -326,7 +326,8 @@ get_server_from_table_to_cache(TABLE *table) ...@@ -326,7 +326,8 @@ get_server_from_table_to_cache(TABLE *table)
table->use_all_columns(); table->use_all_columns();
/* get each field into the server struct ptr */ /* get each field into the server struct ptr */
server->server_name= get_field(&mem, table->field[0]); ptr= get_field(&mem, table->field[0]);
server->server_name= ptr ? ptr : blank;
server->server_name_length= (uint) strlen(server->server_name); server->server_name_length= (uint) strlen(server->server_name);
ptr= get_field(&mem, table->field[1]); ptr= get_field(&mem, table->field[1]);
server->host= ptr ? ptr : blank; server->host= ptr ? ptr : blank;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment