1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
1 |
#
|
2 |
# We check that no one can create tables into some of the schemas.
|
|
3 |
#
|
|
4 |
||
5 |
CREATE SCHEMA admin; |
|
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
6 |
CREATE SCHEMA temporary; |
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
7 |
|
8 |
SELECT SCHEMA(); |
|
9 |
||
10 |
CREATE TABLE admin.t1 (A SERIAL); |
|
11 |
DROP TABLE admin.t1; |
|
12 |
||
2107.1.2
by Brian Aker
More number to error message conversion. |
13 |
--error ER_SYNTAX_ERROR,ER_PARSE_ERROR |
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
14 |
CREATE TABLE .admin.t1 (A SERIAL); |
15 |
||
16 |
--error ER_WRONG_DB_NAME |
|
17 |
CREATE TABLE `.admin`.t1 (A SERIAL); |
|
18 |
||
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
19 |
CREATE TABLE temporary.t1 (A SERIAL); |
20 |
DROP TABLE temporary.t1; |
|
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
21 |
|
2107.1.2
by Brian Aker
More number to error message conversion. |
22 |
--error ER_SYNTAX_ERROR,ER_PARSE_ERROR |
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
23 |
CREATE TABLE .temporary.t1 (A SERIAL); |
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
24 |
--error ER_WRONG_DB_NAME |
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
25 |
CREATE TABLE `.temporary`.t1 (A SERIAL); |
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
26 |
|
27 |
use admin; |
|
28 |
# This will succeed because we parse the . as being the current schema.
|
|
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
29 |
CREATE TABLE .temporary (A SERIAL); |
30 |
DROP TABLE .temporary; |
|
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
31 |
|
32 |
--error ER_WRONG_TABLE_NAME |
|
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
33 |
CREATE TABLE `.temporary` (A SERIAL); |
34 |
||
35 |
CREATE TABLE `temporary` (A SERIAL); |
|
36 |
DROP TABLE `temporary`; |
|
37 |
||
38 |
CREATE TABLE `#temporary` (A SERIAL); |
|
39 |
DROP TABLE `#temporary`; |
|
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
40 |
|
2107.1.2
by Brian Aker
More number to error message conversion. |
41 |
--error ER_PARSE_ERROR |
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
42 |
CREATE TABLE #temporary (A SERIAL); |
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
43 |
|
44 |
--error ER_WRONG_TABLE_NAME |
|
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
45 |
CREATE TABLE `temporary ` (A SERIAL); |
1992.4.1
by Brian Aker
Update code for testing identifiers/table/schema name correctness. |
46 |
|
47 |
SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA(); |
|
48 |
||
49 |
--error ER_WRONG_TABLE_NAME,ER_WRONG_DB_NAME |
|
50 |
CREATE TABLE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa.aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (A SERIAL); |
|
51 |
||
52 |
--error ER_WRONG_TABLE_NAME,ER_WRONG_DB_NAME |
|
53 |
CREATE TABLE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa (A SERIAL); |
|
54 |
||
55 |
DROP SCHEMA admin; |
|
2060.2.6
by Brian Aker
Look ma, no shift conflicts, and we get the keywords back. |
56 |
DROP SCHEMA temporary; |