mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 12:02:42 +01:00
MDEV-9183 MariaDB 10.1 crash on mysqld --verbose --help
plugin_init() works like this: 1. init MyISAM 2. load plugins from mysql.plugin, if it's a MyISAM table 3. init all not initialized plugins 4. all done, if step 2 loaded mysql.plugin, otherwise: 5. load plugins from mysql.plugin 6. init all not initialized plugins now, with --help --verbose, step 3 will not actually initialize them, and if mysql.plugin is unreadable, step 6 will try to initialize existing plugins again. Fix: when skipping initialization because of --help, change plugin status from PLUGIN_IS_UNINITIALIZED.
This commit is contained in:
parent
03245ec02e
commit
392d557901
3 changed files with 13 additions and 0 deletions
3
mysql-test/r/mysqld_help_crash-9183.result
Normal file
3
mysql-test/r/mysqld_help_crash-9183.result
Normal file
|
@ -0,0 +1,3 @@
|
|||
rename table mysql.plugin to test.plugin;
|
||||
flush tables;
|
||||
rename table test.plugin to mysql.plugin;
|
9
mysql-test/t/mysqld_help_crash-9183.test
Normal file
9
mysql-test/t/mysqld_help_crash-9183.test
Normal file
|
@ -0,0 +1,9 @@
|
|||
#
|
||||
# MDEV-9183 MariaDB 10.1 crash on `mysqld --verbose --help`
|
||||
#
|
||||
|
||||
rename table mysql.plugin to test.plugin;
|
||||
flush tables;
|
||||
--exec $MYSQLD_CMD --help --verbose >/dev/null 2>&1
|
||||
rename table test.plugin to mysql.plugin;
|
||||
|
|
@ -1399,6 +1399,7 @@ static int plugin_initialize(MEM_ROOT *tmp_root, struct st_plugin_int *plugin,
|
|||
if (options_only || state == PLUGIN_IS_DISABLED)
|
||||
{
|
||||
ret= 0;
|
||||
state= PLUGIN_IS_DISABLED;
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue