summaryrefslogtreecommitdiffstats
path: root/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-13 12:24:36 +0000
commit06eaf7232e9a920468c0f8d74dcf2fe8b555501c (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
parentInitial commit. (diff)
downloadmariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.tar.xz
mariadb-06eaf7232e9a920468c0f8d74dcf2fe8b555501c.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/suite/funcs_1/datadict/basics_mixed1.inc')
-rw-r--r--mysql-test/suite/funcs_1/datadict/basics_mixed1.inc49
1 files changed, 49 insertions, 0 deletions
diff --git a/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc b/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
new file mode 100644
index 00000000..ba51bfce
--- /dev/null
+++ b/mysql-test/suite/funcs_1/datadict/basics_mixed1.inc
@@ -0,0 +1,49 @@
+# suite/funcs_1/datadict/basics_mixed1.inc
+#
+# Auxiliary script to be sourced by suite/funcs_1/t/is_basics_mixed.test
+#
+# Author:
+# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
+# testsuite funcs_1
+# Create this script based on older scripts and new code.
+#
+
+# 1 Attempt to create tables and views when residing in information_schema
+# 1.1 CREATE TABLE
+USE information_schema;
+let $message= root: create a table with a name of an IS table directly in IS;
+let $dd_part1= CREATE TABLE;
+let $dd_part2= ( c1 INT );
+--source suite/funcs_1/datadict/basics_mixed2.inc
+--error ER_DBACCESS_DENIED_ERROR
+CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
+#
+# 1.2 CREATE VIEW
+# 1.2.1 Hit on existing INFORMATION_SCHEMA table
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW tables AS SELECT 'garbage';
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW tables AS SELECT * FROM information_schema.tables;
+# 1.2.2 New view
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW v1 AS SELECT 'garbage';
+
+# 2 Attempt to create tables and views when residing in information_schema
+# 1.1 CREATE TABLE
+USE test;
+let $message= root: create a table with a name of an IS table from other db;
+let $dd_part1= CREATE TABLE information_schema.;
+let $dd_part2= ( c1 INT );
+--source suite/funcs_1/datadict/basics_mixed2.inc
+--error ER_DBACCESS_DENIED_ERROR
+CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
+#
+# Hit on existing INFORMATION_SCHEMA table
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW information_schema.tables AS SELECT 'garbage';
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW information_schema.tables AS
+SELECT * FROM information_schema.tables;
+# New table
+--error ER_DBACCESS_DENIED_ERROR
+CREATE VIEW information_schema.v1 AS SELECT 'garbage';