~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to tests/r/show_check.result

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
test.t1 check   status  OK
27
27
show index from t1;
28
28
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
29
 
def     data_dictionary show_indexes    show_indexes    Table   Table   8       256     2       N       1       0       45
30
 
def     data_dictionary show_indexes    show_indexes    Unique  Unique  8       20      5       N       1       0       45
31
 
def     data_dictionary show_indexes    show_indexes    Key_name        Key_name        8       256     7       N       1       0       45
32
 
def     data_dictionary show_indexes    show_indexes    Seq_in_index    Seq_in_index    5       20      1       N       32769   0       63
33
 
def     data_dictionary show_indexes    show_indexes    Column_name     Column_name     8       256     1       N       1       0       45
 
29
def     data_dictionary show_indexes    SHOW_INDEXES    Table   Table   8       1024    2       N       4097    0       45
 
30
def     data_dictionary show_indexes    SHOW_INDEXES    Unique  Unique  8       20      3       N       4097    0       45
 
31
def     data_dictionary show_indexes    SHOW_INDEXES    Key_name        Key_name        8       1024    7       N       4097    0       45
 
32
def     data_dictionary show_indexes    SHOW_INDEXES    Seq_in_index    Seq_in_index    5       20      1       N       36865   0       63
 
33
def     data_dictionary show_indexes    SHOW_INDEXES    Column_name     Column_name     8       1024    1       N       4097    0       45
34
34
Table   Unique  Key_name        Seq_in_index    Column_name
35
 
t1      TRUE    PRIMARY 1       a
36
 
t1      FALSE   b       1       b
37
 
t1      FALSE   b       2       c
 
35
t1      YES     PRIMARY 1       a
 
36
t1      NO      b       1       b
 
37
t1      NO      b       2       c
38
38
insert into t1 values (5,5,5);
39
39
ERROR 23000: Duplicate entry '5' for key 'PRIMARY'
40
40
-- Here we enable metadata just to check that the collation of the
48
48
-- after Bug#29394 is implemented.
49
49
show variables like "server_id%";
50
50
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
51
 
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_NAME   Variable_name   8       256     9       N       1       0       45
52
 
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_VALUE  Value   8       4096    1       N       1       0       45
 
51
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_NAME   Variable_name   8       1024    9       N       4097    0       45
 
52
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_VALUE  Value   8       4096    1       N       4097    0       45
53
53
Variable_name   Value
54
54
server_id       1
55
55
show variables like "SERVER_id%";
56
56
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
57
 
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_NAME   Variable_name   8       256     9       N       1       0       45
58
 
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_VALUE  Value   8       4096    1       N       1       0       45
 
57
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_NAME   Variable_name   8       1024    9       N       4097    0       45
 
58
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_VALUE  Value   8       4096    1       N       4097    0       45
59
59
Variable_name   Value
60
60
server_id       1
61
61
show variables like "this_doesn't_exists%";
62
62
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
63
 
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_NAME   Variable_name   8       256     0       N       1       0       45
64
 
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_VALUE  Value   8       4096    0       N       1       0       45
 
63
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_NAME   Variable_name   8       1024    0       N       4097    0       45
 
64
def     data_dictionary session_variables       SESSION_VARIABLES       VARIABLE_VALUE  Value   8       4096    0       N       4097    0       45
65
65
Variable_name   Value
66
66
show table status from test like "this_doesn't_exists%";
67
67
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
68
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Session Session 5       20      0       N       32769   0       63
69
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Schema  Schema  8       256     0       N       1       0       45
70
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Name    Name    8       256     0       N       1       0       45
71
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Type    Type    8       256     0       N       1       0       45
72
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Engine  Engine  8       256     0       N       1       0       45
73
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Version Version 8       256     0       N       1       0       45
74
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Rows    Rows    8       256     0       N       1       0       45
75
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Avg_row_length  Avg_row_length  8       256     0       N       1       0       45
76
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Table_size      Table_size      8       256     0       N       1       0       45
77
 
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Auto_increment  Auto_increment  8       256     0       N       1       0       45
 
68
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Session Session 5       20      0       N       36865   0       63
 
69
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Schema  Schema  8       1024    0       N       4097    0       45
 
70
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Name    Name    8       1024    0       N       4097    0       45
 
71
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Type    Type    8       1024    0       N       4097    0       45
 
72
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Engine  Engine  8       1024    0       N       4097    0       45
 
73
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Version Version 8       1024    0       N       4097    0       45
 
74
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Rows    Rows    8       1024    0       N       4097    0       45
 
75
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Avg_row_length  Avg_row_length  8       1024    0       N       4097    0       45
 
76
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Table_size      Table_size      8       1024    0       N       4097    0       45
 
77
def     data_dictionary show_table_status       SHOW_TABLE_STATUS       Auto_increment  Auto_increment  8       1024    0       N       4097    0       45
78
78
Session Schema  Name    Type    Engine  Version Rows    Avg_row_length  Table_size      Auto_increment
79
79
show databases;
80
80
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
81
 
def     data_dictionary schema_names    SCHEMA_NAMES    SCHEMA_NAME     Database        8       256     18      N       1       0       45
 
81
def     data_dictionary show_schemas    SHOW_SCHEMAS    SCHEMA_NAME     Database        8       1024    18      N       4097    0       45
82
82
Database
83
 
data_dictionary
84
 
information_schema
 
83
DATA_DICTIONARY
 
84
INFORMATION_SCHEMA
85
85
mysql
86
86
test
87
87
show databases like "test%";
88
88
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
89
 
def     data_dictionary schema_names    SCHEMA_NAMES    SCHEMA_NAME     Database (test%)        8       256     4       N       1       0       45
 
89
def     data_dictionary show_schemas    SHOW_SCHEMAS    SCHEMA_NAME     Database (test%)        8       1024    4       N       4097    0       45
90
90
Database (test%)
91
91
test
92
92
create table t1 (f1 int not null, f2 int not null, f3 int not null, f4 int not null, primary key(f1,f2,f3,f4));
104
104
test.t1 analyze status  OK
105
105
show index from t1;
106
106
Table   Unique  Key_name        Seq_in_index    Column_name
107
 
t1      TRUE    PRIMARY 1       f1
108
 
t1      TRUE    PRIMARY 2       f2
109
 
t1      TRUE    PRIMARY 3       f3
110
 
t1      TRUE    PRIMARY 4       f4
 
107
t1      YES     PRIMARY 1       f1
 
108
t1      YES     PRIMARY 2       f2
 
109
t1      YES     PRIMARY 3       f3
 
110
t1      YES     PRIMARY 4       f4
111
111
show index from t1;
112
112
Table   Unique  Key_name        Seq_in_index    Column_name
113
 
t1      TRUE    PRIMARY 1       f1
114
 
t1      TRUE    PRIMARY 2       f2
115
 
t1      TRUE    PRIMARY 3       f3
116
 
t1      TRUE    PRIMARY 4       f4
 
113
t1      YES     PRIMARY 1       f1
 
114
t1      YES     PRIMARY 2       f2
 
115
t1      YES     PRIMARY 3       f3
 
116
t1      YES     PRIMARY 4       f4
117
117
drop table t1;
118
118
create temporary table t1 (a int not null);
119
119
show create table t1;
120
120
Table   Create Table
121
121
t1      CREATE TEMPORARY TABLE `t1` (
122
 
  `a` int NOT NULL
123
 
) ENGINE=DEFAULT
 
122
  `a` INT NOT NULL
 
123
) ENGINE=DEFAULT COLLATE = utf8_general_ci
124
124
alter table t1 rename t2;
125
125
show create table t2;
126
126
Table   Create Table
127
127
t2      CREATE TEMPORARY TABLE `t2` (
128
 
  `a` int NOT NULL
129
 
) ENGINE=DEFAULT
 
128
  `a` INT NOT NULL
 
129
) ENGINE=DEFAULT COLLATE = utf8_general_ci
130
130
drop table t2;
131
131
create table t1 (
132
132
name char(20) default 'O''Brien' comment 'O''Brien as default',
137
137
show create table t1;
138
138
Table   Create Table
139
139
t1      CREATE TABLE `t1` (
140
 
  `name` varchar(20) DEFAULT 'O''Brien' COMMENT 'O''Brien as default',
141
 
  `c` int NOT NULL COMMENT 'int column',
142
 
  `c-b` int DEFAULT NULL COMMENT 'name with a minus',
143
 
  `space 2` int DEFAULT NULL COMMENT 'name with a space'
144
 
) ENGINE=DEFAULT COMMENT='it''s a table'
 
140
  `name` VARCHAR(20) COLLATE utf8_general_ci DEFAULT 'O''Brien' COMMENT 'O''Brien as default',
 
141
  `c` INT NOT NULL COMMENT 'int column',
 
142
  `c-b` INT DEFAULT NULL COMMENT 'name with a minus',
 
143
  `space 2` INT DEFAULT NULL COMMENT 'name with a space'
 
144
) ENGINE=DEFAULT COMMENT='it''s a table' COLLATE = utf8_general_ci
145
145
show columns from t1;
146
146
Field   Type    Null    Default Default_is_NULL On_Update
147
 
name    VARCHAR TRUE    O'Brien FALSE   
148
 
c       INTEGER FALSE   O'Brien FALSE   
149
 
c-b     INTEGER TRUE    O'Brien TRUE    
150
 
space 2 INTEGER TRUE    O'Brien TRUE    
 
147
name    VARCHAR YES     O'Brien NO      
 
148
c       INTEGER NO              NO      
 
149
c-b     INTEGER YES             YES     
 
150
space 2 INTEGER YES             YES     
151
151
drop table t1;
152
152
create table t1 (a int not null, unique aa (a));
153
153
show create table t1;
154
154
Table   Create Table
155
155
t1      CREATE TABLE `t1` (
156
 
  `a` int NOT NULL,
 
156
  `a` INT NOT NULL,
157
157
  UNIQUE KEY `aa` (`a`)
158
 
) ENGINE=DEFAULT
 
158
) ENGINE=DEFAULT COLLATE = utf8_general_ci
159
159
drop table t1;
160
160
create table t1 (a int not null, primary key (a));
161
161
show create table t1;
162
162
Table   Create Table
163
163
t1      CREATE TABLE `t1` (
164
 
  `a` int NOT NULL,
 
164
  `a` INT NOT NULL,
165
165
  PRIMARY KEY (`a`)
166
 
) ENGINE=DEFAULT
 
166
) ENGINE=DEFAULT COLLATE = utf8_general_ci
167
167
drop table t1;
168
168
create temporary table t1 (a int not null, b VARCHAR(10), INDEX (b) ) COMMENT="test" ENGINE=MYISAM ROW_FORMAT=fixed;
169
169
show create table t1;
170
170
Table   Create Table
171
171
t1      CREATE TEMPORARY TABLE `t1` (
172
 
  `a` int NOT NULL,
173
 
  `b` varchar(10) DEFAULT NULL,
 
172
  `a` INT NOT NULL,
 
173
  `b` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
174
174
  KEY `b` (`b`)
175
 
) ENGINE=MyISAM ROW_FORMAT=FIXED COMMENT='test'
 
175
) ENGINE=MyISAM ROW_FORMAT='fixed' COMMENT='test' COLLATE = utf8_general_ci
176
176
alter table t1 ROW_FORMAT=dynamic;
177
177
show create table t1;
178
178
Table   Create Table
179
179
t1      CREATE TEMPORARY TABLE `t1` (
180
 
  `a` int NOT NULL,
181
 
  `b` varchar(10) DEFAULT NULL,
 
180
  `a` INT NOT NULL,
 
181
  `b` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
182
182
  KEY `b` (`b`)
183
 
) ENGINE=MyISAM ROW_FORMAT=DYNAMIC COMMENT='test'
184
 
ALTER TABLE t1 COMMENT="" ROW_FORMAT=default;
 
183
) ENGINE=MyISAM ROW_FORMAT='dynamic' COMMENT='test' COLLATE = utf8_general_ci
 
184
ALTER TABLE t1 COMMENT="", ROW_FORMAT='default';
185
185
show create table t1;
186
186
Table   Create Table
187
187
t1      CREATE TEMPORARY TABLE `t1` (
188
 
  `a` int NOT NULL,
189
 
  `b` varchar(10) DEFAULT NULL,
 
188
  `a` INT NOT NULL,
 
189
  `b` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
190
190
  KEY `b` (`b`)
191
 
) ENGINE=MyISAM
 
191
) ENGINE=MyISAM ROW_FORMAT='default' COLLATE = utf8_general_ci
192
192
drop table t1;
193
193
create table t1 (a decimal(9,2), b decimal (9,0), e double(9,2), f double(5,0), h float(3,2), i float(3,0));
194
194
show columns from t1;
195
195
Field   Type    Null    Default Default_is_NULL On_Update
196
 
a       DECIMAL TRUE            TRUE    
197
 
b       DECIMAL TRUE            TRUE    
198
 
e       DOUBLE  TRUE            TRUE    
199
 
f       DOUBLE  TRUE            TRUE    
200
 
h       DOUBLE  TRUE            TRUE    
201
 
i       DOUBLE  TRUE            TRUE    
 
196
a       DECIMAL YES             YES     
 
197
b       DECIMAL YES             YES     
 
198
e       DOUBLE  YES             YES     
 
199
f       DOUBLE  YES             YES     
 
200
h       DOUBLE  YES             YES     
 
201
i       DOUBLE  YES             YES     
202
202
show columns from t1;
203
203
Field   Type    Null    Default Default_is_NULL On_Update
204
 
a       DECIMAL TRUE            TRUE    
205
 
b       DECIMAL TRUE            TRUE    
206
 
e       DOUBLE  TRUE            TRUE    
207
 
f       DOUBLE  TRUE            TRUE    
208
 
h       DOUBLE  TRUE            TRUE    
209
 
i       DOUBLE  TRUE            TRUE    
 
204
a       DECIMAL YES             YES     
 
205
b       DECIMAL YES             YES     
 
206
e       DOUBLE  YES             YES     
 
207
f       DOUBLE  YES             YES     
 
208
h       DOUBLE  YES             YES     
 
209
i       DOUBLE  YES             YES     
210
210
drop table t1;
211
211
create temporary table t1 (
212
212
type_int int,
227
227
show create table t1;
228
228
Table   Create Table
229
229
t1      CREATE TEMPORARY TABLE `t1` (
230
 
  `type_int` int DEFAULT NULL,
231
 
  `type_bigint` bigint DEFAULT NULL,
232
 
  `type_decimal` decimal(5,2) DEFAULT NULL,
233
 
  `type_numeric` decimal(5,2) DEFAULT NULL,
234
 
  `empty_char` varchar(0) DEFAULT NULL,
235
 
  `type_char` varchar(2) DEFAULT NULL,
236
 
  `type_varchar` varchar(10) DEFAULT NULL,
237
 
  `type_timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
238
 
  `type_date` date DEFAULT NULL,
239
 
  `type_datetime` datetime DEFAULT NULL,
240
 
  `type_enum` enum('red','green','blue') DEFAULT NULL,
241
 
  `type_set` enum('red','green','blue') DEFAULT NULL,
242
 
  `type_blob` blob,
 
230
  `type_int` INT DEFAULT NULL,
 
231
  `type_bigint` BIGINT DEFAULT NULL,
 
232
  `type_decimal` DECIMAL(5,2) DEFAULT NULL,
 
233
  `type_numeric` DECIMAL(5,2) DEFAULT NULL,
 
234
  `empty_char` VARCHAR(0) COLLATE utf8_general_ci DEFAULT NULL,
 
235
  `type_char` VARCHAR(2) COLLATE utf8_general_ci DEFAULT NULL,
 
236
  `type_varchar` VARCHAR(10) COLLATE utf8_general_ci DEFAULT NULL,
 
237
  `type_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
 
238
  `type_date` DATE DEFAULT NULL,
 
239
  `type_datetime` DATETIME DEFAULT NULL,
 
240
  `type_enum` ENUM('red','green','blue') DEFAULT NULL,
 
241
  `type_set` ENUM('red','green','blue') DEFAULT NULL,
 
242
  `type_blob` BLOB,
243
243
  KEY `type_int` (`type_int`)
244
 
) ENGINE=MyISAM ROW_FORMAT=FIXED COMMENT='test'
 
244
) ENGINE=MyISAM ROW_FORMAT='fixed' COMMENT='test' COLLATE = utf8_general_ci
245
245
insert into t1 (type_timestamp) values ("2003-02-07 10:00:01");
246
246
select * from t1;
247
247
type_int        type_bigint     type_decimal    type_numeric    empty_char      type_char       type_varchar    type_timestamp  type_date       type_datetime   type_enum       type_set        type_blob
251
251
create table t2 select max(a) from t1;
252
252
show columns from t2;
253
253
Field   Type    Null    Default Default_is_NULL On_Update
254
 
max(a)  INTEGER TRUE            TRUE    
 
254
max(a)  INTEGER YES             YES     
255
255
drop table t1,t2;
256
256
create table t1 (c decimal, d double, f float, r real);
257
257
show columns from t1;
258
258
Field   Type    Null    Default Default_is_NULL On_Update
259
 
c       DECIMAL TRUE            TRUE    
260
 
d       DOUBLE  TRUE            TRUE    
261
 
f       DOUBLE  TRUE            TRUE    
262
 
r       DOUBLE  TRUE            TRUE    
 
259
c       DECIMAL YES             YES     
 
260
d       DOUBLE  YES             YES     
 
261
f       DOUBLE  YES             YES     
 
262
r       DOUBLE  YES             YES     
263
263
drop table t1;
264
264
create table t1 (c decimal(3,3), d double(3,3), f float(3,3));
265
265
show columns from t1;
266
266
Field   Type    Null    Default Default_is_NULL On_Update
267
 
c       DECIMAL TRUE            TRUE    
268
 
d       DOUBLE  TRUE            TRUE    
269
 
f       DOUBLE  TRUE            TRUE    
 
267
c       DECIMAL YES             YES     
 
268
d       DOUBLE  YES             YES     
 
269
f       DOUBLE  YES             YES     
270
270
drop table t1;
271
271
CREATE TABLE ```ab``cd``` (i INT);
272
272
SHOW CREATE TABLE ```ab``cd```;
273
273
Table   Create Table
274
274
`ab`cd` CREATE TABLE ```ab``cd``` (
275
 
  `i` int DEFAULT NULL
276
 
) ENGINE=DEFAULT
 
275
  `i` INT DEFAULT NULL
 
276
) ENGINE=DEFAULT COLLATE = utf8_general_ci
277
277
DROP TABLE ```ab``cd```;
278
278
CREATE TABLE ```ab````cd``` (i INT);
279
279
SHOW CREATE TABLE ```ab````cd```;
280
280
Table   Create Table
281
281
`ab``cd`        CREATE TABLE ```ab````cd``` (
282
 
  `i` int DEFAULT NULL
283
 
) ENGINE=DEFAULT
 
282
  `i` INT DEFAULT NULL
 
283
) ENGINE=DEFAULT COLLATE = utf8_general_ci
284
284
DROP TABLE ```ab````cd```;
285
285
CREATE TABLE ```a` (i INT);
286
286
SHOW CREATE TABLE ```a`;
287
287
Table   Create Table
288
288
`a      CREATE TABLE ```a` (
289
 
  `i` int DEFAULT NULL
290
 
) ENGINE=DEFAULT
 
289
  `i` INT DEFAULT NULL
 
290
) ENGINE=DEFAULT COLLATE = utf8_general_ci
291
291
DROP TABLE ```a`;
292
292
CREATE TABLE `a.1` (i INT);
293
293
SHOW CREATE TABLE `a.1`;
294
294
Table   Create Table
295
295
a.1     CREATE TABLE `a.1` (
296
 
  `i` int DEFAULT NULL
297
 
) ENGINE=DEFAULT
 
296
  `i` INT DEFAULT NULL
 
297
) ENGINE=DEFAULT COLLATE = utf8_general_ci
298
298
DROP TABLE `a.1`;
299
299
select @@max_heap_table_size;
300
300
@@max_heap_table_size
374
374
SHOW CREATE TABLE t1;
375
375
Table   Create Table
376
376
t1      CREATE TEMPORARY TABLE `t1` (
377
 
  `i` int DEFAULT NULL,
 
377
  `i` INT DEFAULT NULL,
378
378
  KEY `i` (`i`)
379
 
) ENGINE=MEMORY
 
379
) ENGINE=MEMORY COLLATE = utf8_general_ci
380
380
DROP TABLE t1;
381
381
CREATE TEMPORARY TABLE t1 (i int, KEY USING HASH (i)) ENGINE=MEMORY;
382
382
SHOW CREATE TABLE t1;
383
383
Table   Create Table
384
384
t1      CREATE TEMPORARY TABLE `t1` (
385
 
  `i` int DEFAULT NULL,
 
385
  `i` INT DEFAULT NULL,
386
386
  KEY `i` (`i`) USING HASH
387
 
) ENGINE=MEMORY
 
387
) ENGINE=MEMORY COLLATE = utf8_general_ci
388
388
DROP TABLE t1;
389
389
CREATE TEMPORARY TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MEMORY;
390
390
SHOW CREATE TABLE t1;
391
391
Table   Create Table
392
392
t1      CREATE TEMPORARY TABLE `t1` (
393
 
  `i` int DEFAULT NULL,
394
 
  KEY `i` (`i`) USING BTREE
395
 
) ENGINE=MEMORY
396
 
DROP TABLE t1;
397
 
CREATE TEMPORARY TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
398
 
SHOW CREATE TABLE t1;
399
 
Table   Create Table
400
 
t1      CREATE TEMPORARY TABLE `t1` (
401
 
  `i` int DEFAULT NULL,
402
 
  KEY `i` (`i`)
403
 
) ENGINE=MyISAM
404
 
DROP TABLE t1;
405
 
CREATE TEMPORARY TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
406
 
SHOW CREATE TABLE t1;
407
 
Table   Create Table
408
 
t1      CREATE TEMPORARY TABLE `t1` (
409
 
  `i` int DEFAULT NULL,
410
 
  KEY `i` (`i`) USING BTREE
411
 
) ENGINE=MyISAM
412
 
DROP TABLE t1;
413
 
CREATE TEMPORARY TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
414
 
SHOW CREATE TABLE t1;
415
 
Table   Create Table
416
 
t1      CREATE TEMPORARY TABLE `t1` (
417
 
  `i` int DEFAULT NULL,
418
 
  KEY `i` (`i`)
419
 
) ENGINE=MyISAM
420
 
ALTER TABLE t1 ENGINE=MEMORY;
421
 
SHOW CREATE TABLE t1;
422
 
Table   Create Table
423
 
t1      CREATE TEMPORARY TABLE `t1` (
424
 
  `i` int DEFAULT NULL,
425
 
  KEY `i` (`i`)
426
 
) ENGINE=MEMORY
427
 
DROP TABLE t1;
428
 
CREATE TEMPORARY TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
429
 
SHOW CREATE TABLE t1;
430
 
Table   Create Table
431
 
t1      CREATE TEMPORARY TABLE `t1` (
432
 
  `i` int DEFAULT NULL,
433
 
  KEY `i` (`i`) USING BTREE
434
 
) ENGINE=MyISAM
435
 
ALTER TABLE t1 ENGINE=MEMORY;
436
 
SHOW CREATE TABLE t1;
437
 
Table   Create Table
438
 
t1      CREATE TEMPORARY TABLE `t1` (
439
 
  `i` int DEFAULT NULL,
440
 
  KEY `i` (`i`) USING BTREE
441
 
) ENGINE=MEMORY
 
393
  `i` INT DEFAULT NULL,
 
394
  KEY `i` (`i`) USING BTREE
 
395
) ENGINE=MEMORY COLLATE = utf8_general_ci
 
396
DROP TABLE t1;
 
397
CREATE TEMPORARY TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
 
398
SHOW CREATE TABLE t1;
 
399
Table   Create Table
 
400
t1      CREATE TEMPORARY TABLE `t1` (
 
401
  `i` INT DEFAULT NULL,
 
402
  KEY `i` (`i`)
 
403
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
404
DROP TABLE t1;
 
405
CREATE TEMPORARY TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
 
406
SHOW CREATE TABLE t1;
 
407
Table   Create Table
 
408
t1      CREATE TEMPORARY TABLE `t1` (
 
409
  `i` INT DEFAULT NULL,
 
410
  KEY `i` (`i`) USING BTREE
 
411
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
412
DROP TABLE t1;
 
413
CREATE TEMPORARY TABLE t1 (i int, KEY (i)) ENGINE=MyISAM;
 
414
SHOW CREATE TABLE t1;
 
415
Table   Create Table
 
416
t1      CREATE TEMPORARY TABLE `t1` (
 
417
  `i` INT DEFAULT NULL,
 
418
  KEY `i` (`i`)
 
419
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
420
ALTER TABLE t1 ENGINE=MEMORY;
 
421
SHOW CREATE TABLE t1;
 
422
Table   Create Table
 
423
t1      CREATE TEMPORARY TABLE `t1` (
 
424
  `i` INT DEFAULT NULL,
 
425
  KEY `i` (`i`)
 
426
) ENGINE=MEMORY COLLATE = utf8_general_ci
 
427
DROP TABLE t1;
 
428
CREATE TEMPORARY TABLE t1 (i int, KEY USING BTREE (i)) ENGINE=MyISAM;
 
429
SHOW CREATE TABLE t1;
 
430
Table   Create Table
 
431
t1      CREATE TEMPORARY TABLE `t1` (
 
432
  `i` INT DEFAULT NULL,
 
433
  KEY `i` (`i`) USING BTREE
 
434
) ENGINE=MyISAM COLLATE = utf8_general_ci
 
435
ALTER TABLE t1 ENGINE=MEMORY;
 
436
SHOW CREATE TABLE t1;
 
437
Table   Create Table
 
438
t1      CREATE TEMPORARY TABLE `t1` (
 
439
  `i` INT DEFAULT NULL,
 
440
  KEY `i` (`i`) USING BTREE
 
441
) ENGINE=MEMORY COLLATE = utf8_general_ci
442
442
DROP TABLE t1;
443
443
CREATE TABLE t1(
444
444
field1 text NOT NULL,
446
446
);
447
447
show index from t1;
448
448
Catalog Database        Table   Table_alias     Column  Column_alias    Type    Length  Max length      Is_null Flags   Decimals        Charsetnr
449
 
def     data_dictionary show_indexes    show_indexes    Table   Table   8       256     2       N       1       0       45
450
 
def     data_dictionary show_indexes    show_indexes    Unique  Unique  8       20      4       N       1       0       45
451
 
def     data_dictionary show_indexes    show_indexes    Key_name        Key_name        8       256     7       N       1       0       45
452
 
def     data_dictionary show_indexes    show_indexes    Seq_in_index    Seq_in_index    5       20      1       N       32769   0       63
453
 
def     data_dictionary show_indexes    show_indexes    Column_name     Column_name     8       256     6       N       1       0       45
 
449
def     data_dictionary show_indexes    SHOW_INDEXES    Table   Table   8       1024    2       N       4097    0       45
 
450
def     data_dictionary show_indexes    SHOW_INDEXES    Unique  Unique  8       20      3       N       4097    0       45
 
451
def     data_dictionary show_indexes    SHOW_INDEXES    Key_name        Key_name        8       1024    7       N       4097    0       45
 
452
def     data_dictionary show_indexes    SHOW_INDEXES    Seq_in_index    Seq_in_index    5       20      1       N       36865   0       63
 
453
def     data_dictionary show_indexes    SHOW_INDEXES    Column_name     Column_name     8       1024    6       N       4097    0       45
454
454
Table   Unique  Key_name        Seq_in_index    Column_name
455
 
t1      TRUE    PRIMARY 1       field1
 
455
t1      YES     PRIMARY 1       field1
456
456
drop table t1;
457
457
create table t1 (
458
458
c1 int NOT NULL,
463
463
SHOW CREATE TABLE t1;
464
464
Table   Create Table
465
465
t1      CREATE TABLE `t1` (
466
 
  `c1` int NOT NULL,
467
 
  `c2` int NOT NULL,
 
466
  `c1` INT NOT NULL,
 
467
  `c2` INT NOT NULL,
468
468
  PRIMARY KEY (`c1`) USING HASH,
469
469
  KEY `c2` (`c2`) USING BTREE
470
 
) ENGINE=DEFAULT
 
470
) ENGINE=DEFAULT COLLATE = utf8_general_ci
471
471
DROP TABLE t1;
472
472
SHOW TABLES FROM non_existing_database;
473
473
ERROR 42000: Unknown database 'non_existing_database'
486
486
a\b
487
487
show fields from `mysqlttest\1`.`a\b`;
488
488
Field   Type    Null    Default Default_is_NULL On_Update
489
 
a       INTEGER TRUE            TRUE    
 
489
a       INTEGER YES             YES     
490
490
show columns from `a\b` from `mysqlttest\1`;
491
491
Field   Type    Null    Default Default_is_NULL On_Update
492
 
a       INTEGER TRUE            TRUE    
 
492
a       INTEGER YES             YES     
493
493
show keys from `mysqlttest\1`.`a\b`;
494
494
Table   Unique  Key_name        Seq_in_index    Column_name
495
495
drop table `mysqlttest\1`.`a\b`;