| 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 |
--error ER_TABLE_EXISTS_ERROR |
| 25 |
CREATE VIEW tables AS SELECT 'garbage'; |
| 26 |
#--error ER_DBACCESS_DENIED_ERROR |
| 27 |
--error ER_NO_SUCH_TABLE |
| 28 |
CREATE VIEW tables AS SELECT * FROM information_schema.tables; |
| 29 |
# 1.2.2 New view |
| 30 |
--error ER_DBACCESS_DENIED_ERROR |
| 31 |
CREATE VIEW v1 AS SELECT 'garbage'; |
| 32 |
|
| 33 |
# 2 Attempt to create tables and views when residing in information_schema |
| 34 |
# 1.1 CREATE TABLE |
| 35 |
USE test; |
| 36 |
let $message= root: create a table with a name of an IS table from other db; |
| 37 |
let $dd_part1= CREATE TABLE information_schema.; |
| 38 |
let $dd_part2= ( c1 INT ); |
| 39 |
--source suite/funcs_1/datadict/basics_mixed2.inc |
| 40 |
--error ER_DBACCESS_DENIED_ERROR |
| 41 |
CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT); |
| 42 |
# |
| 43 |
# Hit on existing INFORMATION_SCHEMA table |
| 44 |
#--error ER_DBACCESS_DENIED_ERROR |
| 45 |
--error ER_TABLE_EXISTS_ERROR |
| 46 |
CREATE VIEW information_schema.tables AS SELECT 'garbage'; |
| 47 |
#--error ER_DBACCESS_DENIED_ERROR |
| 48 |
--error ER_NO_SUCH_TABLE |
| 49 |
CREATE VIEW information_schema.tables AS |
| 50 |
SELECT * FROM information_schema.tables; |
| 51 |
# New table |
| 52 |
--error ER_DBACCESS_DENIED_ERROR |
| 53 |
CREATE VIEW information_schema.v1 AS SELECT 'garbage'; |