~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/suite/identifiers/t/table.test

  • Committer: Brian Aker
  • Date: 2009-10-15 00:22:33 UTC
  • mto: (1183.1.11 merge)
  • mto: This revision was merged to the branch mainline in revision 1198.
  • Revision ID: brian@gaz-20091015002233-fa4ao2mbc67wls91
First pass of information engine. OMG, ponies... is it so much easier to
deal with creating and engine.

The list table iterator though... its ass, needs to go. We should also
abstract out share. Very few engines need a custom one. Just say'in

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#
2
 
# We check that no one can create tables into some of the schemas.
3
 
#
4
 
 
5
 
CREATE SCHEMA admin;
6
 
CREATE SCHEMA temporary;
7
 
 
8
 
SELECT SCHEMA();
9
 
 
10
 
CREATE TABLE admin.t1 (A SERIAL);
11
 
DROP TABLE admin.t1;
12
 
 
13
 
--error ER_SYNTAX_ERROR,1064
14
 
CREATE TABLE .admin.t1 (A SERIAL);
15
 
 
16
 
--error ER_WRONG_DB_NAME
17
 
CREATE TABLE `.admin`.t1 (A SERIAL);
18
 
 
19
 
CREATE TABLE temporary.t1 (A SERIAL);
20
 
DROP TABLE temporary.t1;
21
 
 
22
 
--error ER_SYNTAX_ERROR,1064
23
 
CREATE TABLE .temporary.t1 (A SERIAL);
24
 
--error ER_WRONG_DB_NAME
25
 
CREATE TABLE `.temporary`.t1 (A SERIAL);
26
 
 
27
 
use admin;
28
 
# This will succeed because we parse the . as being the current schema.
29
 
CREATE TABLE .temporary (A SERIAL);
30
 
DROP TABLE .temporary;
31
 
 
32
 
--error ER_WRONG_TABLE_NAME
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`;
40
 
 
41
 
--error 1064
42
 
CREATE TABLE #temporary (A SERIAL);
43
 
 
44
 
--error ER_WRONG_TABLE_NAME
45
 
CREATE TABLE `temporary ` (A SERIAL);
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;
56
 
DROP SCHEMA temporary;