summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/plugins/r
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/plugins/r
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/plugins/r')
-rw-r--r--mysql-test/suite/plugins/r/audit_null.result117
-rw-r--r--mysql-test/suite/plugins/r/audit_null_debug.result18
-rw-r--r--mysql-test/suite/plugins/r/auth_ed25519.result77
-rw-r--r--mysql-test/suite/plugins/r/auth_v0100.result22
-rw-r--r--mysql-test/suite/plugins/r/binlog-simple_plugin_check.result19
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff24
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff24
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff24
-rw-r--r--mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff24
-rw-r--r--mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff40
-rw-r--r--mysql-test/suite/plugins/r/compression.result22
-rw-r--r--mysql-test/suite/plugins/r/compression_load.result33
-rw-r--r--mysql-test/suite/plugins/r/cracklib_password_check.result62
-rw-r--r--mysql-test/suite/plugins/r/dialog.result27
-rw-r--r--mysql-test/suite/plugins/r/false_dupes-6543.result5
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_install.result16
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_load.result42
-rw-r--r--mysql-test/suite/plugins/r/feedback_plugin_send.result46
-rw-r--r--mysql-test/suite/plugins/r/fulltext_plugin.result7
-rw-r--r--mysql-test/suite/plugins/r/locales.result255
-rw-r--r--mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result12
-rw-r--r--mysql-test/suite/plugins/r/max_password_errors_auth_socket.result12
-rw-r--r--mysql-test/suite/plugins/r/multiauth.result220
-rw-r--r--mysql-test/suite/plugins/r/pam.result115
-rw-r--r--mysql-test/suite/plugins/r/pam_cleartext.result23
-rw-r--r--mysql-test/suite/plugins/r/pam_v1.result40
-rw-r--r--mysql-test/suite/plugins/r/password_reuse_check.result94
-rw-r--r--mysql-test/suite/plugins/r/processlist.result9
-rw-r--r--mysql-test/suite/plugins/r/qc_info.result59
-rw-r--r--mysql-test/suite/plugins/r/qc_info_priv.result49
-rw-r--r--mysql-test/suite/plugins/r/server_audit.result552
-rw-r--r--mysql-test/suite/plugins/r/show_all_plugins.result36
-rw-r--r--mysql-test/suite/plugins/r/simple_password_check.result266
-rw-r--r--mysql-test/suite/plugins/r/sql_error_log.result67
-rw-r--r--mysql-test/suite/plugins/r/test_sql_service.result100
-rw-r--r--mysql-test/suite/plugins/r/thread_pool_server_audit.result392
-rw-r--r--mysql-test/suite/plugins/r/two_password_validations.result23
-rw-r--r--mysql-test/suite/plugins/r/unix_socket.result31
38 files changed, 3004 insertions, 0 deletions
diff --git a/mysql-test/suite/plugins/r/audit_null.result b/mysql-test/suite/plugins/r/audit_null.result
new file mode 100644
index 00000000..45fe05d9
--- /dev/null
+++ b/mysql-test/suite/plugins/r/audit_null.result
@@ -0,0 +1,117 @@
+set @old_global_general_log=@@global.general_log;
+set global general_log=OFF;
+create user testuser@localhost;
+grant select on *.* to testuser@localhost;
+install plugin audit_null soname 'adt_null';
+select 1;
+1
+1
+select foobar;
+ERROR 42S22: Unknown column 'foobar' in 'field list'
+show status like 'audit_null%';
+Variable_name Value
+Audit_null_called 9
+Audit_null_general_error 1
+Audit_null_general_log 3
+Audit_null_general_result 2
+Audit_null_general_warning 1
+create procedure au1(x char(16)) select concat("test1", x);
+call au1("-12");
+concat("test1", x)
+test1-12
+show status like 'audit_null%';
+Variable_name Value
+Audit_null_called 22
+Audit_null_general_error 1
+Audit_null_general_log 7
+Audit_null_general_result 5
+Audit_null_general_warning 1
+create table t1 (a int);
+insert t1 values (1), (2);
+select * from t1;
+a
+1
+2
+rename table t1 to t2;
+alter table t2 add column b int;
+create definer=testuser@localhost view v1 as select t2.a+1, t2_copy.a+2 from t2, t2 as t2_copy;
+select * from v1;
+t2.a+1 t2_copy.a+2
+2 3
+3 3
+2 4
+3 4
+drop view v1;
+create temporary table t2 (a date);
+insert t2 values ('2020-10-09');
+select * from t2;
+a
+2020-10-09
+alter table t2 add column b int;
+drop table t2;
+explain select distinct * from t2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 ALL NULL NULL NULL NULL 2 Using temporary
+select distinct * from t2;
+a b
+1 NULL
+2 NULL
+drop table t2;
+uninstall plugin audit_null;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+drop procedure au1;
+drop user testuser@localhost;
+set global general_log=@old_global_general_log;
+root[root] @ localhost [] >> select 1
+root[root] @ localhost [] >> select foobar
+root[root] @ localhost [] >> show status like 'audit_null%'
+root[root] @ localhost [] >> create procedure au1(x char(16)) select concat("test1", x)
+root[root] @ localhost [] mysql.proc : write
+root[root] @ localhost [] >> call au1("-12")
+root[root] @ localhost [] mysql.proc : read
+root[root] @ localhost [] >> select concat("test1", NAME_CONST('x',_latin1'-12' COLLATE 'latin1_swedish_ci'))
+root[root] @ localhost [] >> show status like 'audit_null%'
+root[root] @ localhost [] >> create table t1 (a int)
+root[root] @ localhost [] test.t1 : create
+root[root] @ localhost [] >> insert t1 values (1), (2)
+root[root] @ localhost [] test.t1 : write
+root[root] @ localhost [] mysql.table_stats : read
+root[root] @ localhost [] mysql.column_stats : read
+root[root] @ localhost [] mysql.index_stats : read
+root[root] @ localhost [] >> select * from t1
+root[root] @ localhost [] test.t1 : read
+root[root] @ localhost [] >> rename table t1 to t2
+root[root] @ localhost [] test.t1 : rename to test.t2
+root[root] @ localhost [] mysql.table_stats : write
+root[root] @ localhost [] mysql.column_stats : write
+root[root] @ localhost [] mysql.index_stats : write
+root[root] @ localhost [] >> alter table t2 add column b int
+root[root] @ localhost [] test.t2 : alter
+root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] >> create definer=testuser@localhost view v1 as select t2.a+1, t2_copy.a+2 from t2, t2 as t2_copy
+root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] >> select * from v1
+root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] mysql.table_stats : read
+root[root] @ localhost [] mysql.column_stats : read
+root[root] @ localhost [] mysql.index_stats : read
+root[root] @ localhost [] >> drop view v1
+root[root] @ localhost [] >> create temporary table t2 (a date)
+root[root] @ localhost [] >> insert t2 values ('2020-10-09')
+root[root] @ localhost [] >> select * from t2
+root[root] @ localhost [] >> alter table t2 add column b int
+root[root] @ localhost [] >> drop table t2
+root[root] @ localhost [] >> explain select distinct * from t2
+root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] >> select distinct * from t2
+root[root] @ localhost [] test.t2 : read
+root[root] @ localhost [] >> drop table t2
+root[root] @ localhost [] mysql.table_stats : write
+root[root] @ localhost [] mysql.column_stats : write
+root[root] @ localhost [] mysql.index_stats : write
+root[root] @ localhost [] test.t2 : drop
+root[root] @ localhost [] >> uninstall plugin audit_null
+root[root] @ localhost [] mysql.plugin : write
diff --git a/mysql-test/suite/plugins/r/audit_null_debug.result b/mysql-test/suite/plugins/r/audit_null_debug.result
new file mode 100644
index 00000000..c916b27f
--- /dev/null
+++ b/mysql-test/suite/plugins/r/audit_null_debug.result
@@ -0,0 +1,18 @@
+alter table mysql.plugin engine=myisam;
+set @old_dbug=@@debug_dbug;
+call mtr.add_suppression("Index for table.*mysql.plugin.MYI");
+call mtr.add_suppression("Index for table 'plugin' is corrupt; try to repair it");
+SET debug_dbug='+d,myisam_pretend_crashed_table_on_usage';
+install plugin audit_null soname 'adt_null';
+ERROR HY000: Index for table './mysql/plugin.MYI' is corrupt; try to repair it
+SET debug_dbug=@old_dbug;
+install plugin audit_null soname 'adt_null';
+SET debug_dbug='+d,myisam_pretend_crashed_table_on_usage';
+uninstall plugin audit_null;
+ERROR HY000: Index for table './mysql/plugin.MYI' is corrupt; try to repair it
+SET debug_dbug=@old_dbug;
+uninstall plugin audit_null;
+uninstall plugin audit_null;
+ERROR 42000: PLUGIN audit_null does not exist
+delete from mysql.plugin where name='audit_null';
+alter table mysql.plugin engine=aria;
diff --git a/mysql-test/suite/plugins/r/auth_ed25519.result b/mysql-test/suite/plugins/r/auth_ed25519.result
new file mode 100644
index 00000000..f5d1ce24
--- /dev/null
+++ b/mysql-test/suite/plugins/r/auth_ed25519.result
@@ -0,0 +1,77 @@
+create function ed25519_password returns string soname "auth_ed25519.so";
+select ed25519_password();
+ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password()
+select ed25519_password(1);
+ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password()
+select ed25519_password("foo", "bar");
+ERROR HY000: Can't initialize function 'ed25519_password'; Wrong arguments to ed25519_password()
+select ed25519_password("foo");
+ERROR HY000: Can't initialize function 'ed25519_password'; Authentication plugin ed25519 is not loaded
+install soname 'auth_ed25519';
+select ed25519_password("foo");
+ed25519_password("foo")
+vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI
+select ed25519_password("foobar");
+ed25519_password("foobar")
+qv2mG6HWCuy32Slb5xhV4THStewNz2VINVPbgk+XAJ8
+select ed25519_password("foo bar");
+ed25519_password("foo bar")
+Y5fV74JAVRMOK2cdnUsYS+WW9sXaaL/o+6WGKOgqnzc
+select ed25519_password(NULL);
+ed25519_password(NULL)
+NULL
+select * from information_schema.plugins where plugin_name='ed25519';
+PLUGIN_NAME ed25519
+PLUGIN_VERSION 1.1
+PLUGIN_STATUS ACTIVE
+PLUGIN_TYPE AUTHENTICATION
+PLUGIN_TYPE_VERSION 2.2
+PLUGIN_LIBRARY auth_ed25519.so
+PLUGIN_LIBRARY_VERSION 1.15
+PLUGIN_AUTHOR Sergei Golubchik
+PLUGIN_DESCRIPTION Elliptic curve ED25519 based authentication
+PLUGIN_LICENSE GPL
+LOAD_OPTION ON
+PLUGIN_MATURITY Stable
+PLUGIN_AUTH_VERSION 1.1
+create user test1@localhost identified via ed25519 using 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY';
+show grants for test1@localhost;
+Grants for test1@localhost
+GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'
+drop user test1@localhost;
+create user test1@localhost identified via ed25519 using 'foo';
+ERROR HY000: Password hash should be 43 characters long
+create user test1@localhost identified via ed25519 using '>>>1234567890123456789012345678901234567890';
+ERROR HY000: Password hash should be base64 encoded
+create user test1@localhost identified via ed25519 using password('foo');
+show grants for test1@localhost;
+Grants for test1@localhost
+GRANT USAGE ON *.* TO `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI'
+select ed25519_password('foo');
+ed25519_password('foo')
+vubFBzIrapbfHct1/J72dnUryz5VS7lA6XHH8sIx4TI
+set password for test1@localhost = password('bar');
+show create user test1@localhost;
+CREATE USER for test1@localhost
+CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10'
+select ed25519_password('bar');
+ed25519_password('bar')
+pfzkeWMzkTefY1oshXS+/kATeN51M+4jxi3/cbyTd10
+set password for test1@localhost = 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY';
+show create user test1@localhost;
+CREATE USER for test1@localhost
+CREATE USER `test1`@`localhost` IDENTIFIED VIA ed25519 USING 'ZIgUREUg5PVgQ6LskhXmO+eZLS0nC8be6HPjYWR4YJY'
+connect(localhost,test1,public,test,PORT,SOCKET);
+connect con1, localhost, test1, public;
+ERROR 28000: Access denied for user 'test1'@'localhost' (using password: YES)
+connect con1, localhost, test1, secret;
+select current_user();
+current_user()
+test1@localhost
+disconnect con1;
+connection default;
+drop user test1@localhost;
+uninstall plugin ed25519;
+select ed25519_password("foo");
+ERROR HY000: Can't initialize function 'ed25519_password'; Authentication plugin ed25519 is not loaded
+drop function ed25519_password;
diff --git a/mysql-test/suite/plugins/r/auth_v0100.result b/mysql-test/suite/plugins/r/auth_v0100.result
new file mode 100644
index 00000000..da3cce74
--- /dev/null
+++ b/mysql-test/suite/plugins/r/auth_v0100.result
@@ -0,0 +1,22 @@
+install soname 'auth_0x0100';
+select plugin_name, plugin_type_version from information_schema.plugins where
+plugin_type='authentication' and plugin_library is not null order by plugin_name;
+plugin_name plugin_type_version
+auth_0x0100 1.0
+create user tt identified via auth_0x0100;
+create user zzzzzzzzzzzzzzzz;
+grant select on test.* to zzzzzzzzzzzzzzzz;
+connect(localhost,tt,,test,MASTER_MYPORT,MASTER_MYSOCK);
+connect c0,localhost,tt;
+ERROR 28000: Access denied for user 'tt'@'localhost' (using password: YES)
+grant proxy on zzzzzzzzzzzzzzzz to tt;
+connect c1,localhost,tt;
+connection c1;
+select user(), current_user(), @@external_user;
+user() tt@localhost
+current_user() zzzzzzzzzzzzzzzz@%
+@@external_user oooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooo.
+connection default;
+drop user tt;
+drop user zzzzzzzzzzzzzzzz;
+uninstall plugin auth_0x0100;
diff --git a/mysql-test/suite/plugins/r/binlog-simple_plugin_check.result b/mysql-test/suite/plugins/r/binlog-simple_plugin_check.result
new file mode 100644
index 00000000..1cba628d
--- /dev/null
+++ b/mysql-test/suite/plugins/r/binlog-simple_plugin_check.result
@@ -0,0 +1,19 @@
+INSTALL SONAME "simple_password_check";
+SELECT PLUGIN_NAME FROM INFORMATION_SCHEMA.PLUGINS
+WHERE PLUGIN_NAME='simple_password_check';
+PLUGIN_NAME
+simple_password_check
+#
+# MDEV-14031 Password policy causes replication failure
+#
+CREATE USER user1@localhost IDENTIFIED BY 'BsG9#9.cem#!85';
+CREATE USER user2@localhost IDENTIFIED BY 'bsg9#d.cem#!85';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+DROP USER user1@localhost;
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; CREATE USER user1@localhost IDENTIFIED BY 'BsG9#9.cem#!85'
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP USER user1@localhost
+UNINSTALL PLUGIN simple_password_check;
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff
new file mode 100644
index 00000000..06fdb0bd
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,innodb-lz4.rdiff
@@ -0,0 +1,24 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing lz4 compression provider with innodb
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lz4;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+@@ -15,8 +15,8 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lz4
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++ERROR HY000: Table test/t1 is compressed with lz4, which is not currently loaded. Please load the lz4 provider plugin to open the table
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff
new file mode 100644
index 00000000..ee348934
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,innodb-lzma.rdiff
@@ -0,0 +1,24 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing lzma compression provider with innodb
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lzma;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+@@ -15,8 +15,8 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lzma
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++ERROR HY000: Table test/t1 is compressed with lzma, which is not currently loaded. Please load the lzma provider plugin to open the table
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff b/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff
new file mode 100644
index 00000000..d7cdc410
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,innodb-lzo.rdiff
@@ -0,0 +1,24 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing lzo compression provider with innodb
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = lzo;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+@@ -15,8 +15,8 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lzo
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++ERROR HY000: Table test/t1 is compressed with lzo, which is not currently loaded. Please load the lzo provider plugin to open the table
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff b/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff
new file mode 100644
index 00000000..e9c7485d
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,innodb-snappy.rdiff
@@ -0,0 +1,24 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,8 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing snappy compression provider with innodb
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
++set global innodb_compression_algorithm = snappy;
+ call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+ call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+ call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+@@ -15,8 +15,8 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-snappy
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++ERROR HY000: Table test/t1 is compressed with snappy, which is not currently loaded. Please load the snappy provider plugin to open the table
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff b/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff
new file mode 100644
index 00000000..9b155ff3
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression,mroonga-lz4.rdiff
@@ -0,0 +1,40 @@
+--- suite/plugins/r/compression.result
++++ suite/plugins/r/compression.reject
+@@ -1,12 +1,8 @@
+ #
+-# Testing bzip2 compression provider with innodb
++# Testing lz4 compression provider with mroonga
+ #
+ call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+-set global innodb_compression_algorithm = bzip2;
+-call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+-call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+-call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+-create table t1 (a int, b text ) engine = innodb page_compressed = 1;
++create table t1 (a int, b text COMMENT 'FLAGS "COLUMN_SCALAR|COMPRESS_LZ4"') engine = mroonga charset = utf8;
+ insert t1 (a, b) values (0, repeat("abc", 100));
+ insert t1 (a, b) values (1, repeat("def", 1000));
+ insert t1 (a, b) values (2, repeat("ghi", 10000));
+@@ -14,8 +11,20 @@
+ 0 abcabcabc 300
+ 1 defdefdef 3000
+ 2 ghighighi 30000
+-# restart: --disable-provider-bzip2
++# restart: --disable-provider-lz4
+ select a, left(b, 9), length(b) from t1;
+-ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
++a left(b, 9) length(b)
++0 0
++1 0
++2 0
++Warnings:
++Warning 4185 MariaDB tried to use the LZ4 compression, but its provider plugin is not loaded
++select a, left(b, 9), length(b) from t1;
++a left(b, 9) length(b)
++0 0
++1 0
++2 0
++Warnings:
++Warning 4185 MariaDB tried to use the LZ4 compression, but its provider plugin is not loaded
+ drop table t1;
+ # restart
diff --git a/mysql-test/suite/plugins/r/compression.result b/mysql-test/suite/plugins/r/compression.result
new file mode 100644
index 00000000..dd267f28
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression.result
@@ -0,0 +1,22 @@
+#
+# Testing bzip2 compression provider with innodb
+#
+call mtr.add_suppression("MariaDB tried to use the .+ compression, but its provider plugin is not loaded");
+set global innodb_compression_algorithm = bzip2;
+call mtr.add_suppression("Background Page read failed to read, uncompress, or decrypt");
+call mtr.add_suppression("Table is compressed or encrypted but uncompress or decrypt failed");
+call mtr.add_suppression("Table .*t1.* is compressed with (\\w+), which is not currently loaded. Please load the \\1 provider plugin to open the table");
+create table t1 (a int, b text ) engine = innodb page_compressed = 1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+# restart: --disable-provider-bzip2
+select a, left(b, 9), length(b) from t1;
+ERROR HY000: Table test/t1 is compressed with bzip2, which is not currently loaded. Please load the bzip2 provider plugin to open the table
+drop table t1;
+# restart
diff --git a/mysql-test/suite/plugins/r/compression_load.result b/mysql-test/suite/plugins/r/compression_load.result
new file mode 100644
index 00000000..a23037ed
--- /dev/null
+++ b/mysql-test/suite/plugins/r/compression_load.result
@@ -0,0 +1,33 @@
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+plugin_name plugin_status
+set global innodb_compression_algorithm = lz4;
+ERROR 42000: Variable 'innodb_compression_algorithm' can't be set to the value of 'lz4'
+install plugin provider_lz4 soname 'provider_lz4';
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+plugin_name plugin_status
+provider_lz4 ACTIVE
+set global innodb_compression_algorithm = lz4;
+create table t1 (a int, b text) engine=innodb page_compressed=1;
+insert t1 (a, b) values (0, repeat("abc", 100));
+insert t1 (a, b) values (1, repeat("def", 1000));
+insert t1 (a, b) values (2, repeat("ghi", 10000));
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+uninstall plugin provider_lz4;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+select plugin_name, plugin_status from information_schema.plugins where plugin_name='provider_lz4';
+plugin_name plugin_status
+provider_lz4 INACTIVE
+set global innodb_compression_algorithm = default;
+set global innodb_compression_algorithm = lz4;
+set global innodb_compression_algorithm = default;
+select a, left(b, 9), length(b) from t1;
+a left(b, 9) length(b)
+0 abcabcabc 300
+1 defdefdef 3000
+2 ghighighi 30000
+drop table t1;
diff --git a/mysql-test/suite/plugins/r/cracklib_password_check.result b/mysql-test/suite/plugins/r/cracklib_password_check.result
new file mode 100644
index 00000000..192d41d2
--- /dev/null
+++ b/mysql-test/suite/plugins/r/cracklib_password_check.result
@@ -0,0 +1,62 @@
+install soname "cracklib_password_check";
+select * from information_schema.plugins where plugin_name='cracklib_password_check';
+PLUGIN_NAME cracklib_password_check
+PLUGIN_VERSION 1.0
+PLUGIN_STATUS ACTIVE
+PLUGIN_TYPE PASSWORD VALIDATION
+PLUGIN_TYPE_VERSION 1.1
+PLUGIN_LIBRARY cracklib_password_check.so
+PLUGIN_LIBRARY_VERSION 1.15
+PLUGIN_AUTHOR Sergei Golubchik
+PLUGIN_DESCRIPTION Password validation via CrackLib
+PLUGIN_LICENSE GPL
+LOAD_OPTION ON
+PLUGIN_MATURITY Stable
+PLUGIN_AUTH_VERSION 1.0
+grant select on *.* to foocar identified by 'foocar';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it is based on your username
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foocar identified by 'racoof';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it is based on your username
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foo@barbar identified by 'barbar';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it does not contain enough DIFFERENT characters
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foobar identified by 'qwerty';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it is based on a dictionary word
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foocar@localhost identified by 'localhost';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it is based upon your password entry
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foocar@localhost identified by 'foocar@localhost';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it is derived from your password entry
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foobar identified by 'q$%^&*rty';
+drop user foobar;
+#
+# MDEV-9851: CREATE USER w/o IDENTIFIED BY clause causes crash
+# when using cracklib plugin
+#
+create user 'newuser'@'localhost';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+uninstall plugin cracklib_password_check;
+create user foo1 identified by 'pwd';
+drop user foo1;
diff --git a/mysql-test/suite/plugins/r/dialog.result b/mysql-test/suite/plugins/r/dialog.result
new file mode 100644
index 00000000..b0acc311
--- /dev/null
+++ b/mysql-test/suite/plugins/r/dialog.result
@@ -0,0 +1,27 @@
+install plugin three_attempts soname 'dialog_examples.so';
+create user test_dialog identified via three_attempts using 'SECRET';
+GRANT SELECT ON test.* TO test_dialog;
+#
+# -pSECRET is picked up, no questions asked.
+#
+select user(), current_user();
+user() current_user()
+test_dialog@localhost test_dialog@%
+#
+# without -p. up to three questions are asked on the stdin.
+# athentication is successful, the correct pasword is on the third line
+#
+Password, please: ***
+Password, please: ****
+Password, please: ******
+select user(), current_user();
+user() current_user()
+test_dialog@localhost test_dialog@%
+#
+# athentication is unsuccessful, first three lines are all wrong
+#
+Password, please: ***
+Password, please: ****
+Password, please: *****
+drop user test_dialog;
+uninstall plugin three_attempts;
diff --git a/mysql-test/suite/plugins/r/false_dupes-6543.result b/mysql-test/suite/plugins/r/false_dupes-6543.result
new file mode 100644
index 00000000..22accaaa
--- /dev/null
+++ b/mysql-test/suite/plugins/r/false_dupes-6543.result
@@ -0,0 +1,5 @@
+install soname 'ha_federated';
+install soname 'ha_federated';
+install soname 'ha_federatedx';
+ERROR HY000: Function 'FEDERATED' already exists
+uninstall soname 'ha_federated';
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_install.result b/mysql-test/suite/plugins/r/feedback_plugin_install.result
new file mode 100644
index 00000000..d2291f20
--- /dev/null
+++ b/mysql-test/suite/plugins/r/feedback_plugin_install.result
@@ -0,0 +1,16 @@
+install plugin feedback soname 'feedback.so';
+select plugin_status from information_schema.plugins where plugin_name='feedback';
+plugin_status
+ACTIVE
+select * from information_schema.feedback where variable_name like 'feed%'
+ and variable_name not like '%_uid'
+ and variable_name not like '%debug%';
+VARIABLE_NAME VARIABLE_VALUE
+FEEDBACK used 2
+FEEDBACK version 1.1
+FEEDBACK_HTTP_PROXY
+FEEDBACK_SEND_RETRY_WAIT 60
+FEEDBACK_SEND_TIMEOUT 60
+FEEDBACK_URL http://feedback.mariadb.org/rest/v1/post
+FEEDBACK_USER_INFO mysql-test
+uninstall plugin feedback;
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_load.result b/mysql-test/suite/plugins/r/feedback_plugin_load.result
new file mode 100644
index 00000000..23376c68
--- /dev/null
+++ b/mysql-test/suite/plugins/r/feedback_plugin_load.result
@@ -0,0 +1,42 @@
+select plugin_status from information_schema.plugins where plugin_name='feedback';
+plugin_status
+ACTIVE
+SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+SELECT variable_value = @feedback_used + 1 as 'MUST BE 1' FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+MUST BE 1
+1
+select * from information_schema.feedback where variable_name like 'feed%'
+ and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used'
+ and variable_name not like '%debug%';
+VARIABLE_NAME VARIABLE_VALUE
+FEEDBACK version 1.1
+FEEDBACK_HTTP_PROXY
+FEEDBACK_SEND_RETRY_WAIT 60
+FEEDBACK_SEND_TIMEOUT 60
+FEEDBACK_URL http://feedback.mariadb.org/rest/v1/post
+FEEDBACK_USER_INFO mysql-test
+SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK
+WHERE VARIABLE_NAME LIKE 'Collation used %'
+ORDER BY VARIABLE_NAME;
+VARIABLE_VALUE>0 VARIABLE_NAME
+1 Collation used binary
+1 Collation used latin1_swedish_ci
+1 Collation used utf8mb3_bin
+1 Collation used utf8mb3_general_ci
+1 Collation used utf8mb4_bin
+prepare stmt from "SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK WHERE VARIABLE_NAME LIKE 'Collation used %' ORDER BY VARIABLE_NAME";
+execute stmt;
+VARIABLE_VALUE>0 VARIABLE_NAME
+1 Collation used binary
+1 Collation used latin1_swedish_ci
+1 Collation used utf8mb3_bin
+1 Collation used utf8mb3_general_ci
+1 Collation used utf8mb4_bin
+execute stmt;
+VARIABLE_VALUE>0 VARIABLE_NAME
+1 Collation used binary
+1 Collation used latin1_swedish_ci
+1 Collation used utf8mb3_bin
+1 Collation used utf8mb3_general_ci
+1 Collation used utf8mb4_bin
+deallocate prepare stmt;
diff --git a/mysql-test/suite/plugins/r/feedback_plugin_send.result b/mysql-test/suite/plugins/r/feedback_plugin_send.result
new file mode 100644
index 00000000..1f753997
--- /dev/null
+++ b/mysql-test/suite/plugins/r/feedback_plugin_send.result
@@ -0,0 +1,46 @@
+select plugin_status from information_schema.plugins where plugin_name='feedback';
+plugin_status
+ACTIVE
+SELECT variable_value INTO @feedback_used FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+SELECT variable_value = @feedback_used + 1 as 'MUST BE 1' FROM information_schema.feedback where variable_name = 'FEEDBACK used';
+MUST BE 1
+1
+select * from information_schema.feedback where variable_name like 'feed%'
+ and variable_name not like '%_uid' and variable_name not like 'FEEDBACK used'
+ and variable_name not like '%debug%';
+VARIABLE_NAME VARIABLE_VALUE
+FEEDBACK version 1.1
+FEEDBACK_HTTP_PROXY
+FEEDBACK_SEND_RETRY_WAIT 60
+FEEDBACK_SEND_TIMEOUT 60
+FEEDBACK_URL http://feedback.mariadb.org/rest/v1/post
+FEEDBACK_USER_INFO mysql-test
+SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK
+WHERE VARIABLE_NAME LIKE 'Collation used %'
+ORDER BY VARIABLE_NAME;
+VARIABLE_VALUE>0 VARIABLE_NAME
+1 Collation used binary
+1 Collation used latin1_swedish_ci
+1 Collation used utf8mb3_bin
+1 Collation used utf8mb3_general_ci
+1 Collation used utf8mb4_bin
+prepare stmt from "SELECT VARIABLE_VALUE>0, VARIABLE_NAME FROM INFORMATION_SCHEMA.FEEDBACK WHERE VARIABLE_NAME LIKE 'Collation used %' ORDER BY VARIABLE_NAME";
+execute stmt;
+VARIABLE_VALUE>0 VARIABLE_NAME
+1 Collation used binary
+1 Collation used latin1_swedish_ci
+1 Collation used utf8mb3_bin
+1 Collation used utf8mb3_general_ci
+1 Collation used utf8mb4_bin
+execute stmt;
+VARIABLE_VALUE>0 VARIABLE_NAME
+1 Collation used binary
+1 Collation used latin1_swedish_ci
+1 Collation used utf8mb3_bin
+1 Collation used utf8mb3_general_ci
+1 Collation used utf8mb4_bin
+deallocate prepare stmt;
+set global sql_mode=ONLY_FULL_GROUP_BY;
+# restart
+feedback plugin: report to 'http://feedback.mariadb.org/rest/v1/post' was sent
+feedback plugin: server replied 'ok'
diff --git a/mysql-test/suite/plugins/r/fulltext_plugin.result b/mysql-test/suite/plugins/r/fulltext_plugin.result
new file mode 100644
index 00000000..2c104c98
--- /dev/null
+++ b/mysql-test/suite/plugins/r/fulltext_plugin.result
@@ -0,0 +1,7 @@
+INSTALL PLUGIN simple_parser SONAME 'mypluglib.so';
+CREATE TABLE t1(a TEXT, b TEXT, FULLTEXT(a) WITH PARSER simple_parser);
+ALTER TABLE t1 ADD FULLTEXT(b) WITH PARSER simple_parser;
+DROP TABLE t1;
+UNINSTALL PLUGIN simple_parser;
+show status like 'a%status';
+Variable_name Value
diff --git a/mysql-test/suite/plugins/r/locales.result b/mysql-test/suite/plugins/r/locales.result
new file mode 100644
index 00000000..de71d954
--- /dev/null
+++ b/mysql-test/suite/plugins/r/locales.result
@@ -0,0 +1,255 @@
+SET names utf8;
+select * from information_schema.locales;
+ID NAME DESCRIPTION MAX_MONTH_NAME_LENGTH MAX_DAY_NAME_LENGTH DECIMAL_POINT THOUSAND_SEP ERROR_MESSAGE_LANGUAGE
+0 en_US English - United States 9 9 . , english
+1 en_GB English - United Kingdom 9 9 . , english
+2 ja_JP Japanese - Japan 3 3 . , japanese
+3 sv_SE Swedish - Sweden 9 7 , swedish
+4 de_DE German - Germany 9 10 , . german
+5 fr_FR French - France 9 8 , french
+6 ar_AE Arabic - United Arab Emirates 6 8 . , english
+7 ar_BH Arabic - Bahrain 6 8 . , english
+8 ar_JO Arabic - Jordan 12 8 . , english
+9 ar_SA Arabic - Saudi Arabia 12 8 . english
+10 ar_SY Arabic - Syria 12 8 . , english
+11 be_BY Belarusian - Belarus 10 10 , . english
+12 bg_BG Bulgarian - Bulgaria 9 10 , english
+13 ca_ES Catalan - Catalan 8 9 , english
+14 cs_CZ Czech - Czech Republic 8 7 , czech
+15 da_DK Danish - Denmark 9 7 , . danish
+16 de_AT German - Austria 9 10 , german
+17 es_ES Spanish - Spain 10 9 , . spanish
+18 et_EE Estonian - Estonia 9 9 , estonian
+19 eu_ES Basque - Basque 9 10 , english
+20 fi_FI Finnish - Finland 9 11 , english
+21 fo_FO Faroese - Faroe Islands 9 12 , . english
+22 gl_ES Galician - Galician 8 8 , english
+23 gu_IN Gujarati - India 10 8 . , english
+24 he_IL Hebrew - Israel 7 5 . , english
+25 hi_IN Hindi - India 7 9 . , hindi
+26 hr_HR Croatian - Croatia 8 11 , english
+27 hu_HU Hungarian - Hungary 10 9 , . hungarian
+28 id_ID Indonesian - Indonesia 9 6 , . english
+29 is_IS Icelandic - Iceland 9 12 , . english
+30 it_CH Italian - Switzerland 9 9 , ' italian
+31 ko_KR Korean - Korea 3 3 . , korean
+32 lt_LT Lithuanian - Lithuania 9 14 , . english
+33 lv_LV Latvian - Latvia 10 11 , english
+34 mk_MK Macedonian - FYROM 9 10 , english
+35 mn_MN Mongolia - Mongolian 18 6 , . english
+36 ms_MY Malay - Malaysia 9 6 . , english
+37 nb_NO Norwegian(Bokml) - Norway 9 7 , . norwegian
+38 nl_NL Dutch - The Netherlands 9 9 , dutch
+39 pl_PL Polish - Poland 11 12 , polish
+40 pt_BR Portuguese - Brazil 9 7 , portuguese
+41 pt_PT Portuguese - Portugal 9 7 , portuguese
+42 ro_RO Romanian - Romania 10 8 , . romanian
+43 ru_RU Russian - Russia 8 11 , russian
+44 ru_UA Russian - Ukraine 8 11 , . russian
+45 sk_SK Slovak - Slovakia 9 8 , slovak
+46 sl_SI Slovenian - Slovenia 9 10 , english
+47 sq_AL Albanian - Albania 7 10 , . english
+48 sr_RS Serbian - Serbia 9 10 . serbian
+49 ta_IN Tamil - India 10 8 . , english
+50 te_IN Telugu - India 10 9 . , english
+51 th_TH Thai - Thailand 10 8 . , english
+52 tr_TR Turkish - Türkiye 7 9 , . english
+53 uk_UA Ukrainian - Ukraine 8 9 , . ukrainian
+54 ur_PK Urdu - Pakistan 6 6 . , english
+55 vi_VN Vietnamese - Vietnam 16 11 , . english
+56 zh_CN Chinese - Peoples Republic of China 3 3 . , chinese
+57 zh_TW Chinese - Taiwan 3 2 . , english
+58 ar_DZ Arabic - Algeria 6 8 . , english
+59 ar_EG Arabic - Egypt 6 8 . , english
+60 ar_IN Arabic - Iran 6 8 . , english
+61 ar_IQ Arabic - Iraq 6 8 . , english
+62 ar_KW Arabic - Kuwait 6 8 . , english
+63 ar_LB Arabic - Lebanon 12 8 . , english
+64 ar_LY Arabic - Libya 6 8 . , english
+65 ar_MA Arabic - Morocco 6 8 . , english
+66 ar_OM Arabic - Oman 6 8 . , english
+67 ar_QA Arabic - Qatar 6 8 . , english
+68 ar_SD Arabic - Sudan 6 8 . , english
+69 ar_TN Arabic - Tunisia 6 8 . , english
+70 ar_YE Arabic - Yemen 6 8 . , english
+71 de_BE German - Belgium 9 10 , . german
+72 de_CH German - Switzerland 9 10 . ' german
+73 de_LU German - Luxembourg 9 10 , . german
+74 en_AU English - Australia 9 9 . , english
+75 en_CA English - Canada 9 9 . , english
+76 en_IN English - India 9 9 . , english
+77 en_NZ English - New Zealand 9 9 . , english
+78 en_PH English - Philippines 9 9 . , english
+79 en_ZA English - South Africa 9 9 . , english
+80 en_ZW English - Zimbabwe 9 9 . , english
+81 es_AR Spanish - Argentina 10 9 , . spanish
+82 es_BO Spanish - Bolivia 10 9 , . spanish
+83 es_CL Spanish - Chile 10 9 , . spanish
+84 es_CO Spanish - Columbia 10 9 , . spanish
+85 es_CR Spanish - Costa Rica 10 9 , spanish
+86 es_DO Spanish - Dominican Republic 10 9 . , spanish
+87 es_EC Spanish - Ecuador 10 9 , . spanish
+88 es_GT Spanish - Guatemala 10 9 . , spanish
+89 es_HN Spanish - Honduras 10 9 . , spanish
+90 es_MX Spanish - Mexico 10 9 . , spanish
+91 es_NI Spanish - Nicaragua 10 9 . , spanish
+92 es_PA Spanish - Panama 10 9 . , spanish
+93 es_PE Spanish - Peru 10 9 . , spanish
+94 es_PR Spanish - Puerto Rico 10 9 . , spanish
+95 es_PY Spanish - Paraguay 10 9 , . spanish
+96 es_SV Spanish - El Salvador 10 9 . , spanish
+97 es_US Spanish - United States 10 9 . , spanish
+98 es_UY Spanish - Uruguay 10 9 , . spanish
+99 es_VE Spanish - Venezuela 10 9 , . spanish
+100 fr_BE French - Belgium 9 8 , . french
+101 fr_CA French - Canada 9 8 , french
+102 fr_CH French - Switzerland 9 8 , french
+103 fr_LU French - Luxembourg 9 8 , french
+104 it_IT Italian - Italy 9 9 , italian
+105 nl_BE Dutch - Belgium 9 9 , . dutch
+106 no_NO Norwegian - Norway 9 7 , . norwegian
+107 sv_FI Swedish - Finland 9 7 , swedish
+108 zh_HK Chinese - Hong Kong SAR 3 3 . , english
+109 el_GR Greek - Greece 11 9 , . greek
+110 rm_CH Romansh - Switzerland 9 9 , ' english
+111 ka_GE Georgian - Georgia 10 9 , georgian
+show locales;
+Id Name Description Error_Message_Language
+0 en_US English - United States english
+1 en_GB English - United Kingdom english
+2 ja_JP Japanese - Japan japanese
+3 sv_SE Swedish - Sweden swedish
+4 de_DE German - Germany german
+5 fr_FR French - France french
+6 ar_AE Arabic - United Arab Emirates english
+7 ar_BH Arabic - Bahrain english
+8 ar_JO Arabic - Jordan english
+9 ar_SA Arabic - Saudi Arabia english
+10 ar_SY Arabic - Syria english
+11 be_BY Belarusian - Belarus english
+12 bg_BG Bulgarian - Bulgaria english
+13 ca_ES Catalan - Catalan english
+14 cs_CZ Czech - Czech Republic czech
+15 da_DK Danish - Denmark danish
+16 de_AT German - Austria german
+17 es_ES Spanish - Spain spanish
+18 et_EE Estonian - Estonia estonian
+19 eu_ES Basque - Basque english
+20 fi_FI Finnish - Finland english
+21 fo_FO Faroese - Faroe Islands english
+22 gl_ES Galician - Galician english
+23 gu_IN Gujarati - India english
+24 he_IL Hebrew - Israel english
+25 hi_IN Hindi - India hindi
+26 hr_HR Croatian - Croatia english
+27 hu_HU Hungarian - Hungary hungarian
+28 id_ID Indonesian - Indonesia english
+29 is_IS Icelandic - Iceland english
+30 it_CH Italian - Switzerland italian
+31 ko_KR Korean - Korea korean
+32 lt_LT Lithuanian - Lithuania english
+33 lv_LV Latvian - Latvia english
+34 mk_MK Macedonian - FYROM english
+35 mn_MN Mongolia - Mongolian english
+36 ms_MY Malay - Malaysia english
+37 nb_NO Norwegian(Bokml) - Norway norwegian
+38 nl_NL Dutch - The Netherlands dutch
+39 pl_PL Polish - Poland polish
+40 pt_BR Portuguese - Brazil portuguese
+41 pt_PT Portuguese - Portugal portuguese
+42 ro_RO Romanian - Romania romanian
+43 ru_RU Russian - Russia russian
+44 ru_UA Russian - Ukraine russian
+45 sk_SK Slovak - Slovakia slovak
+46 sl_SI Slovenian - Slovenia english
+47 sq_AL Albanian - Albania english
+48 sr_RS Serbian - Serbia serbian
+49 ta_IN Tamil - India english
+50 te_IN Telugu - India english
+51 th_TH Thai - Thailand english
+52 tr_TR Turkish - Türkiye english
+53 uk_UA Ukrainian - Ukraine ukrainian
+54 ur_PK Urdu - Pakistan english
+55 vi_VN Vietnamese - Vietnam english
+56 zh_CN Chinese - Peoples Republic of China chinese
+57 zh_TW Chinese - Taiwan english
+58 ar_DZ Arabic - Algeria english
+59 ar_EG Arabic - Egypt english
+60 ar_IN Arabic - Iran english
+61 ar_IQ Arabic - Iraq english
+62 ar_KW Arabic - Kuwait english
+63 ar_LB Arabic - Lebanon english
+64 ar_LY Arabic - Libya english
+65 ar_MA Arabic - Morocco english
+66 ar_OM Arabic - Oman english
+67 ar_QA Arabic - Qatar english
+68 ar_SD Arabic - Sudan english
+69 ar_TN Arabic - Tunisia english
+70 ar_YE Arabic - Yemen english
+71 de_BE German - Belgium german
+72 de_CH German - Switzerland german
+73 de_LU German - Luxembourg german
+74 en_AU English - Australia english
+75 en_CA English - Canada english
+76 en_IN English - India english
+77 en_NZ English - New Zealand english
+78 en_PH English - Philippines english
+79 en_ZA English - South Africa english
+80 en_ZW English - Zimbabwe english
+81 es_AR Spanish - Argentina spanish
+82 es_BO Spanish - Bolivia spanish
+83 es_CL Spanish - Chile spanish
+84 es_CO Spanish - Columbia spanish
+85 es_CR Spanish - Costa Rica spanish
+86 es_DO Spanish - Dominican Republic spanish
+87 es_EC Spanish - Ecuador spanish
+88 es_GT Spanish - Guatemala spanish
+89 es_HN Spanish - Honduras spanish
+90 es_MX Spanish - Mexico spanish
+91 es_NI Spanish - Nicaragua spanish
+92 es_PA Spanish - Panama spanish
+93 es_PE Spanish - Peru spanish
+94 es_PR Spanish - Puerto Rico spanish
+95 es_PY Spanish - Paraguay spanish
+96 es_SV Spanish - El Salvador spanish
+97 es_US Spanish - United States spanish
+98 es_UY Spanish - Uruguay spanish
+99 es_VE Spanish - Venezuela spanish
+100 fr_BE French - Belgium french
+101 fr_CA French - Canada french
+102 fr_CH French - Switzerland french
+103 fr_LU French - Luxembourg french
+104 it_IT Italian - Italy italian
+105 nl_BE Dutch - Belgium dutch
+106 no_NO Norwegian - Norway norwegian
+107 sv_FI Swedish - Finland swedish
+108 zh_HK Chinese - Hong Kong SAR english
+109 el_GR Greek - Greece greek
+110 rm_CH Romansh - Switzerland english
+111 ka_GE Georgian - Georgia georgian
+show locales like '%spanish%';
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'like '%spanish%'' at line 1
+show locales where description like '%spanish%';
+Id Name Description Error_Message_Language
+17 es_ES Spanish - Spain spanish
+81 es_AR Spanish - Argentina spanish
+82 es_BO Spanish - Bolivia spanish
+83 es_CL Spanish - Chile spanish
+84 es_CO Spanish - Columbia spanish
+85 es_CR Spanish - Costa Rica spanish
+86 es_DO Spanish - Dominican Republic spanish
+87 es_EC Spanish - Ecuador spanish
+88 es_GT Spanish - Guatemala spanish
+89 es_HN Spanish - Honduras spanish
+90 es_MX Spanish - Mexico spanish
+91 es_NI Spanish - Nicaragua spanish
+92 es_PA Spanish - Panama spanish
+93 es_PE Spanish - Peru spanish
+94 es_PR Spanish - Puerto Rico spanish
+95 es_PY Spanish - Paraguay spanish
+96 es_SV Spanish - El Salvador spanish
+97 es_US Spanish - United States spanish
+98 es_UY Spanish - Uruguay spanish
+99 es_VE Spanish - Venezuela spanish
+flush locales;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'locales' at line 1
diff --git a/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result b/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result
new file mode 100644
index 00000000..82d464e3
--- /dev/null
+++ b/mysql-test/suite/plugins/r/max_password_errors_auth_named_pipe.result
@@ -0,0 +1,12 @@
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'named_pipe';
+set global max_password_errors=1;
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser,,,,,PIPE;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser,,,,,PIPE;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result b/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result
new file mode 100644
index 00000000..eb7cb641
--- /dev/null
+++ b/mysql-test/suite/plugins/r/max_password_errors_auth_socket.result
@@ -0,0 +1,12 @@
+set @old_max_password_errors=@@max_password_errors;
+create user nosuchuser identified with 'unix_socket';
+set global max_password_errors=1;
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+connect(localhost,nosuchuser,,test,MASTER_PORT,MASTER_SOCKET);
+connect pipe_con,localhost,nosuchuser;
+ERROR 28000: Access denied for user 'nosuchuser'@'localhost'
+DROP USER nosuchuser;
+FLUSH PRIVILEGES;
+set global max_password_errors=@old_max_password_errors;
diff --git a/mysql-test/suite/plugins/r/multiauth.result b/mysql-test/suite/plugins/r/multiauth.result
new file mode 100644
index 00000000..e506e3f8
--- /dev/null
+++ b/mysql-test/suite/plugins/r/multiauth.result
@@ -0,0 +1,220 @@
+install soname 'auth_ed25519';
+create user 'USER' identified via unix_socket OR mysql_native_password as password("GOOD");
+grant select on test.* to 'USER' ;
+create user mysqltest1 identified via unix_socket OR mysql_native_password as password("good");
+grant select on test.* to mysqltest1;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E'
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+drop user 'USER', mysqltest1;
+create user 'USER' identified via mysql_native_password as password("GOOD") OR unix_socket;
+grant select on test.* to 'USER' ;
+create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
+grant select on test.* to mysqltest1;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR unix_socket
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
+drop user 'USER', mysqltest1;
+create user 'USER' identified via unix_socket OR ed25519 as password("GOOD");
+grant select on test.* to 'USER' ;
+create user mysqltest1 identified via unix_socket OR ed25519 as password("good");
+grant select on test.* to mysqltest1;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+drop user 'USER', mysqltest1;
+create user 'USER' identified via ed25519 as password("GOOD") OR unix_socket;
+grant select on test.* to 'USER' ;
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket;
+grant select on test.* to mysqltest1;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
+drop user 'USER', mysqltest1;
+create user 'USER' identified via ed25519 as password("GOOD") OR unix_socket OR mysql_native_password as password("works");
+grant select on test.* to 'USER' ;
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+grant select on test.* to mysqltest1;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match, password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, second password works = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# name does not match, password bad = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+drop user 'USER', mysqltest1;
+create user mysqltest1 identified via mysql_native_password as password("good") OR mysql_native_password as password("works");
+grant select on test.* to mysqltest1;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+# password good = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# second password works = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+# password bad = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+drop user mysqltest1;
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+show grants for mysqltest1;
+Grants for mysqltest1@%
+GRANT USAGE ON *.* TO `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+select json_detailed(priv) from mysql.global_priv where user='mysqltest1';
+json_detailed(priv)
+{
+ "access": 0,
+ "version_id": VERSION_ID,
+ "plugin": "mysql_native_password",
+ "authentication_string": "*7D8C3DF236D9163B6C274A9D47704BC496988460",
+ "auth_or":
+ [
+ {
+ "plugin": "ed25519",
+ "authentication_string": "F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc"
+ },
+ {
+ "plugin": "unix_socket"
+ },
+ {
+ }
+ ],
+ "password_last_changed": #
+}
+select password,plugin,authentication_string from mysql.user where user='mysqltest1';
+Password plugin authentication_string
+*7D8C3DF236D9163B6C274A9D47704BC496988460 mysql_native_password *7D8C3DF236D9163B6C274A9D47704BC496988460
+flush privileges;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+set password for mysqltest1 = password('foobar');
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'qv2mG6HWCuy32Slb5xhV4THStewNz2VINVPbgk+XAJ8' OR unix_socket OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+alter user mysqltest1 identified via unix_socket OR mysql_native_password as password("some");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971'
+set password for mysqltest1 = password('foobar');
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA unix_socket OR mysql_native_password USING '*9B500343BC52E2911172EB52AE5CF4847604C6E5'
+alter user mysqltest1 identified via unix_socket;
+set password for mysqltest1 = password('bla');
+ERROR HY000: SET PASSWORD is ignored for users authenticating via unix_socket plugin
+alter user mysqltest1 identified via mysql_native_password as password("some") or unix_socket;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*BFE3F4604CFD21E6595080A261D92EF0183B5971' OR unix_socket
+drop user mysqltest1;
+# switching from mysql.global_priv to mysql.user
+create user mysqltest1 identified via ed25519 as password("good") OR unix_socket OR mysql_native_password as password("works");
+ERROR HY000: Column count of mysql.user is wrong. Expected 3, found 47. Created with MariaDB XX.YY.ZZ, now running XX.YY.ZZ. Please use mariadb-upgrade to fix this error
+# switching back from mysql.user to mysql.global_priv
+create user 'USER' identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
+grant select on test.* to 'USER' ;
+create user mysqltest1 identified via mysql_native_password as '1234567890123456789012345678901234567890a' OR unix_socket;
+grant select on test.* to mysqltest1;
+update mysql.global_priv set priv=replace(priv, '1234567890123456789012345678901234567890a', 'invalid password');
+flush privileges;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING 'invalid password' OR unix_socket
+# name match = ok
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+# name does not match = failure
+mysqltest: Could not open connection 'default': 1698 Access denied for user 'mysqltest1'@'localhost'
+# SET PASSWORD helps
+set password for mysqltest1 = password('bla');
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+drop user 'USER', mysqltest1;
+create user mysqltest1 identified via ed25519 as password("good");
+grant select on test.* to mysqltest1;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc'
+# no plugin = failure
+mysqltest: Could not open connection 'default': 1045 Plugin client_ed25519 could not be loaded: no such file
+alter user mysqltest1 identified via ed25519 as password("good") OR mysql_native_password as password("works");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA ed25519 USING 'F4aF8bw7130VaRbdLCl4f/P/wkjDmgJXwWvpJ5gmsZc' OR mysql_native_password USING '*7D8C3DF236D9163B6C274A9D47704BC496988460'
+# no plugin = failure
+mysqltest: Could not open connection 'default': 1045 Access denied for user 'mysqltest1'@'localhost' (using password: YES)
+# no plugin, second password works = ok
+select user(), current_user(), database();
+user() current_user() database()
+mysqltest1@localhost mysqltest1@% test
+drop user mysqltest1;
+uninstall soname 'auth_ed25519';
+create user mysqltest1 identified via mysql_native_password as password("good") OR unix_socket;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED VIA mysql_native_password USING '*8409037B3E362D6DAE24C8E667F4D3B66716144E' OR unix_socket
+alter user mysqltest1 identified via mysql_native_password as password("better");
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED BY PASSWORD '*6E6CABC9967AB586F009616BA69DAC2953849C88'
+flush privileges;
+show create user mysqltest1;
+CREATE USER for mysqltest1@%
+CREATE USER `mysqltest1`@`%` IDENTIFIED BY PASSWORD '*6E6CABC9967AB586F009616BA69DAC2953849C88'
+drop user mysqltest1;
diff --git a/mysql-test/suite/plugins/r/pam.result b/mysql-test/suite/plugins/r/pam.result
new file mode 100644
index 00000000..ceb81690
--- /dev/null
+++ b/mysql-test/suite/plugins/r/pam.result
@@ -0,0 +1,115 @@
+install plugin pam soname 'auth_pam.so';
+create user test_pam identified via pam using 'mariadb_mtr';
+grant all on test.* to test_pam;
+create user pam_test;
+grant all on test.* to pam_test;
+grant proxy on pam_test to test_pam;
+#
+# athentication is successful, challenge/pin are ok
+# note that current_user() differs from user()
+#
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9225
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9224
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: ****************
+Now, the magic number!
+PIN: 616
+#
+# athentication is successful
+#
+Now, the magic number!
+PIN: 9212
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+#
+# athentication is unsuccessful
+#
+Now, the magic number!
+PIN: 9212
+#
+# MDEV-26339 Account specifics to be handled before proxying
+#
+alter user pam_test account lock;
+alter user pam_test require subject 'foobar';
+alter user pam_test password expire;
+Now, the magic number!
+PIN: 9212
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+alter user pam_test account unlock;
+alter user pam_test require none;
+alter user pam_test identified by '';
+show create user pam_test;
+CREATE USER for pam_test@%
+CREATE USER `pam_test`@`%`
+alter user test_pam account lock;
+Now, the magic number!
+PIN: 9212
+alter user test_pam account unlock;
+alter user test_pam require subject 'foobar';
+Now, the magic number!
+PIN: 9212
+alter user test_pam require none;
+alter user test_pam password expire;
+Now, the magic number!
+PIN: 9212
+select user(), current_user(), database();
+drop user test_pam;
+drop user pam_test;
+create user PAM_TEST identified via pam using 'mariadb_mtr';
+grant all on test.* to PAM_TEST;
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9225
+set global pam_winbind_workaround=1;
+#
+# athentication is successful
+#
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9225
+select user(), current_user(), database();
+user() current_user() database()
+PAM_TEST@localhost PAM_TEST@% test
+drop user PAM_TEST;
+#
+# MDEV-27341 Use SET PASSWORD to change PAM service
+#
+create user pam_test identified via pam using 'mariadb_mtr';
+grant all on test.* to pam_test;
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9225
+select user(), current_user(), database();
+user() current_user() database()
+pam_test@localhost pam_test@% test
+set password='foo';
+ERROR HY000: SET PASSWORD is ignored for users authenticating via pam plugin
+show create user;
+CREATE USER for pam_test@%
+CREATE USER `pam_test`@`%` IDENTIFIED VIA pam USING 'mariadb_mtr'
+drop user pam_test;
+uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/r/pam_cleartext.result b/mysql-test/suite/plugins/r/pam_cleartext.result
new file mode 100644
index 00000000..6a4d21ed
--- /dev/null
+++ b/mysql-test/suite/plugins/r/pam_cleartext.result
@@ -0,0 +1,23 @@
+install plugin pam soname 'auth_pam.so';
+create user test_pam identified via pam using 'mariadb_mtr';
+grant all on test.* to test_pam;
+create user pam_test;
+grant all on test.* to pam_test;
+grant proxy on pam_test to test_pam;
+show variables like 'pam_use_%';
+Variable_name Value
+pam_use_cleartext_plugin ON
+#
+# same test as in pam.test now fails
+#
+#
+# success
+#
+user() current_user() database()
+test_pam@localhost pam_test@% NULL
+#
+# failure
+#
+drop user test_pam;
+drop user pam_test;
+uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/r/pam_v1.result b/mysql-test/suite/plugins/r/pam_v1.result
new file mode 100644
index 00000000..c90d1718
--- /dev/null
+++ b/mysql-test/suite/plugins/r/pam_v1.result
@@ -0,0 +1,40 @@
+install plugin pam soname 'auth_pam_v1.so';
+create user test_pam identified via pam using 'mariadb_mtr';
+grant all on test.* to test_pam;
+create user pam_test;
+grant all on test.* to pam_test;
+grant proxy on pam_test to test_pam;
+#
+# athentication is successful, challenge/pin are ok
+# note that current_user() differs from user()
+#
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9225
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+#
+# athentication is unsuccessful
+#
+Challenge input first.
+Enter: *************************
+Now, the magic number!
+PIN: 9224
+#
+# athentication is successful
+#
+Now, the magic number!
+PIN: 9212
+select user(), current_user(), database();
+user() current_user() database()
+test_pam@localhost pam_test@% test
+#
+# athentication is unsuccessful
+#
+Now, the magic number!
+PIN: 9212
+drop user test_pam;
+drop user pam_test;
+uninstall plugin pam;
diff --git a/mysql-test/suite/plugins/r/password_reuse_check.result b/mysql-test/suite/plugins/r/password_reuse_check.result
new file mode 100644
index 00000000..72f3dd53
--- /dev/null
+++ b/mysql-test/suite/plugins/r/password_reuse_check.result
@@ -0,0 +1,94 @@
+install soname "password_reuse_check";
+set global password_reuse_check_interval= 0;
+# Default value (sould be unlimited i.e. 0)
+SHOW GLOBAL VARIABLES like "password_reuse_check%";
+Variable_name Value
+password_reuse_check_interval 0
+# insert user
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
+show warnings;
+Level Code Message
+Warning 1819 password_reuse_check: The password was already used
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+alter user user_name@localhost identified by 'test_pwd';
+ERROR HY000: Operation ALTER USER failed for 'user_name'@'localhost'
+show warnings;
+Level Code Message
+Warning 1819 password_reuse_check: The password was already used
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+Error 1396 Operation ALTER USER failed for 'user_name'@'localhost'
+# check exparation
+set global password_reuse_check_interval= 10;
+alter user user_name@localhost identified by 'test_pwd';
+ERROR HY000: Operation ALTER USER failed for 'user_name'@'localhost'
+show warnings;
+Level Code Message
+Warning 1819 password_reuse_check: The password was already used
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+Error 1396 Operation ALTER USER failed for 'user_name'@'localhost'
+select hex(hash) from mysql.password_reuse_check_history;
+hex(hash)
+B9F970DE4DA0145F842526C1BC9DBBBDB3EF80FDD7BE98061DAE3D18F492AA37668C07322DD21650C66B48FC78F0EAF6CB08245CC895BFDC43BE6921B07E5240
+# emulate old password
+update mysql.password_reuse_check_history set time= date_sub(now(), interval
+11 day);
+alter user user_name@localhost identified by 'test_pwd';
+show warnings;
+Level Code Message
+drop user user_name@localhost;
+show create table mysql.password_reuse_check_history;
+Table Create Table
+password_reuse_check_history CREATE TABLE `password_reuse_check_history` (
+ `hash` binary(64) NOT NULL,
+ `time` timestamp NOT NULL DEFAULT current_timestamp(),
+ PRIMARY KEY (`hash`),
+ KEY `tm` (`time`)
+) ENGINE=Aria DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci PAGE_CHECKSUM=1
+select count(*) from mysql.password_reuse_check_history;
+count(*)
+1
+drop table mysql.password_reuse_check_history;
+# test error messages
+set global password_reuse_check_interval= 0;
+drop table if exists mysql.password_reuse_check_history;
+Warnings:
+Note 1051 Unknown table 'mysql.password_reuse_check_history'
+# test error messages
+create table mysql.password_reuse_check_history (wrong_structure int);
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
+show warnings;
+Level Code Message
+Warning 1105 password_reuse_check:[1054] Unknown column 'hash' in 'field list'
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+set global password_reuse_check_interval= 10;
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+ERROR HY000: Your password does not satisfy the current policy requirements (password_reuse_check)
+show warnings;
+Level Code Message
+Warning 1105 password_reuse_check:[1054] Unknown column 'time' in 'where clause'
+Error 1819 Your password does not satisfy the current policy requirements (password_reuse_check)
+drop table mysql.password_reuse_check_history;
+#
+# MDEV-28838: password_reuse_check plugin mixes username and password
+#
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+grant select on *.* to user_nam@localhost identified by 'etest_pwd';
+show warnings;
+Level Code Message
+drop user user_name@localhost;
+drop user user_nam@localhost;
+drop table mysql.password_reuse_check_history;
+grant select on *.* to user_name@localhost identified by 'test_pwd';
+grant select on *.* to tuser_name@localhos identified by 'test_pwd';
+show warnings;
+Level Code Message
+drop user user_name@localhost;
+drop user tuser_name@localhos;
+#
+# End of 10.7 tests
+#
+drop table mysql.password_reuse_check_history;
+uninstall plugin password_reuse_check;
diff --git a/mysql-test/suite/plugins/r/processlist.result b/mysql-test/suite/plugins/r/processlist.result
new file mode 100644
index 00000000..c27534d9
--- /dev/null
+++ b/mysql-test/suite/plugins/r/processlist.result
@@ -0,0 +1,9 @@
+create table t1 (a int) engine=innodb;
+start transaction;
+insert t1 values (1);
+connect con2,localhost,root;
+state from show engine innodb status, must be empty
+
+disconnect con2;
+connection default;
+drop table t1;
diff --git a/mysql-test/suite/plugins/r/qc_info.result b/mysql-test/suite/plugins/r/qc_info.result
new file mode 100644
index 00000000..afab7671
--- /dev/null
+++ b/mysql-test/suite/plugins/r/qc_info.result
@@ -0,0 +1,59 @@
+set @save_query_cache_size=@@global.query_cache_size;
+set global query_cache_type=ON;
+set local query_cache_type=ON;
+set global query_cache_size=1355776;
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+select * from t1;
+a
+1
+2
+3
+select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
+statement_schema statement_text result_blocks_count result_blocks_size
+test select * from t1 1 512
+select @@time_zone into @time_zone;
+select @@default_week_format into @default_week_format;
+select @@character_set_client into @character_set_client;
+select @@character_set_results into @character_set_results;
+select @@sql_mode into @sql_mode;
+select @@div_precision_increment into @div_precision_increment;
+select @@lc_time_names into @lc_time_names;
+select @@max_sort_length into @max_sort_length;
+select @@autocommit into @autocommit;
+select @@group_concat_max_len into @group_concat_max_len;
+select Name into @new_time_zone from mysql.time_zone_name limit 1;
+set time_zone=@new_time_zone,default_week_format=4,character_set_client='binary',character_set_results='utf32',collation_connection='utf32_bin',sql_mode='STRICT_ALL_TABLES',div_precision_increment=7,lc_time_names='ar_SD',autocommit=0, group_concat_max_len=513, max_sort_length=1011;
+select * from t1;
+set time_zone= @time_zone, default_week_format= @default_week_format, character_set_client= @character_set_client,character_set_results= @character_set_results, sql_mode= @sql_mode, div_precision_increment= @div_precision_increment, lc_time_names= @lc_time_names, autocommit= @autocommit, group_concat_max_len= @group_concat_max_len, max_sort_length= @max_sort_length;
+select * from information_schema.query_cache_info;
+STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED LIMIT MAX_SORT_LENGTH GROUP_CONCAT_MAX_LENGTH CHARACTER_SET_CLIENT CHARACTER_SET_RESULT COLLATION TIMEZONE DEFAULT_WEEK_FORMAT DIV_PRECISION_INCREMENT SQL_MODE LC_TIME_NAMES CLIENT_LONG_FLAG CLIENT_PROTOCOL_41 CLIENT_EXTENDED_METADATA PROTOCOL_TYPE MORE_RESULTS_EXISTS IN_TRANS AUTOCOMMIT PACKET_NUMBER HITS
+test select * from t1 1 512 # -1 1011 513 binary utf32 utf32_bin Europe/Moscow 4 7 STRICT_ALL_TABLES ar_SD 1 1 1 # 0 0 0 # 0
+test select * from t1 1 512 # -1 1024 1048576 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 1 # 0 0 1 # 0
+reset query cache;
+select * from t1;
+a
+1
+2
+3
+select * from t1;
+a
+1
+2
+3
+select hits, statement_text from information_schema.query_cache_info;
+hits statement_text
+1 select * from t1
+drop table t1;
+select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
+statement_schema statement_text result_blocks_count result_blocks_size
+set global query_cache_size = 0;
+select * from information_schema.query_cache_info;
+STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED LIMIT MAX_SORT_LENGTH GROUP_CONCAT_MAX_LENGTH CHARACTER_SET_CLIENT CHARACTER_SET_RESULT COLLATION TIMEZONE DEFAULT_WEEK_FORMAT DIV_PRECISION_INCREMENT SQL_MODE LC_TIME_NAMES CLIENT_LONG_FLAG CLIENT_PROTOCOL_41 CLIENT_EXTENDED_METADATA PROTOCOL_TYPE MORE_RESULTS_EXISTS IN_TRANS AUTOCOMMIT PACKET_NUMBER HITS
+set global query_cache_size= default;
+set global query_cache_type=default;
+show query_cache_info;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_info' at line 1
+flush query_cache_info;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'query_cache_info' at line 1
+set @@global.query_cache_size=@save_query_cache_size;
diff --git a/mysql-test/suite/plugins/r/qc_info_priv.result b/mysql-test/suite/plugins/r/qc_info_priv.result
new file mode 100644
index 00000000..ea866d51
--- /dev/null
+++ b/mysql-test/suite/plugins/r/qc_info_priv.result
@@ -0,0 +1,49 @@
+set @save_query_cache_size=@@global.query_cache_size;
+set global query_cache_type=ON;
+set local query_cache_type=ON;
+set global query_cache_size=1355776;
+create table t1 (a int not null);
+insert into t1 values (1),(2),(3);
+select * from t1;
+a
+1
+2
+3
+select statement_schema, statement_text, result_blocks_count, result_blocks_size from information_schema.query_cache_info;
+statement_schema statement_text result_blocks_count result_blocks_size
+test select * from t1 1 512
+select @@time_zone into @time_zone;
+select @@default_week_format into @default_week_format;
+select @@character_set_client into @character_set_client;
+select @@character_set_results into @character_set_results;
+select @@sql_mode into @sql_mode;
+select @@div_precision_increment into @div_precision_increment;
+select @@lc_time_names into @lc_time_names;
+select @@max_sort_length into @max_sort_length;
+select @@autocommit into @autocommit;
+select @@group_concat_max_len into @group_concat_max_len;
+select Name into @new_time_zone from mysql.time_zone_name limit 1;
+set time_zone=@new_time_zone,default_week_format=4,character_set_client='binary',character_set_results='utf32',collation_connection='utf32_bin',sql_mode='STRICT_ALL_TABLES',div_precision_increment=7,lc_time_names='ar_SD',autocommit=0, group_concat_max_len=513, max_sort_length=1011;
+select * from t1;
+set time_zone= @time_zone, default_week_format= @default_week_format, character_set_client= @character_set_client,character_set_results= @character_set_results, sql_mode= @sql_mode, div_precision_increment= @div_precision_increment, lc_time_names= @lc_time_names, autocommit= @autocommit, group_concat_max_len= @group_concat_max_len, max_sort_length= @max_sort_length;
+select * from information_schema.query_cache_info;
+STATEMENT_SCHEMA STATEMENT_TEXT RESULT_BLOCKS_COUNT RESULT_BLOCKS_SIZE RESULT_BLOCKS_SIZE_USED LIMIT MAX_SORT_LENGTH GROUP_CONCAT_MAX_LENGTH CHARACTER_SET_CLIENT CHARACTER_SET_RESULT COLLATION TIMEZONE DEFAULT_WEEK_FORMAT DIV_PRECISION_INCREMENT SQL_MODE LC_TIME_NAMES CLIENT_LONG_FLAG CLIENT_PROTOCOL_41 CLIENT_EXTENDED_METADATA PROTOCOL_TYPE MORE_RESULTS_EXISTS IN_TRANS AUTOCOMMIT PACKET_NUMBER HITS
+test select * from t1 1 512 # -1 1011 513 binary utf32 utf32_bin Europe/Moscow 4 7 STRICT_ALL_TABLES ar_SD 1 1 1 # 0 0 0 # 0
+test select * from t1 1 512 # -1 1024 1048576 latin1 latin1 latin1_swedish_ci SYSTEM 0 4 STRICT_TRANS_TABLES,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION en_US 1 1 1 # 0 0 1 # 0
+create user mysqltest;
+grant select on test.* to mysqltest;
+connect conn1,localhost,mysqltest,,;
+connection conn1;
+select a from t1;
+a
+1
+2
+3
+select count(*) from information_schema.query_cache_info;
+count(*)
+0
+connection default;
+drop user mysqltest;
+drop table t1;
+set @@global.query_cache_size=@save_query_cache_size;
+set global query_cache_type=default;
diff --git a/mysql-test/suite/plugins/r/server_audit.result b/mysql-test/suite/plugins/r/server_audit.result
new file mode 100644
index 00000000..75cefc34
--- /dev/null
+++ b/mysql-test/suite/plugins/r/server_audit.result
@@ -0,0 +1,552 @@
+install plugin server_audit soname 'server_audit';
+show variables like 'server_audit%';
+Variable_name Value
+server_audit_events
+server_audit_excl_users
+server_audit_file_path server_audit.log
+server_audit_file_rotate_now OFF
+server_audit_file_rotate_size 1000000
+server_audit_file_rotations 9
+server_audit_incl_users
+server_audit_logging OFF
+server_audit_mode 0
+server_audit_output_type file
+server_audit_query_log_limit 1024
+server_audit_syslog_facility LOG_USER
+server_audit_syslog_ident mysql-server_auditing
+server_audit_syslog_info
+server_audit_syslog_priority LOG_INFO
+set global server_audit_file_path=null;
+set global server_audit_incl_users=null;
+set global server_audit_file_path='server_audit.log';
+set global server_audit_output_type=file;
+set global server_audit_logging=on;
+set global server_audit_incl_users= repeat("'root',", 10000);
+ERROR 42000: Variable 'server_audit_incl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','...'
+show variables like 'server_audit_incl_users';
+Variable_name Value
+server_audit_incl_users
+set global server_audit_excl_users= repeat("'root',", 10000);
+ERROR 42000: Variable 'server_audit_excl_users' can't be set to the value of ''root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','root','...'
+show variables like 'server_audit_excl_users';
+Variable_name Value
+server_audit_excl_users
+connect con1,localhost,root,,mysql;
+disconnect con1;
+connect(localhost,no_such_user,,mysql,MASTER_PORT,MASTER_SOCKET);
+connect con1,localhost,no_such_user,,mysql;
+ERROR 28000: Access denied for user 'no_such_user'@'localhost' (using password: NO)
+connection default;
+set global server_audit_incl_users='odin, dva, tri';
+create table t1 (id int);
+set global server_audit_incl_users='odin, root, dva, tri';
+create table t2 (id int);
+set global server_audit_excl_users='odin, dva, tri';
+Warnings:
+Warning 1 User 'odin' is in the server_audit_incl_users, so wasn't added.
+Warning 1 User 'dva' is in the server_audit_incl_users, so wasn't added.
+Warning 1 User 'tri' is in the server_audit_incl_users, so wasn't added.
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+set global server_audit_incl_users='odin, root, dva, tri';
+insert into t2 values (1), (2);
+select * from t2;
+id
+1
+2
+alter table t1 rename renamed_t1;
+set global server_audit_events='connect,query';
+select 1,
+2,
+# comment
+3;
+1 2 3
+1 2 3
+insert into t2 values (1), (2);
+select * from t2;
+id
+1
+2
+1
+2
+select * from t_doesnt_exist;
+ERROR 42S02: Table 'test.t_doesnt_exist' doesn't exist
+syntax_error_query;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'syntax_error_query' at line 1
+drop table renamed_t1, t2;
+show variables like 'server_audit%';
+Variable_name Value
+server_audit_events CONNECT,QUERY
+server_audit_excl_users
+server_audit_file_path server_audit.log
+server_audit_file_rotate_now OFF
+server_audit_file_rotate_size 1000000
+server_audit_file_rotations 9
+server_audit_incl_users odin, root, dva, tri
+server_audit_logging ON
+server_audit_mode 0
+server_audit_output_type file
+server_audit_query_log_limit 1024
+server_audit_syslog_facility LOG_USER
+server_audit_syslog_ident mysql-server_auditing
+server_audit_syslog_info
+server_audit_syslog_priority LOG_INFO
+set global server_audit_mode=1;
+set global server_audit_events='';
+create database sa_db;
+connect con1,localhost,root,,test;
+create table t1 (id2 int);
+insert into t1 values (1), (2);
+select * from t1;
+id2
+1
+2
+drop table t1;
+use sa_db;
+create table sa_t1(id int);
+insert into sa_t1 values (1), (2);
+drop table sa_t1;
+drop database sa_db;
+disconnect con1;
+connection default;
+create database sa_db;
+use sa_db;
+CREATE USER u1 IDENTIFIED BY 'pwd-123';
+GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
+SET PASSWORD FOR u1 = PASSWORD('pwd 098');
+CREATE USER u3 IDENTIFIED BY '';
+ALTER USER u3 IDENTIFIED BY 'pwd-456';
+drop user u1, u2, u3;
+set global server_audit_events='query_ddl';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+select 2;
+2
+2
+(select 2);
+2
+2
+/*! select 2*/;
+2
+2
+/*comment*/ select 2;
+2
+2
+drop table t1;
+create procedure pr1() insert into test.t1 values ("foo", 42);
+create function fn1(i int) returns int deterministic return i+1;
+drop procedure pr1;
+drop function fn1;
+set global server_audit_events='query_ddl,query_dml';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+select 2;
+2
+2
+drop table t1;
+set global server_audit_events='query_dml';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+select 2;
+2
+2
+(select 2);
+2
+2
+/*! select 2*/;
+2
+2
+/*comment*/ select 2;
+2
+2
+drop table t1;
+set global server_audit_events='query_dcl';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+CREATE USER u1 IDENTIFIED BY 'pwd-123';
+GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
+SET PASSWORD
+# comment
+FOR u1 = PASSWORD('pwd 098');
+SET PASSWORD FOR u1=<secret>;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '<secret>' at line 1
+CREATE USER u3 IDENTIFIED BY '';
+drop user u1, u2, u3;
+select 2;
+2
+2
+(select 2);
+2
+2
+/*! select 2*/;
+2
+2
+/*comment*/ select 2;
+2
+2
+drop table t1;
+set global server_audit_events='query_dml_no_select';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+select 2;
+2
+2
+drop table t1;
+create procedure pr1() insert into test.t1 values ("foo", 42);
+create function fn1(i int) returns int deterministic return i+1;
+drop procedure pr1;
+drop function fn1;
+create procedure pr1() insert into test.t1 values ("foo", 42);
+create function fn1(i int) returns int deterministic return i+1;
+drop procedure pr1;
+drop function fn1;
+set global server_audit_events='table';
+set global server_audit_incl_users='user1';
+create user user1@localhost;
+grant all on sa_db.* to user1@localhost;
+connect cn1,localhost,user1,,sa_db;
+connection cn1;
+create table t1(id int) engine=myisam;
+insert delayed into t1 values (1);
+connection default;
+# Waiting until INSERT DELAYED thread does the insert.
+drop table t1;
+set global server_audit_logging= off;
+set global server_audit_incl_users='root';
+set global server_audit_logging= on;
+disconnect cn1;
+drop user user1@localhost;
+set global server_audit_events='';
+set global server_audit_incl_users='root, plug_dest';
+CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest';
+CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd';
+connect(localhost,plug,plug_dest,test,MYSQL_PORT,MYSQL_SOCK);
+connect plug_con,localhost,plug,plug_dest;
+ERROR 28000: Access denied for user 'plug'@'localhost' (using password: YES)
+GRANT PROXY ON plug_dest TO plug;
+connect plug_con,localhost,plug,plug_dest,"*NO-ONE*";
+connection plug_con;
+select USER(),CURRENT_USER();
+USER() CURRENT_USER()
+plug@localhost plug_dest@%
+connection default;
+disconnect plug_con;
+DROP USER plug;
+DROP USER plug_dest;
+set global server_audit_query_log_limit= 15;
+select (1), (2), (3), (4);
+1 2 3 4
+1 2 3 4
+select 'A', 'B', 'C', 'D';
+A B C D
+A B C D
+set global server_audit_query_log_limit= 1024;
+drop database sa_db;
+select length('01234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789');
+length('0123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456
+2750
+CREATE TABLE test.t1 (a char(4));
+set sql_mode="";
+insert into test.t1 value("12345");
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+set sql_mode=default;
+drop table test.t1;
+set global server_audit_file_path='.';
+show status like 'server_audit_current_log';
+Variable_name Value
+Server_audit_current_log HOME_DIR/server_audit.log
+set global server_audit_file_path='';
+show status like 'server_audit_current_log';
+Variable_name Value
+Server_audit_current_log server_audit.log
+set global server_audit_file_path=' ';
+show status like 'server_audit_current_log';
+Variable_name Value
+Server_audit_current_log server_audit.log
+set global server_audit_file_path='nonexisting_dir/';
+Warnings:
+Warning 1 SERVER AUDIT plugin can't create file 'nonexisting_dir/'.
+show status like 'server_audit_current_log';
+Variable_name Value
+Server_audit_current_log server_audit.log
+show variables like 'server_audit%';
+Variable_name Value
+server_audit_events
+server_audit_excl_users
+server_audit_file_path
+server_audit_file_rotate_now OFF
+server_audit_file_rotate_size 1000000
+server_audit_file_rotations 9
+server_audit_incl_users root, plug_dest
+server_audit_logging ON
+server_audit_mode 1
+server_audit_output_type file
+server_audit_query_log_limit 1024
+server_audit_syslog_facility LOG_USER
+server_audit_syslog_ident mysql-server_auditing
+server_audit_syslog_info
+server_audit_syslog_priority LOG_INFO
+uninstall plugin server_audit;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_logging=on',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users= repeat("\'root\',", 10000)',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'show variables like \'server_audit_incl_users\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users= repeat("\'root\',", 10000)',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'show variables like \'server_audit_excl_users\'',0
+TIME,HOSTNAME,root,localhost,ID,0,CONNECT,mysql,,0
+TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,mysql,,0
+TIME,HOSTNAME,no_such_user,localhost,ID,0,FAILED_CONNECT,,,ID
+TIME,HOSTNAME,no_such_user,localhost,ID,0,DISCONNECT,,,0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, dva, tri\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t2 (id int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users=\'odin, dva, tri\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'SHOW WARNINGS',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
+TIME,HOSTNAME,root,localhost,ID,ID,ALTER,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'syntax_error_query',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'drop table renamed_t1, t2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'show variables like \'server_audit%\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_mode=1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
+TIME,HOSTNAME,root,localhost,ID,0,CONNECT,test,,0
+TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t1 (id2 int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,DROP,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'drop table t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
+TIME,HOSTNAME,root,localhost,ID,ID,CREATE,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table sa_t1(id int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into sa_t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,DROP,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table sa_t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
+TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'ALTER USER u3 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create procedure pr1() insert into test.t1 values ("foo", 42)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create function fn1(i int) returns int deterministic return i+1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop procedure pr1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop function fn1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select * from t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select 2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select * from t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select 2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'(select 2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*! select 2*/',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD \n# comment\nFOR u1 = PASSWORD(*****)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=<secret>',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,user1,localhost,ID,ID,CREATE,sa_db,t1,
+TIME,HOSTNAME,user1,localhost,ID,ID,WRITE,sa_db,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_logging= off',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_incl_users=\'root, plug_dest\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER plug IDENTIFIED WITH \'test_plugin_server\' AS \'plug_dest\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER plug_dest IDENTIFIED BY *****',0
+TIME,HOSTNAME,plug,localhost,ID,0,FAILED_CONNECT,,,ID
+TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT PROXY ON plug_dest TO plug',0
+TIME,HOSTNAME,plug,localhost,ID,0,CONNECT,,,0
+TIME,HOSTNAME,plug,localhost,ID,0,PROXY_CONNECT,,`plug_dest`@`%`,0
+TIME,HOSTNAME,plug,localhost,ID,ID,QUERY,,'select USER(),CURRENT_USER()',0
+TIME,HOSTNAME,plug,localhost,ID,0,DISCONNECT,,,0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'DROP USER plug',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'DROP USER plug_dest',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select \'A\', ',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_query_log_limit= 1024',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select length(\'012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567',0
+TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE TABLE test.t1 (a char(4))',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set sql_mode=""',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into test.t1 value("12345")',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SHOW WARNINGS',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set sql_mode=default',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,DROP,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table test.t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'.\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'.\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\' \'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\' \'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'nonexisting_dir/\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'nonexisting_dir/\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SHOW WARNINGS',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show variables like \'server_audit%\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,plugin,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'uninstall plugin server_audit',0
+#
+# MDEV-27631 Assertion `global_status_var.global_memory_used == 0' failed in mysqld_exit
+#
+install plugin server_audit soname 'server_audit';
+uninstall plugin server_audit;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
diff --git a/mysql-test/suite/plugins/r/show_all_plugins.result b/mysql-test/suite/plugins/r/show_all_plugins.result
new file mode 100644
index 00000000..ebd5b6cc
--- /dev/null
+++ b/mysql-test/suite/plugins/r/show_all_plugins.result
@@ -0,0 +1,36 @@
+flush status;
+show status like '%libraries%';
+Variable_name Value
+Opened_plugin_libraries 0
+select * from information_schema.all_plugins where plugin_library='ha_example.so';
+PLUGIN_NAME PLUGIN_VERSION PLUGIN_STATUS PLUGIN_TYPE PLUGIN_TYPE_VERSION PLUGIN_LIBRARY PLUGIN_LIBRARY_VERSION PLUGIN_AUTHOR PLUGIN_DESCRIPTION PLUGIN_LICENSE LOAD_OPTION PLUGIN_MATURITY PLUGIN_AUTH_VERSION
+EXAMPLE 0.1 NOT INSTALLED STORAGE ENGINE MYSQL_VERSION_ID ha_example.so 1.15 Brian Aker, MySQL AB Example storage engine GPL OFF Experimental 0.1
+UNUSABLE 3.14 NOT INSTALLED DAEMON MYSQL_VERSION_ID ha_example.so 1.15 Sergei Golubchik Unusable Daemon GPL OFF Experimental 3.14.15.926
+show status like '%libraries%';
+Variable_name Value
+Opened_plugin_libraries 1
+show plugins soname 'ha_example.so';
+Name Status Type Library License
+EXAMPLE NOT INSTALLED STORAGE ENGINE ha_example.so GPL
+UNUSABLE NOT INSTALLED DAEMON ha_example.so GPL
+show status like '%libraries%';
+Variable_name Value
+Opened_plugin_libraries 2
+show plugins soname like '%example%';
+Name Status Type Library License
+EXAMPLE NOT INSTALLED STORAGE ENGINE ha_example.so GPL
+UNUSABLE NOT INSTALLED DAEMON ha_example.so GPL
+daemon_example NOT INSTALLED DAEMON libdaemon_example.so GPL
+example_key_management NOT INSTALLED ENCRYPTION example_key_management.so GPL
+three_attempts NOT INSTALLED AUTHENTICATION dialog_examples.so GPL
+two_questions NOT INSTALLED AUTHENTICATION dialog_examples.so GPL
+show status like '%libraries%';
+Variable_name Value
+Opened_plugin_libraries 7
+show plugins soname where library = 'ha_example.so';
+Name Status Type Library License
+EXAMPLE NOT INSTALLED STORAGE ENGINE ha_example.so GPL
+UNUSABLE NOT INSTALLED DAEMON ha_example.so GPL
+select variable_value > 10 from information_schema.global_status where variable_name like '%libraries%';
+variable_value > 10
+1
diff --git a/mysql-test/suite/plugins/r/simple_password_check.result b/mysql-test/suite/plugins/r/simple_password_check.result
new file mode 100644
index 00000000..0826b7f6
--- /dev/null
+++ b/mysql-test/suite/plugins/r/simple_password_check.result
@@ -0,0 +1,266 @@
+install soname "simple_password_check";
+select * from information_schema.plugins where plugin_name='simple_password_check';
+PLUGIN_NAME simple_password_check
+PLUGIN_VERSION 1.0
+PLUGIN_STATUS ACTIVE
+PLUGIN_TYPE PASSWORD VALIDATION
+PLUGIN_TYPE_VERSION 1.1
+PLUGIN_LIBRARY simple_password_check.so
+PLUGIN_LIBRARY_VERSION 1.15
+PLUGIN_AUTHOR Sergei Golubchik
+PLUGIN_DESCRIPTION Simple password strength checks
+PLUGIN_LICENSE GPL
+LOAD_OPTION ON
+PLUGIN_MATURITY Stable
+PLUGIN_AUTH_VERSION 1.0
+select * from information_schema.system_variables where variable_name like 'simple_password_check%' order by 1;
+VARIABLE_NAME SIMPLE_PASSWORD_CHECK_DIGITS
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Minimal required number of digits
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME SIMPLE_PASSWORD_CHECK_LETTERS_SAME_CASE
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Minimal required number of letters of the same letter case.This limit is applied separately to upper-case and lower-case letters
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME SIMPLE_PASSWORD_CHECK_MINIMAL_LENGTH
+SESSION_VALUE NULL
+GLOBAL_VALUE 8
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 8
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Minimal required password length
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
+VARIABLE_NAME SIMPLE_PASSWORD_CHECK_OTHER_CHARACTERS
+SESSION_VALUE NULL
+GLOBAL_VALUE 1
+GLOBAL_VALUE_ORIGIN COMPILE-TIME
+DEFAULT_VALUE 1
+VARIABLE_SCOPE GLOBAL
+VARIABLE_TYPE INT UNSIGNED
+VARIABLE_COMMENT Minimal required number of other (not letters or digits) characters
+NUMERIC_MIN_VALUE 0
+NUMERIC_MAX_VALUE 1000
+NUMERIC_BLOCK_SIZE 1
+ENUM_VALUE_LIST NULL
+READ_ONLY NO
+COMMAND_LINE_ARGUMENT REQUIRED
+GLOBAL_VALUE_PATH NULL
+create user foo1 identified by 'pwd';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Too short password (< 8)
+Warning 1819 simple_password_check: Not enough upper case letters (< 1)
+Warning 1819 simple_password_check: Not enough digits (< 1)
+Warning 1819 simple_password_check: Not enough special characters (< 1)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
+create user foo1;
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
+grant select on *.* to foo1 identified by 'pwd';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Too short password (< 8)
+Warning 1819 simple_password_check: Not enough upper case letters (< 1)
+Warning 1819 simple_password_check: Not enough digits (< 1)
+Warning 1819 simple_password_check: Not enough special characters (< 1)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+grant select on *.* to `FooBar1!` identified by 'FooBar1!';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+grant select on *.* to `BarFoo1!` identified by 'FooBar1!';
+drop user `BarFoo1!`;
+create user foo1 identified by 'aA.12345';
+grant select on *.* to foo1;
+drop user foo1;
+set global simple_password_check_digits=3;
+set global simple_password_check_letters_same_case=3;
+Warnings:
+Warning 1292 Adjusted the value of simple_password_check_minimal_length from 8 to 10
+set global simple_password_check_other_characters=3;
+Warnings:
+Warning 1292 Adjusted the value of simple_password_check_minimal_length from 10 to 12
+show variables like 'simple_password_check_%';
+Variable_name Value
+simple_password_check_digits 3
+simple_password_check_letters_same_case 3
+simple_password_check_minimal_length 12
+simple_password_check_other_characters 3
+create user foo1 identified by '123:qwe:ASD!';
+drop user foo1;
+create user foo1 identified by '-23:qwe:ASD!';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough digits (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
+create user foo1 identified by '123:4we:ASD!';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough lower case letters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
+create user foo1 identified by '123:qwe:4SD!';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough upper case letters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
+create user foo1 identified by '123:qwe:ASD4';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough special characters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo1'@'%'
+create user foo1 identified by '123:qwe:ASD!';
+set password for foo1 = password('qwe:-23:ASD!');
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough digits (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+set password for foo1 = old_password('4we:123:ASD!');
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+set password for foo1 = password('qwe:123:4SD!');
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough upper case letters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+set password for foo1 = old_password('qwe:123:ASD4');
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough special characters (< 3)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+set password for foo1 = password('qwe:123:ASD!');
+select @@strict_password_validation;
+@@strict_password_validation
+1
+set password for foo1 = '';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+set password for foo1 = '2222222222222222';
+ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
+set password for foo1 = '11111111111111111111111111111111111111111';
+ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
+create user foo2 identified by password '11111111111111111111111111111111111111111';
+ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
+grant select on *.* to foo2 identified by password '2222222222222222';
+ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
+create user foo2 identified with mysql_native_password using '11111111111111111111111111111111111111111';
+ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
+grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222';
+ERROR HY000: The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement
+create user foo2 identified with mysql_native_password using '';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+Error 1396 Operation CREATE USER failed for 'foo2'@'%'
+grant select on *.* to foo2 identified with mysql_old_password using '';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+grant select on *.* to foo2 identified with mysql_old_password;
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+update mysql.global_priv set priv=json_set(priv, '$.authentication_string', 'xxx') where user='foo1';
+set global strict_password_validation=0;
+set password for foo1 = '';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: The password equal to the user name
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+set password for foo1 = '2222222222222222';
+set password for foo1 = '11111111111111111111111111111111111111111';
+create user foo2 identified by password '11111111111111111111111111111111111111111';
+drop user foo2;
+grant select on *.* to foo2 identified by password '2222222222222222';
+drop user foo2;
+create user foo2 identified with mysql_native_password using '11111111111111111111111111111111111111111';
+drop user foo2;
+grant select on *.* to foo2 identified with mysql_old_password using '2222222222222222';
+drop user foo2;
+set global strict_password_validation=1;
+drop user foo1;
+create role r1;
+drop role r1;
+flush privileges;
+uninstall plugin simple_password_check;
+create user foo1 identified by 'pwd';
+drop user foo1;
+#
+# MDEV-26650: Failed ALTER USER/GRANT statement removes the
+# password from the cache
+#
+create user foo1@localhost identified by '<GDFH:3ghj';
+show grants for foo1@localhost;
+Grants for foo1@localhost
+GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
+install soname "simple_password_check";
+ALTER USER foo1@localhost identified by 'foo1';
+ERROR HY000: Operation ALTER USER failed for 'foo1'@'localhost'
+show grants for foo1@localhost;
+Grants for foo1@localhost
+GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
+flush privileges;
+show grants for foo1@localhost;
+Grants for foo1@localhost
+GRANT USAGE ON *.* TO `foo1`@`localhost` IDENTIFIED BY PASSWORD '*1D62FA326F98258451ED56A404F15452423DCC1D'
+drop user foo1@localhost;
+uninstall plugin simple_password_check;
+#
+# MDEV-22418 mysqladmin wrong error with simple_password_check
+#
+install soname "simple_password_check";
+MARIADB-ADMIN: unable to change password; error: 'The MariaDB server is running with the --strict-password-validation option so it cannot execute this statement'
+# All done
+uninstall plugin simple_password_check;
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/suite/plugins/r/sql_error_log.result b/mysql-test/suite/plugins/r/sql_error_log.result
new file mode 100644
index 00000000..0329949a
--- /dev/null
+++ b/mysql-test/suite/plugins/r/sql_error_log.result
@@ -0,0 +1,67 @@
+drop procedure if exists test_error;
+drop table if exists t1;
+install plugin SQL_ERROR_LOG soname 'sql_errlog';
+show variables like 'sql_error_log%';
+Variable_name Value
+sql_error_log_filename sql_errors.log
+sql_error_log_rate 1
+sql_error_log_rotate OFF
+sql_error_log_rotations 9
+sql_error_log_size_limit 1000000
+sql_error_log_warnings ON
+set global sql_error_log_rate=1;
+select * from t_doesnt_exist;
+ERROR 42S02: Table 'test.t_doesnt_exist' doesn't exist
+syntax_error_query;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'syntax_error_query' at line 1
+CREATE PROCEDURE test_error()
+BEGIN
+DECLARE CONTINUE HANDLER
+FOR 1146
+BEGIN
+RESIGNAL SQLSTATE '40000' SET
+MYSQL_ERRNO = 1000,
+MESSAGE_TEXT = 'new message';
+END;
+SELECT `c` FROM `temptab`;
+END|
+CALL test_error();
+ERROR 40000: new message
+drop procedure test_error;
+SET SQL_MODE = STRICT_ALL_TABLES;
+create table t1(id int);
+insert into t1 values ('aa');
+ERROR 22007: Incorrect integer value: 'aa' for column `test`.`t1`.`id` at row 1
+SET SQL_MODE = '';
+drop table t1;
+SELECT TABLE_NAME FROM information_schema.TABLES WHERE TABLE_SCHEMA = 'not_exists' AND TABLE_NAME = 'not_exists';
+TABLE_NAME
+CREATE procedure e1()
+BEGIN
+START TRANSACTION;
+INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */;
+COMMIT;
+END|
+CALL e1();
+ERROR 42S02: Table 'test.non_exists' doesn't exist
+DROP PROCEDURE e1;
+CREATE TABLE t1 (a char(4));
+set sql_mode="";
+insert into t1 value("12345");
+Warnings:
+Warning 1265 Data truncated for column 'a' at row 1
+set sql_mode=default;
+drop table t1;
+uninstall plugin SQL_ERROR_LOG;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+TIME HOSTNAME ERROR 1146: Table 'test.t_doesnt_exist' doesn't exist : select * from t_doesnt_exist
+TIME HOSTNAME ERROR 1064: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'syntax_error_query' at line 1 : syntax_error_query
+TIME HOSTNAME ERROR 1146: Table 'test.temptab' doesn't exist : SELECT `c` FROM `temptab`
+TIME HOSTNAME ERROR 1000: new message : RESIGNAL SQLSTATE '40000' SET
+MYSQL_ERRNO = 1000,
+MESSAGE_TEXT = 'new message'
+TIME HOSTNAME ERROR 1366: Incorrect integer value: 'aa' for column `test`.`t1`.`id` at row 1 : insert into t1 values ('aa')
+TIME HOSTNAME ERROR 1146: Table 'test.non_exists' doesn't exist : INSERT INTO test.non_exists VALUES (0,0,0) /* e1 */
+TIME HOSTNAME WARNING 1265: Data truncated for column 'a' at row 1 : insert into t1 value("12345")
+TIME HOSTNAME WARNING 1620: Plugin is busy and will be uninstalled on shutdown : uninstall plugin SQL_ERROR_LOG
diff --git a/mysql-test/suite/plugins/r/test_sql_service.result b/mysql-test/suite/plugins/r/test_sql_service.result
new file mode 100644
index 00000000..2983da28
--- /dev/null
+++ b/mysql-test/suite/plugins/r/test_sql_service.result
@@ -0,0 +1,100 @@
+reset master;
+install plugin test_sql_service soname 'test_sql_service';
+show status like 'test_sql_service_passed';
+Variable_name Value
+Test_sql_service_passed 1
+set global test_sql_service_execute_sql_global= 'create table test.t1 select 1 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_local= 'insert into test.t1 select 2 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET SQL_LOG_BIN=1';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 3 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET SQL_LOG_BIN=0';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 4 as a, @@SQL_LOG_BIN';
+set global test_sql_service_execute_sql_global= 'SET sql_auto_is_null=1';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 5 as a, @@sql_auto_is_null';
+set global test_sql_service_execute_sql_global= 'SET sql_auto_is_null=0';
+set global test_sql_service_execute_sql_global= 'insert into test.t1 select 6 as a, @@sql_auto_is_null';
+select * from t1 order by a;
+a @@SQL_LOG_BIN
+1 0
+2 0
+3 1
+4 0
+5 1
+6 0
+drop table t1;
+SET SQL_LOG_BIN=0;
+set global test_sql_service_run_test= 1;
+show status like 'test_sql_service_passed';
+Variable_name Value
+Test_sql_service_passed 1
+set global test_sql_service_execute_sql_local= 'create table test.t1(id int)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 0 rows.
+set global test_sql_service_execute_sql_local= 'insert into test.t1 values (1), (2)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 2 rows.
+set global test_sql_service_execute_sql_local= 'select * from test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 2 rows.
+set global test_sql_service_execute_sql_local= 'drop table test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 0 rows.
+set global test_sql_service_execute_sql_local= 'drop table test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Error 1051 returned. Unknown table 'test.t1'
+set global test_sql_service_execute_sql_global= 'create table test.t1(id int)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 0 rows.
+set global test_sql_service_execute_sql_global= 'insert into test.t1 values (1), (2)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 2 rows.
+set global test_sql_service_execute_sql_global= 'select * from test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 2 rows.
+set global test_sql_service_execute_sql_global= 'drop table test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query affected 0 rows.
+set global test_sql_service_execute_sql_global= 'drop table test.t1';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Error 1051 returned. Unknown table 'test.t1'
+create table t1 (id int, time timestamp not null default now());
+insert into t1 values (1, NULL), (2, NULL), (3, NULL), (4, NULL), (5, NULL);
+set global test_sql_service_execute_sql_global= 'select * FROM test.t1 WHERE time < DATE_SUB(NOW(), interval 5 minute)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 0 rows.
+set global test_sql_service_execute_sql_global= 'select * FROM test.t1 WHERE time <= NOW()';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 5 rows.
+set global test_sql_service_execute_sql_local= 'select * FROM test.t1 WHERE time < DATE_SUB(NOW(), interval 5 minute)';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 0 rows.
+set global test_sql_service_execute_sql_local= 'select * FROM test.t1 WHERE time <= NOW()';
+show status like 'test_sql_query_result';
+Variable_name Value
+Test_sql_query_result Query returned 5 rows.
+drop table t1;
+uninstall plugin test_sql_service;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+include/show_binlog_events.inc
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000001 # Gtid # # BEGIN GTID #-#-#
+master-bin.000001 # Annotate_rows # # insert into test.t1 select 3 as a, @@SQL_LOG_BIN
+master-bin.000001 # Table_map # # table_id: # (test.t1)
+master-bin.000001 # Write_rows_v1 # # table_id: # flags: STMT_END_F
+master-bin.000001 # Query # # COMMIT
+master-bin.000001 # Gtid # # GTID #-#-#
+master-bin.000001 # Query # # use `test`; DROP TABLE `t1` /* generated by server */
diff --git a/mysql-test/suite/plugins/r/thread_pool_server_audit.result b/mysql-test/suite/plugins/r/thread_pool_server_audit.result
new file mode 100644
index 00000000..8c6ece53
--- /dev/null
+++ b/mysql-test/suite/plugins/r/thread_pool_server_audit.result
@@ -0,0 +1,392 @@
+install plugin server_audit soname 'server_audit';
+show variables like 'server_audit%';
+Variable_name Value
+server_audit_events
+server_audit_excl_users
+server_audit_file_path server_audit.log
+server_audit_file_rotate_now OFF
+server_audit_file_rotate_size 1000000
+server_audit_file_rotations 9
+server_audit_incl_users
+server_audit_logging OFF
+server_audit_mode 0
+server_audit_output_type file
+server_audit_query_log_limit 1024
+server_audit_syslog_facility LOG_USER
+server_audit_syslog_ident mysql-server_auditing
+server_audit_syslog_info
+server_audit_syslog_priority LOG_INFO
+set global server_audit_file_path=null;
+set global server_audit_incl_users=null;
+set global server_audit_file_path='server_audit.log';
+set global server_audit_output_type=file;
+set global server_audit_logging=on;
+connect con1,localhost,root,,mysql;
+connection default;
+disconnect con1;
+connect(localhost,no_such_user,,mysql,MASTER_PORT,MASTER_SOCKET);
+connect con1,localhost,no_such_user,,mysql;
+ERROR 28000: Access denied for user 'no_such_user'@'localhost' (using password: NO)
+connection default;
+set global server_audit_incl_users='odin, dva, tri';
+create table t1 (id int);
+set global server_audit_incl_users='odin, root, dva, tri';
+create table t2 (id int);
+set global server_audit_excl_users='odin, dva, tri';
+Warnings:
+Warning 1 User 'odin' is in the server_audit_incl_users, so wasn't added.
+Warning 1 User 'dva' is in the server_audit_incl_users, so wasn't added.
+Warning 1 User 'tri' is in the server_audit_incl_users, so wasn't added.
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+set global server_audit_incl_users='odin, root, dva, tri';
+insert into t2 values (1), (2);
+select * from t2;
+id
+1
+2
+alter table t1 rename renamed_t1;
+set global server_audit_events='connect,query';
+select 1,
+2,
+# comment
+3;
+1 2 3
+1 2 3
+insert into t2 values (1), (2);
+select * from t2;
+id
+1
+2
+1
+2
+select * from t_doesnt_exist;
+ERROR 42S02: Table 'test.t_doesnt_exist' doesn't exist
+syntax_error_query;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'syntax_error_query' at line 1
+drop table renamed_t1, t2;
+show variables like 'server_audit%';
+Variable_name Value
+server_audit_events CONNECT,QUERY
+server_audit_excl_users
+server_audit_file_path server_audit.log
+server_audit_file_rotate_now OFF
+server_audit_file_rotate_size 1000000
+server_audit_file_rotations 9
+server_audit_incl_users odin, root, dva, tri
+server_audit_logging ON
+server_audit_mode 0
+server_audit_output_type file
+server_audit_query_log_limit 1024
+server_audit_syslog_facility LOG_USER
+server_audit_syslog_ident mysql-server_auditing
+server_audit_syslog_info
+server_audit_syslog_priority LOG_INFO
+set global server_audit_mode=1;
+set global server_audit_events='';
+create database sa_db;
+connect con1,localhost,root,,test;
+connection con1;
+create table t1 (id2 int);
+insert into t1 values (1), (2);
+select * from t1;
+id2
+1
+2
+drop table t1;
+use sa_db;
+create table sa_t1(id int);
+insert into sa_t1 values (1), (2);
+drop table sa_t1;
+drop database sa_db;
+connection default;
+disconnect con1;
+create database sa_db;
+use sa_db;
+CREATE USER u1 IDENTIFIED BY 'pwd-123';
+GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
+SET PASSWORD FOR u1 = PASSWORD('pwd 098');
+CREATE USER u3 IDENTIFIED BY '';
+drop user u1, u2, u3;
+set global server_audit_events='query_ddl';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+select 2;
+2
+2
+(select 2);
+2
+2
+/*! select 2*/;
+2
+2
+/*comment*/ select 2;
+2
+2
+drop table t1;
+set global server_audit_events='query_ddl,query_dml';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+select 2;
+2
+2
+drop table t1;
+set global server_audit_events='query_dml';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+select 2;
+2
+2
+(select 2);
+2
+2
+/*! select 2*/;
+2
+2
+/*comment*/ select 2;
+2
+2
+drop table t1;
+set global server_audit_events='query_dcl';
+create table t1(id int);
+insert into t1 values (1), (2);
+select * from t1;
+id
+1
+2
+CREATE USER u1 IDENTIFIED BY 'pwd-123';
+GRANT ALL ON sa_db TO u2 IDENTIFIED BY "pwd-321";
+SET PASSWORD
+# comment
+FOR u1 = PASSWORD('pwd 098');
+SET PASSWORD FOR u1=<secret>;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near '<secret>' at line 1
+CREATE USER u3 IDENTIFIED BY '';
+drop user u1, u2, u3;
+select 2;
+2
+2
+(select 2);
+2
+2
+/*! select 2*/;
+2
+2
+/*comment*/ select 2;
+2
+2
+drop table t1;
+set global server_audit_events='';
+set global server_audit_query_log_limit= 15;
+select (1), (2), (3), (4);
+1 2 3 4
+1 2 3 4
+select 'A', 'B', 'C', 'D';
+A B C D
+A B C D
+set global server_audit_query_log_limit= 1024;
+drop database sa_db;
+set global server_audit_file_path='.';
+show status like 'server_audit_current_log';
+Variable_name Value
+Server_audit_current_log HOME_DIR/server_audit.log
+set global server_audit_file_path='';
+show status like 'server_audit_current_log';
+Variable_name Value
+Server_audit_current_log server_audit.log
+set global server_audit_file_path=' ';
+show status like 'server_audit_current_log';
+Variable_name Value
+Server_audit_current_log server_audit.log
+set global server_audit_file_path='nonexisting_dir/';
+Warnings:
+Warning 1 SERVER AUDIT plugin can't create file 'nonexisting_dir/'.
+show status like 'server_audit_current_log';
+Variable_name Value
+Server_audit_current_log server_audit.log
+show variables like 'server_audit%';
+Variable_name Value
+server_audit_events
+server_audit_excl_users
+server_audit_file_path
+server_audit_file_rotate_now OFF
+server_audit_file_rotate_size 1000000
+server_audit_file_rotations 9
+server_audit_incl_users odin, root, dva, tri
+server_audit_logging ON
+server_audit_mode 1
+server_audit_output_type file
+server_audit_query_log_limit 1024
+server_audit_syslog_facility LOG_USER
+server_audit_syslog_ident mysql-server_auditing
+server_audit_syslog_info
+server_audit_syslog_priority LOG_INFO
+uninstall plugin server_audit;
+Warnings:
+Warning 1620 Plugin is busy and will be uninstalled on shutdown
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_logging=on',0
+TIME,HOSTNAME,root,localhost,ID,0,CONNECT,mysql,,0
+TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,mysql,,0
+TIME,HOSTNAME,no_such_user,localhost,ID,0,FAILED_CONNECT,,,ID
+TIME,HOSTNAME,no_such_user,localhost,ID,0,DISCONNECT,,,0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, dva, tri\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t2 (id int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_excl_users=\'odin, dva, tri\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'SHOW WARNINGS',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_incl_users=\'odin, root, dva, tri\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t2,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
+TIME,HOSTNAME,root,localhost,ID,ID,ALTER,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,RENAME,test,t1|test.renamed_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'alter table t1 rename renamed_t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'connect,query\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select 1,\n2,\n# comment\n3',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t2 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t_doesnt_exist',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'syntax_error_query',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'drop table renamed_t1, t2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'show variables like \'server_audit%\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_mode=1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'set global server_audit_events=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
+TIME,HOSTNAME,root,localhost,ID,0,CONNECT,test,,0
+TIME,HOSTNAME,root,localhost,ID,ID,CREATE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create table t1 (id2 int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'select * from t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,DROP,test,t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'drop table t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
+TIME,HOSTNAME,root,localhost,ID,ID,CREATE,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table sa_t1(id int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into sa_t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,table_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,column_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,index_stats,
+TIME,HOSTNAME,root,localhost,ID,ID,DROP,sa_db,sa_t1,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table sa_t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
+TIME,HOSTNAME,root,localhost,ID,0,DISCONNECT,,,0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,test,'create database sa_db',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'use sa_db',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1 = PASSWORD(*****)',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,db,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,tables_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,columns_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,procs_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proxies_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,roles_mapping,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,global_priv,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'create table t1(id int)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select * from t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select 2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop table t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'insert into t1 values (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select * from t1',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select 2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'(select 2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*! select 2*/',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'/*comment*/ select 2',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u1 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'GRANT ALL ON sa_db TO u2 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD\n# comment\nFOR u1 = PASSWORD(*****)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SET PASSWORD FOR u1=<secret>',ID
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'CREATE USER u3 IDENTIFIED BY *****',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop user u1, u2, u3',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_events=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global serv',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select (1), (2)',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'select \'A\', ',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_query_log_limit= 1024',0
+TIME,HOSTNAME,root,localhost,ID,ID,READ,mysql,proc,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,proc,
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,event,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'drop database sa_db',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'.\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'.\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\' \'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\' \'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'nonexisting_dir/\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'set global server_audit_file_path=\'nonexisting_dir/\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'SHOW WARNINGS',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show status like \'server_audit_current_log\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'show variables like \'server_audit%\'',0
+TIME,HOSTNAME,root,localhost,ID,ID,WRITE,mysql,plugin,
+TIME,HOSTNAME,root,localhost,ID,ID,QUERY,sa_db,'uninstall plugin server_audit',0
diff --git a/mysql-test/suite/plugins/r/two_password_validations.result b/mysql-test/suite/plugins/r/two_password_validations.result
new file mode 100644
index 00000000..4bd674ba
--- /dev/null
+++ b/mysql-test/suite/plugins/r/two_password_validations.result
@@ -0,0 +1,23 @@
+install soname "simple_password_check";
+grant select on *.* to Fff_fff1 identified by '1fff_ffF';
+drop user Fff_fff1;
+install soname "cracklib_password_check";
+grant select on *.* to foobar identified by 'q$%^&*R1234ty';
+drop user foobar;
+grant select on *.* to Fff_fff1 identified by '1fff_ffF';
+ERROR HY000: Your password does not satisfy the current policy requirements (cracklib_password_check)
+show warnings;
+Level Code Message
+Warning 1819 cracklib: it does not contain enough DIFFERENT characters
+Error 1819 Your password does not satisfy the current policy requirements (cracklib_password_check)
+grant select on *.* to foobar identified by 'q-%^&*rty';
+ERROR HY000: Your password does not satisfy the current policy requirements (simple_password_check)
+show warnings;
+Level Code Message
+Warning 1819 simple_password_check: Not enough upper case letters (< 1)
+Warning 1819 simple_password_check: Not enough digits (< 1)
+Error 1819 Your password does not satisfy the current policy requirements (simple_password_check)
+uninstall plugin simple_password_check;
+grant select on *.* to foobar identified by 'q-%^&*rty';
+drop user foobar;
+uninstall plugin cracklib_password_check;
diff --git a/mysql-test/suite/plugins/r/unix_socket.result b/mysql-test/suite/plugins/r/unix_socket.result
new file mode 100644
index 00000000..81fef9f7
--- /dev/null
+++ b/mysql-test/suite/plugins/r/unix_socket.result
@@ -0,0 +1,31 @@
+#
+# with named user
+#
+create user 'USER' identified via unix_socket;
+grant select on test.* to 'USER';
+#
+# name match = ok
+#
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost USER@% test
+#
+# name does not match = failure
+#
+drop user 'USER';
+#
+# and now with anonymous user
+#
+grant SELECT ON test.* TO '' identified via unix_socket;
+#
+# name match = ok
+#
+select user(), current_user(), database();
+user() current_user() database()
+USER@localhost @% test
+#
+# name does not match = failure
+#
+delete from mysql.user where user='';
+FLUSH PRIVILEGES;
+delete from mysql.db;