~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/show_check.test

  • Committer: Brian Aker
  • Date: 2009-07-11 19:23:04 UTC
  • mfrom: (1089.1.14 merge)
  • Revision ID: brian@gaz-20090711192304-ootijyl5yf9jq9kd
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
74
74
--disable_metadata
75
75
show index from t1;
76
76
 
77
 
--echo -- Here we enable metadata just to check that the collation of the
78
 
--echo -- resultset is non-binary for string type. This should be changed
79
 
--echo -- after Bug#29394 is implemented.
80
 
 
81
 
--enable_metadata
82
 
 
83
 
repair table t1;
84
 
--disable_metadata
85
77
show index from t1;
86
78
drop table t1;
87
79
 
90
82
#
91
83
 
92
84
create temporary table t1 (a int not null);
 
85
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
93
86
show create table t1;
94
87
alter table t1 rename t2;
 
88
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
95
89
show create table t2;
96
90
drop table t2;
97
91
 
98
92
create table t1 (
99
 
  test_set set( 'val1', 'val2', 'val3' ) not null default '',
100
93
  name char(20) default 'O''Brien' comment 'O''Brien as default',
101
94
  c int not null comment 'int column',
102
95
  `c-b` int comment 'name with a minus',
103
96
  `space 2` int comment 'name with a space'
104
97
  ) comment = 'it\'s a table' ;
105
 
show create table t1;
106
 
set sql_quote_show_create=0;
107
 
show create table t1;
108
 
set sql_quote_show_create=1;
 
98
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
 
99
show create table t1;
109
100
show full columns from t1;
110
101
drop table t1;
111
102
 
112
103
create table t1 (a int not null, unique aa (a));
 
104
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
113
105
show create table t1;
114
106
drop table t1;
115
107
create table t1 (a int not null, primary key (a));
 
108
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
116
109
show create table t1;
117
110
drop table t1;
118
111
 
140
133
# Do a create table that tries to cover all types and options
141
134
#
142
135
create table t1 (
143
 
type_bool bool not null default 0,
144
 
type_tiny tinyint not null auto_increment primary key,
145
 
type_short smallint(3),
146
 
type_mediumint mediumint,
 
136
type_int int,
147
137
type_bigint bigint,
148
138
type_decimal decimal(5,2),
149
139
type_numeric numeric(5,2),
151
141
type_char char(2),
152
142
type_varchar varchar(10),
153
143
type_timestamp timestamp not null,
154
 
type_date date not null default '0000-00-00',
155
 
type_time time not null default '00:00:00',
156
 
type_datetime datetime not null default '0000-00-00 00:00:00',
157
 
type_year year,
 
144
type_date date,
 
145
type_datetime datetime,
158
146
type_enum enum ('red', 'green', 'blue'),
159
147
type_set enum ('red', 'green', 'blue'),
160
 
type_tinyblob tinyblob,
161
148
type_blob blob,
162
 
type_medium_blob mediumblob,
163
 
type_long_blob longblob,
164
 
index(type_short)
165
 
) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed CHARSET=latin1;
 
149
index(type_int)
 
150
) AVG_ROW_LENGTH=10 CHECKSUM=1 COMMENT="test" ENGINE=MYISAM MIN_ROWS=10 MAX_ROWS=100 PACK_KEYS=1 DELAY_KEY_WRITE=1 ROW_FORMAT=fixed;
166
151
 
167
152
# Not tested above: RAID_# UNION INSERT_METHOD DATA DIRECTORY INDEX DIRECTORY
168
153
show create table t1;
193
178
#
194
179
 
195
180
CREATE TABLE ```ab``cd``` (i INT);
 
181
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
196
182
SHOW CREATE TABLE ```ab``cd```;
197
183
DROP TABLE ```ab``cd```;
198
184
 
199
185
CREATE TABLE ```ab````cd``` (i INT);
 
186
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
200
187
SHOW CREATE TABLE ```ab````cd```;
201
188
DROP TABLE ```ab````cd```;
202
189
 
203
190
CREATE TABLE ```a` (i INT);
 
191
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
204
192
SHOW CREATE TABLE ```a`;
205
193
DROP TABLE ```a`;
206
194
 
207
195
CREATE TABLE `a.1` (i INT);
 
196
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
208
197
SHOW CREATE TABLE `a.1`;
209
198
DROP TABLE `a.1`;
210
199
 
216
205
select @@max_heap_table_size;
217
206
 
218
207
CREATE TABLE t1 (
219
 
 a int(11) default NULL,
 
208
 a int default NULL,
220
209
 KEY a USING BTREE (a)
221
210
) ENGINE=HEAP;
222
211
 
223
212
CREATE TABLE t2 (
224
 
 b int(11) default NULL,
 
213
 b int default NULL,
225
214
 index(b)
226
215
) ENGINE=HEAP;
227
216
 
228
217
CREATE TABLE t3 (
229
 
 a int(11) default NULL,
230
 
 b int(11) default NULL,
 
218
 a int default NULL,
 
219
 b int default NULL,
231
220
 KEY a USING BTREE (a),
232
221
 index(b)
233
222
) ENGINE=HEAP;
305
294
# Test for BUG#9439 "Reporting wrong datatype for sub_part on show index"
306
295
CREATE TABLE t1(
307
296
  field1 text NOT NULL,
308
 
  PRIMARY KEY(field1(1000))
 
297
  PRIMARY KEY(field1(180))
309
298
);
310
299
--enable_metadata
311
300
show index from t1;
319
308
  PRIMARY KEY USING HASH (c1),
320
309
  INDEX USING BTREE(c2)
321
310
);
 
311
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
322
312
SHOW CREATE TABLE t1;
323
313
DROP TABLE t1;
324
314
 
325
 
# Test for BUG#93: 4.1 protocl crash on corupted frm and SHOW TABLE STATUS
326
 
 
327
 
flush tables;
328
 
 
329
 
# Create a junk frm file on disk
330
 
system echo "this is a junk file for test" >> $MYSQLTEST_VARDIR/master-data/test/t1.frm ;
331
 
--replace_column 6 # 7 # 8 # 9 #
332
 
SHOW TABLE STATUS like 't1';
333
 
--error 1033
334
 
show create table t1;
335
 
drop table if exists t1;
336
 
--error 1,0
337
 
--remove_file $MYSQLTEST_VARDIR/master-data/test/t1.frm
338
 
 
339
315
#
340
316
# BUG 12183 -  SHOW OPEN TABLES behavior doesn't match grammar
341
317
# First we close all open tables with FLUSH tables and then we open some.
417
393
--error ER_NO_SUCH_TABLE
418
394
SHOW COLUMNS FROM no_such_table;
419
395
 
420
 
 
421
 
#
422
 
# Bug #28808: log_queries_not_using_indexes variable dynamic change is ignored
423
 
#
424
 
flush status;
425
 
show variables like "log_queries_not_using_indexes";
426
 
select 1 from information_schema.tables limit 1;
427
 
show status like 'slow_queries';
428
 
set global log_queries_not_using_indexes=OFF;
429
 
show variables like "log_queries_not_using_indexes";
430
 
select 1 from information_schema.tables limit 1;
431
 
show status like 'slow_queries';
432
 
set global log_queries_not_using_indexes=ON;
433
 
show variables like "log_queries_not_using_indexes";
434
 
select 1 from information_schema.tables limit 1;
435
 
show status like 'slow_queries';
436
 
 
437
396
#
438
397
# Bug #30088: Can't disable myisam-recover by a value of ""
439
398
#
441
400
 
442
401
--echo End of 5.0 tests
443
402
 
444
 
--disable_result_log
445
 
SHOW AUTHORS;
446
 
--enable_result_log
447
 
 
448
 
 
449
 
#
450
 
# Ensure that show plugin code is tested
451
 
#
452
 
 
453
 
--disable_result_log
454
 
show plugins;
455
 
--enable_result_log
456
 
 
457
403
#
458
404
# Bug #19874: SHOW COLUMNS and SHOW KEYS handle identifiers containing
459
405
# \ incorrectly
482
428
show engine mutex status;
483
429
 
484
430
show engine csv status;
485
 
show engine csv logs;
486
 
show engine csv mutex;
 
431
 
487
432
#
488
433
# Bug#25081 SHOW FULL TABLES on table with latin chars in name fails
489
434
#
490
 
set names utf8;
491
435
--disable_warnings
492
436
drop table if exists `été`;
493
437
--enable_warnings
494
438
create table `été` (field1 int);
495
439
show full tables;
496
440
drop table `été`;
497
 
set names latin1;
498
441
 
499
442
#
500
443
# Bug#26402 Server crashes with old-style named table