summaryrefslogtreecommitdiff
path: root/mysql-test/main/grant5.test
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2020-07-23 16:17:59 +0200
committerSergei Golubchik <serg@mariadb.org>2020-07-31 09:00:05 +0200
commit78f09b12d368b7b01e9dc09f84c19b3a3d6bad91 (patch)
tree215eb3008da9ba8123840b0e0d0830e4168420c7 /mysql-test/main/grant5.test
parenta874b6c4459a2dd028d6c4a15e43eeb556183de0 (diff)
downloadmariadb-git-78f09b12d368b7b01e9dc09f84c19b3a3d6bad91.tar.gz
MDEV-23009 SIGSEGV in get_field from acl_load (on optimized builds)
Classes that handle privilege tables (like Tables_priv_table) could read some columns conditionally but they expect a certain minimal number of colunms always to exist. Add a check for a minimal required number of columns in privilege tables, don't use a table that has fewer columns than required.
Diffstat (limited to 'mysql-test/main/grant5.test')
-rw-r--r--mysql-test/main/grant5.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/main/grant5.test b/mysql-test/main/grant5.test
index 39fcff92435..054b16c0a6e 100644
--- a/mysql-test/main/grant5.test
+++ b/mysql-test/main/grant5.test
@@ -199,4 +199,14 @@ delete from db.t1 returning *;
drop database db;
drop user foo;
+#
+# MDEV-23009 SIGSEGV in get_field from acl_load (on optimized builds)
+#
+call mtr.add_suppression('mysql.host table is damaged');
+create table mysql.host (c1 int);
+insert mysql.host values (1);
+--error ER_UNKNOWN_ERROR
+flush privileges;
+drop table mysql.host;
+
--echo # End of 10.4 tests