summaryrefslogtreecommitdiff
path: root/mysql-test/suite/funcs_1
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2019-09-10 17:31:10 +0200
committerSergei Golubchik <serg@mariadb.org>2019-10-28 08:17:56 +0100
commitc075c7a861e4d6062d02ac07fe496f9021601b50 (patch)
treea5c0c153ec03fab9f9d5af47c00873214f1ee47d /mysql-test/suite/funcs_1
parentbe780c05559731e09aed2e8a06f93a72d5d51b7f (diff)
downloadmariadb-git-c075c7a861e4d6062d02ac07fe496f9021601b50.tar.gz
MDEV-20549 SQL SECURITY DEFINER does not work for INFORMATION_SCHEMA tables
switch to definer privileges when populating I_S tables
Diffstat (limited to 'mysql-test/suite/funcs_1')
-rw-r--r--mysql-test/suite/funcs_1/r/is_basics_mixed.result2
-rw-r--r--mysql-test/suite/funcs_1/t/is_basics_mixed.test5
2 files changed, 4 insertions, 3 deletions
diff --git a/mysql-test/suite/funcs_1/r/is_basics_mixed.result b/mysql-test/suite/funcs_1/r/is_basics_mixed.result
index 2d14ada4f89..770435475a3 100644
--- a/mysql-test/suite/funcs_1/r/is_basics_mixed.result
+++ b/mysql-test/suite/funcs_1/r/is_basics_mixed.result
@@ -337,7 +337,7 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE
SELECT * FROM information_schema.schema_privileges
WHERE table_schema = 'information_schema';
GRANTEE TABLE_CATALOG TABLE_SCHEMA PRIVILEGE_TYPE IS_GRANTABLE
-CREATE VIEW db_datadict.v2 AS
+CREATE SQL SECURITY INVOKER VIEW db_datadict.v2 AS
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM information_schema.tables WHERE table_schema = 'db_datadict';
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
diff --git a/mysql-test/suite/funcs_1/t/is_basics_mixed.test b/mysql-test/suite/funcs_1/t/is_basics_mixed.test
index c0b03a84478..2bbd751a010 100644
--- a/mysql-test/suite/funcs_1/t/is_basics_mixed.test
+++ b/mysql-test/suite/funcs_1/t/is_basics_mixed.test
@@ -281,8 +281,9 @@ WHERE table_schema = 'information_schema';
# 2. This user (testuser1) is also able to GRANT the SELECT privilege
# on this VIEW to another user (testuser2).
# 3. The other user (testuser2) must be able to SELECT on this VIEW
-# but gets a different result set than testuser1.
-CREATE VIEW db_datadict.v2 AS
+# but gets a different result set than testuser1, if the view
+# has SQL SECURITY INVOKER.
+CREATE SQL SECURITY INVOKER VIEW db_datadict.v2 AS
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE
FROM information_schema.tables WHERE table_schema = 'db_datadict';
SELECT TABLE_SCHEMA,TABLE_NAME,TABLE_TYPE