You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
/*M!100101 IF current_user()="'mariadb.sys'@'localhost'" THEN
178
185
SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'mariadb.sys'@'localhost''";
@@ -188,12 +195,12 @@ DELIMITER ;
188
195
/*!50701 DROP USER IF EXISTS 'root'@'localhost' */;
189
196
CREATE /*M!100103 OR REPLACE */ USER `root`@`localhost`;
190
197
DELIMITER |
191
-
/*M!100101 IF current_user()="'USER'@'%'" THEN
192
-
SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'USER'@'%''";
198
+
/*M!100101 IF current_user()="'foobar'@'%'" THEN
199
+
SIGNAL SQLSTATE '45000' SET MYSQL_ERRNO=30001, MESSAGE_TEXT="Don't remove current user 'foobar'@'%''";
193
200
END IF */|
194
201
DELIMITER ;
195
-
/*!50701 DROP USER IF EXISTS 'USER'@'%' */;
196
-
CREATE /*M!100103 OR REPLACE */ USER `USER`@`%`;
202
+
/*!50701 DROP USER IF EXISTS 'foobar'@'%' */;
203
+
CREATE /*M!100103 OR REPLACE */ USER `foobar`@`%` IDENTIFIED VIA test_plugin_server USING 'plug_dest';
197
204
SELECT COALESCE(CURRENT_ROLE(),'NONE') into @current_role;
198
205
CREATE ROLE IF NOT EXISTS mariadb_dump_import_role;
199
206
GRANT mariadb_dump_import_role TO CURRENT_USER();
@@ -215,11 +222,11 @@ GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION;
215
222
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION;
216
223
/*M!100005 SET DEFAULT ROLE NONE FOR 'root'@'localhost' */;
217
224
/*!80001 ALTER USER 'root'@'localhost' DEFAULT ROLE NONE */;
218
-
GRANT `role_1` TO `USER`@`%`;
219
-
GRANT `role_2` TO `USER`@`%`;
220
-
GRANT USAGE ON *.* TO `USER`@`%`;
221
-
/*M!100005 SET DEFAULT ROLE 'role_2' FOR 'USER'@'%' */;
222
-
/*!80001 ALTER USER 'USER'@'%' DEFAULT ROLE 'role_2' */;
225
+
GRANT `role_1` TO `foobar`@`%`;
226
+
GRANT `role_2` TO `foobar`@`%`;
227
+
GRANT USAGE ON *.* TO `foobar`@`%` IDENTIFIED VIA test_plugin_server USING 'plug_dest';
228
+
/*M!100005 SET DEFAULT ROLE 'role_2' FOR 'foobar'@'%' */;
229
+
/*!80001 ALTER USER 'foobar'@'%' DEFAULT ROLE 'role_2' */;
223
230
GRANT `role_2` TO `role_1` WITH ADMIN OPTION;
224
231
GRANT SHOW DATABASES ON *.* TO `role_1`;
225
232
GRANT USAGE ON *.* TO `role_2`;
@@ -318,9 +325,11 @@ UNLOCK TABLES;
318
325
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
319
326
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
320
327
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
328
+
INSTALL PLUGIN test_plugin_server /*M!100401 IF NOT EXISTS */ SONAME 'AUTH_TEST_PLUGIN_LIB';
329
+
INSTALL PLUGIN cleartext_plugin_server /*M!100401 IF NOT EXISTS */ SONAME 'AUTH_TEST_PLUGIN_LIB';
321
330
CREATE USER IF NOT EXISTS `mariadb.sys`@`localhost` PASSWORD EXPIRE;
322
331
CREATE USER IF NOT EXISTS `root`@`localhost`;
323
-
CREATE USER IF NOT EXISTS `USER`@`%`;
332
+
CREATE USER IF NOT EXISTS `foobar`@`%` IDENTIFIED VIA test_plugin_server USING 'plug_dest';
324
333
SELECT COALESCE(CURRENT_ROLE(),'NONE') into @current_role;
325
334
CREATE ROLE IF NOT EXISTS mariadb_dump_import_role;
326
335
GRANT mariadb_dump_import_role TO CURRENT_USER();
@@ -340,11 +349,11 @@ GRANT ALL PRIVILEGES ON *.* TO `root`@`localhost` WITH GRANT OPTION;
340
349
GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION;
341
350
/*M!100005 SET DEFAULT ROLE NONE FOR 'root'@'localhost' */;
342
351
/*!80001 ALTER USER 'root'@'localhost' DEFAULT ROLE NONE */;
343
-
GRANT `role_1` TO `USER`@`%`;
344
-
GRANT `role_2` TO `USER`@`%`;
345
-
GRANT USAGE ON *.* TO `USER`@`%`;
346
-
/*M!100005 SET DEFAULT ROLE 'role_2' FOR 'USER'@'%' */;
347
-
/*!80001 ALTER USER 'USER'@'%' DEFAULT ROLE 'role_2' */;
352
+
GRANT `role_1` TO `foobar`@`%`;
353
+
GRANT `role_2` TO `foobar`@`%`;
354
+
GRANT USAGE ON *.* TO `foobar`@`%` IDENTIFIED VIA test_plugin_server USING 'plug_dest';
355
+
/*M!100005 SET DEFAULT ROLE 'role_2' FOR 'foobar'@'%' */;
356
+
/*!80001 ALTER USER 'foobar'@'%' DEFAULT ROLE 'role_2' */;
348
357
GRANT `role_2` TO `role_1` WITH ADMIN OPTION;
349
358
GRANT SHOW DATABASES ON *.* TO `role_1`;
350
359
GRANT USAGE ON *.* TO `role_2`;
@@ -430,17 +439,17 @@ UNLOCK TABLES;
430
439
431
440
SELECT * FROM mysql.global_priv ORDER BY User,Host;
432
441
Host User Priv
433
-
% USER {"access":0,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":"role_2"}
@@ -450,7 +459,7 @@ CREATE USER mariadb_test_restore IDENTIFIED BY 'getitback';
450
459
GRANT ALL ON *.* TO mariadb_test_restore WITH GRANT OPTION;
451
460
GRANT PROXY ON ''@'%' TO mariadb_test_restore WITH GRANT OPTION;
452
461
GRANT SUPER, CREATE USER /*M!100502 ,FEDERATED ADMIN */ ON *.* TO mariadb_test_restore WITH GRANT OPTION;
453
-
drop user USER;
462
+
drop user foobar;
454
463
delete from mysql.table_stats;
455
464
delete from mysql.innodb_table_stats;
456
465
delete from mysql.time_zone_transition;
@@ -465,17 +474,17 @@ set time_zone= @@global.time_zone;
465
474
DROP USER mariadb_test_restore;
466
475
SELECT * FROM mysql.global_priv ORDER BY User,Host;
467
476
Host User Priv
468
-
% USER {"access":0,"version_id":VERSION,"plugin":"mysql_native_password","authentication_string":"","password_last_changed":NOW,"default_role":"role_2"}
0 commit comments