MySQL 5.6.14 Source Code Document
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
basics_mixed1.inc
1 # suite/funcs_1/datadict/basics_mixed1.inc
2 #
3 # Auxiliary script to be sourced by suite/funcs_1/t/is_basics_mixed.test
4 #
5 # Author:
6 # 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
7 # testsuite funcs_1
8 # Create this script based on older scripts and new code.
9 #
10 
11 # 1 Attempt to create tables and views when residing in information_schema
12 # 1.1 CREATE TABLE
13 USE information_schema;
14 let $message= root: create a table with a name of an IS table directly in IS;
15 let $dd_part1= CREATE TABLE;
16 let $dd_part2= ( c1 INT );
17 --source suite/funcs_1/datadict/basics_mixed2.inc
18 --error ER_DBACCESS_DENIED_ERROR
19 CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
20 #
21 # 1.2 CREATE VIEW
22 # 1.2.1 Hit on existing INFORMATION_SCHEMA table
23 --error ER_DBACCESS_DENIED_ERROR
24 CREATE VIEW tables AS SELECT 'garbage';
25 --error ER_DBACCESS_DENIED_ERROR
26 CREATE VIEW tables AS SELECT * FROM information_schema.tables;
27 # 1.2.2 New view
28 --error ER_DBACCESS_DENIED_ERROR
29 CREATE VIEW v1 AS SELECT 'garbage';
30 
31 # 2 Attempt to create tables and views when residing in information_schema
32 # 1.1 CREATE TABLE
33 USE test;
34 let $message= root: create a table with a name of an IS table from other db;
35 let $dd_part1= CREATE TABLE information_schema.;
36 let $dd_part2= ( c1 INT );
37 --source suite/funcs_1/datadict/basics_mixed2.inc
38 --error ER_DBACCESS_DENIED_ERROR
39 CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
40 #
41 # Hit on existing INFORMATION_SCHEMA table
42 --error ER_DBACCESS_DENIED_ERROR
43 CREATE VIEW information_schema.tables AS SELECT 'garbage';
44 --error ER_DBACCESS_DENIED_ERROR
45 CREATE VIEW information_schema.tables AS
46 SELECT * FROM information_schema.tables;
47 # New table
48 --error ER_DBACCESS_DENIED_ERROR
49 CREATE VIEW information_schema.v1 AS SELECT 'garbage';