MDEV-32043 mariadb-upgrade should remove bundled plugins from mysql.plugin
Also in the startup, lets not "Error" on attempting to install a mysql.plugin that is already there. We use the 'if_not_exists' parameter to true to downgrade this to a "Note". Also corrects: MDEV-32041 "plugin already loaded" should be a Warning, not an Error
This commit is contained in:
parent
9be7e03f70
commit
02d67cecb6
@ -1058,4 +1058,12 @@ test
|
||||
Phase 7/7: Running 'FLUSH PRIVILEGES'
|
||||
OK
|
||||
set global sql_safe_updates=@orig_sql_safe_updates;
|
||||
#
|
||||
# MDEV-32043 Remove plugins previously external that are now built in (unix_socket)
|
||||
#
|
||||
INSERT INTO mysql.plugin SELECT 'unix_socket', 'auth_socket.so'
|
||||
FROM dual WHERE convert(@@version_compile_os using latin1) not in ('Win32', 'Win64', 'Windows');
|
||||
# mariadb-upgrade --force --silent 2>&1
|
||||
SELECT * FROM mysql.plugin WHERE name='unix_socket';
|
||||
name dl
|
||||
# End of 10.4 tests
|
||||
|
@ -495,4 +495,15 @@ set global sql_safe_updates=ON;
|
||||
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
||||
set global sql_safe_updates=@orig_sql_safe_updates;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-32043 Remove plugins previously external that are now built in (unix_socket)
|
||||
--echo #
|
||||
|
||||
INSERT INTO mysql.plugin SELECT 'unix_socket', 'auth_socket.so'
|
||||
FROM dual WHERE convert(@@version_compile_os using latin1) not in ('Win32', 'Win64', 'Windows');
|
||||
--echo # mariadb-upgrade --force --silent 2>&1
|
||||
--exec $MYSQL_UPGRADE --force --silent 2>&1
|
||||
SELECT * FROM mysql.plugin WHERE name='unix_socket';
|
||||
--remove_file $MYSQLD_DATADIR/mysql_upgrade_info
|
||||
|
||||
--echo # End of 10.4 tests
|
||||
|
@ -180,6 +180,11 @@ UPDATE user
|
||||
SET plugin='unix_socket' WHERE plugin='auth_socket';
|
||||
DELETE FROM plugin
|
||||
WHERE name='auth_socket';
|
||||
# Delete plugins that are now inbuilt but might not have been before (MDEV-32043)
|
||||
DELETE plugin
|
||||
FROM information_schema.PLUGINS is_p
|
||||
JOIN plugin ON plugin.name = is_p.PLUGIN_NAME
|
||||
WHERE is_p.PLUGIN_LIBRARY IS NULL;
|
||||
|
||||
ALTER TABLE user
|
||||
MODIFY Password char(41) character set latin1 collate latin1_bin NOT NULL default '',
|
||||
|
@ -1929,7 +1929,7 @@ static void plugin_load(MEM_ROOT *tmp_root)
|
||||
the mutex here to satisfy the assert
|
||||
*/
|
||||
mysql_mutex_lock(&LOCK_plugin);
|
||||
plugin_add(tmp_root, false, &name, &dl, MYF(ME_ERROR_LOG));
|
||||
plugin_add(tmp_root, true, &name, &dl, MYF(ME_ERROR_LOG));
|
||||
free_root(tmp_root, MYF(MY_MARK_BLOCKS_FREE));
|
||||
mysql_mutex_unlock(&LOCK_plugin);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user