1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#
# We check that no one can create bad schemas
#
CREATE SCHEMA admin;
CREATE SCHEMA temporary;
SELECT SCHEMA();
--error 1064,ER_SYNTAX_ERROR
CREATE SCHEMA .admin;
--error ER_WRONG_DB_NAME
CREATE SCHEMA `.admin `;
--error ER_WRONG_DB_NAME
CREATE SCHEMA `.admin`;
--error 1064
CREATE SCHEMA #admin;
CREATE SCHEMA `#admin`;
DROP SCHEMA `#admin`;
SELECT TABLE_NAME FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA=SCHEMA();
--error ER_WRONG_DB_NAME
CREATE DATABASE aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa;
DROP SCHEMA admin;
DROP SCHEMA temporary;
|