summaryrefslogtreecommitdiff
path: root/mysql-test/main/mysqldump-system.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-01-26 21:32:17 +0100
committerSergei Golubchik <serg@mariadb.org>2022-01-30 12:07:16 +0100
commit3cc278e9604056af032ae05a6448b42edc947795 (patch)
tree1034ff7a6e6b15ff06146865b87a7c79d829430a /mysql-test/main/mysqldump-system.test
parentc478a5533ed5aec9535bac59d201c0cb377ca817 (diff)
downloadmariadb-git-3cc278e9604056af032ae05a6448b42edc947795.tar.gz
enable main.mysqldump-system test
that was permanently disabled in a merge mistake. also * use auth_test_plugin to test dumping of plugins and user auth, as the original test intended * s/USER/foobar/ to make a username searchable
Diffstat (limited to 'mysql-test/main/mysqldump-system.test')
-rw-r--r--mysql-test/main/mysqldump-system.test24
1 files changed, 13 insertions, 11 deletions
diff --git a/mysql-test/main/mysqldump-system.test b/mysql-test/main/mysqldump-system.test
index c1965410167..7e85fcc1a11 100644
--- a/mysql-test/main/mysqldump-system.test
+++ b/mysql-test/main/mysqldump-system.test
@@ -3,9 +3,10 @@
--source include/have_udf.inc
--source include/platform.inc
-if (!$AUTH_SOCKET_SO) {
- --skip Need auth socket plugin
+if (!$AUTH_TEST_PLUGIN_SO) {
+ --skip Need auth test plugin
}
+install soname 'auth_test_plugin';
--echo #
--echo # MDEV-23630: mysqldump to logically dump system tables
@@ -21,7 +22,7 @@ flush privileges;
# mariadb.sys because of MDEV-24098
alter user 'mariadb.sys'@'localhost' ACCOUNT UNLOCK;
-create user USER;
+create user foobar IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
# time zone data already loaded
@@ -29,9 +30,9 @@ CREATE ROLE role_1;
CREATE ROLE role_2 WITH ADMIN role_1;
GRANT SHOW DATABASES ON *.* TO role_1;
-GRANT role_1 TO USER;
-GRANT role_2 TO USER;
-SET DEFAULT ROLE role_2 FOR USER;
+GRANT role_1 TO foobar;
+GRANT role_2 TO foobar;
+SET DEFAULT ROLE role_2 FOR foobar;
ALTER TABLE mysql.roles_mapping ORDER BY Host, User, Role;
@@ -66,7 +67,7 @@ eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
--echo # mysqldump of system tables with --system=all
--echo #
---replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB $AUTH_TEST_PLUGIN_SO AUTH_TEST_PLUGIN_LIB
--exec $MYSQL_DUMP --skip-comments --system=all
@@ -74,7 +75,7 @@ eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
--echo # mysqldump of system tables with --system=all --replace
--echo #
---replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB $AUTH_TEST_PLUGIN_SO AUTH_TEST_PLUGIN_LIB
--exec $MYSQL_DUMP --skip-comments --system=all --replace
@@ -85,7 +86,7 @@ eval CREATE FUNCTION metaphon RETURNS STRING SONAME "$UDF_EXAMPLE_SO";
--echo # mysqldump of system tables with --system=all --insert-ignore
--echo #
---replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB
+--replace_result $UDF_EXAMPLE_SO UDF_EXAMPLE_LIB $AUTH_TEST_PLUGIN_SO AUTH_TEST_PLUGIN_LIB
--exec $MYSQL_DUMP --skip-comments --system=all --insert-ignore
@@ -107,7 +108,7 @@ GRANT ALL ON *.* TO mariadb_test_restore WITH GRANT OPTION;
GRANT PROXY ON ''@'%' TO mariadb_test_restore WITH GRANT OPTION;
GRANT SUPER, CREATE USER /*M!100502 ,FEDERATED ADMIN */ ON *.* TO mariadb_test_restore WITH GRANT OPTION;
-drop user USER;
+drop user foobar;
delete from mysql.table_stats;
delete from mysql.innodb_table_stats;
delete from mysql.time_zone_transition;
@@ -151,9 +152,10 @@ drop table mysql.tz;
DROP ROLE role_2;
DROP ROLE role_1;
-drop user USER;
+drop user foobar;
replace into mysql.global_priv select * from backup_users;
replace into mysql.tables_priv select * from tables_priv;
flush privileges;
drop table backup_users, tables_priv;
+uninstall soname 'auth_test_plugin';