MDEV-4594 - CREATE SERVER crashes embedded
mysql-test/r/servers.result: Added test case for MDEV-4594. mysql-test/t/servers.test: Added test case for MDEV-4594. sql/mysqld.cc: Move servers_init() call to init_server_components(), so it is called for embedded as well. Call servers_free() even if NO_EMBEDDED_ACCESS_CHECKS defined (because we call servers_init() anyway).
This commit is contained in:
parent
7f58eb4f79
commit
eec66e2f65
8
mysql-test/r/servers.result
Normal file
8
mysql-test/r/servers.result
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#
|
||||||
|
# MDEV-4594 - CREATE SERVER crashes embedded
|
||||||
|
#
|
||||||
|
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(HOST 'localhost');
|
||||||
|
SELECT * FROM mysql.servers;
|
||||||
|
Server_name Host Db Username Password Port Socket Wrapper Owner
|
||||||
|
s1 localhost 0 mysql
|
||||||
|
DROP SERVER s1;
|
8
mysql-test/t/servers.test
Normal file
8
mysql-test/t/servers.test
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
# Generic tests for servers (do not require FEDERATED)
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-4594 - CREATE SERVER crashes embedded
|
||||||
|
--echo #
|
||||||
|
CREATE SERVER s1 FOREIGN DATA WRAPPER mysql OPTIONS(HOST 'localhost');
|
||||||
|
SELECT * FROM mysql.servers;
|
||||||
|
DROP SERVER s1;
|
@ -1847,8 +1847,8 @@ void clean_up(bool print_message)
|
|||||||
my_tz_free();
|
my_tz_free();
|
||||||
my_dboptions_cache_free();
|
my_dboptions_cache_free();
|
||||||
ignore_db_dirs_free();
|
ignore_db_dirs_free();
|
||||||
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
|
||||||
servers_free(1);
|
servers_free(1);
|
||||||
|
#ifndef NO_EMBEDDED_ACCESS_CHECKS
|
||||||
acl_free(1);
|
acl_free(1);
|
||||||
grant_free();
|
grant_free();
|
||||||
#endif
|
#endif
|
||||||
@ -4668,6 +4668,8 @@ a file name for --log-bin-index option", opt_binlog_index_name);
|
|||||||
init_update_queries();
|
init_update_queries();
|
||||||
init_global_user_stats();
|
init_global_user_stats();
|
||||||
init_global_client_stats();
|
init_global_client_stats();
|
||||||
|
if (!opt_bootstrap)
|
||||||
|
servers_init(0);
|
||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -5074,9 +5076,6 @@ int mysqld_main(int argc, char **argv)
|
|||||||
if (!opt_noacl)
|
if (!opt_noacl)
|
||||||
(void) grant_init();
|
(void) grant_init();
|
||||||
|
|
||||||
if (!opt_bootstrap)
|
|
||||||
servers_init(0);
|
|
||||||
|
|
||||||
if (!opt_noacl)
|
if (!opt_noacl)
|
||||||
{
|
{
|
||||||
#ifdef HAVE_DLOPEN
|
#ifdef HAVE_DLOPEN
|
||||||
|
Loading…
x
Reference in New Issue
Block a user