summaryrefslogtreecommitdiff
path: root/mysql-test/main/grant4.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/grant4.test')
-rw-r--r--mysql-test/main/grant4.test35
1 files changed, 34 insertions, 1 deletions
diff --git a/mysql-test/main/grant4.test b/mysql-test/main/grant4.test
index 2715b7c7145..a63bd158a0d 100644
--- a/mysql-test/main/grant4.test
+++ b/mysql-test/main/grant4.test
@@ -145,6 +145,38 @@ disconnect con1;
drop database mysqltest_db1;
drop user mysqltest_u1@localhost;
+#
+# MDEV-18241 Downgrade from 10.4 to 10.3 crashes
+#
+source include/switch_to_mysql_user.inc;
+call mtr.add_suppression("Table 'mysql.user' doesn't exist");
+call mtr.add_suppression("'mysql.user' is not of type 'TABLE'");
+rename table mysql.user to mysql.user1;
+create view mysql.user as select * from mysql.user1;
+--error ER_WRONG_OBJECT
+flush privileges;
+drop view mysql.user;
+create temporary table mysql.user select * from mysql.user1 limit 0;
+--error ER_NO_SUCH_TABLE
+flush privileges;
+drop temporary table mysql.user;
+rename table mysql.user1 to mysql.user;
+source include/switch_to_mysql_global_priv.inc;
+
+#
+# Bug#28986737: RENAMING AND REPLACING MYSQL.USER TABLE CAN LEAD TO A SERVER CRASH
+#
+source include/switch_to_mysql_user.inc;
+call mtr.add_suppression('mysql.user table is damaged');
+rename table mysql.user to mysql.user1;
+create table mysql.user (Host char(100), User char(100));
+--error ER_UNKNOWN_ERROR
+flush privileges;
+drop table mysql.user;
+rename table mysql.user1 to mysql.user;
+source include/switch_to_mysql_global_priv.inc;
+
+--echo End of 5.5 tests
--echo #
--echo # Additional coverage for refactoring which is made as part
@@ -233,5 +265,6 @@ create user foo3 identified via mysql_old_password using '00';
--error ER_PASSWD_LENGTH
create user foo4 identified via mysql_old_password using '11111111111111111111111111111111111111111';
-
set GLOBAL sql_mode=default;
+
+--echo End of 10.1 tests