~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/show_check.test

Removing global errbuff and cleaning up two remaining instances that referenced it.

Show diffs side-by-side

added added

removed removed

Lines of Context:
90
90
#
91
91
 
92
92
create temporary table t1 (a int not null);
 
93
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
93
94
show create table t1;
94
95
alter table t1 rename t2;
 
96
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
95
97
show create table t2;
96
98
drop table t2;
97
99
 
98
100
create table t1 (
99
 
  test_set set( 'val1', 'val2', 'val3' ) not null default '',
100
101
  name char(20) default 'O''Brien' comment 'O''Brien as default',
101
102
  c int not null comment 'int column',
102
103
  `c-b` int comment 'name with a minus',
103
104
  `space 2` int comment 'name with a space'
104
105
  ) 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;
 
106
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
 
107
show create table t1;
109
108
show full columns from t1;
110
109
drop table t1;
111
110
 
112
111
create table t1 (a int not null, unique aa (a));
 
112
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
113
113
show create table t1;
114
114
drop table t1;
115
115
create table t1 (a int not null, primary key (a));
 
116
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
116
117
show create table t1;
117
118
drop table t1;
118
119
 
140
141
# Do a create table that tries to cover all types and options
141
142
#
142
143
create table t1 (
143
 
type_bool bool not null default 0,
144
 
type_tiny int not null auto_increment primary key,
145
 
type_short int(3),
146
 
type_mediumint mediumint,
 
144
type_int int,
147
145
type_bigint bigint,
148
146
type_decimal decimal(5,2),
149
147
type_numeric numeric(5,2),
151
149
type_char char(2),
152
150
type_varchar varchar(10),
153
151
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,
 
152
type_date date,
 
153
type_datetime datetime,
158
154
type_enum enum ('red', 'green', 'blue'),
159
155
type_set enum ('red', 'green', 'blue'),
160
 
type_tinyblob tinyblob,
161
156
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;
 
157
index(type_int)
 
158
) 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
159
 
167
160
# Not tested above: RAID_# UNION INSERT_METHOD DATA DIRECTORY INDEX DIRECTORY
168
161
show create table t1;
193
186
#
194
187
 
195
188
CREATE TABLE ```ab``cd``` (i INT);
 
189
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
196
190
SHOW CREATE TABLE ```ab``cd```;
197
191
DROP TABLE ```ab``cd```;
198
192
 
199
193
CREATE TABLE ```ab````cd``` (i INT);
 
194
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
200
195
SHOW CREATE TABLE ```ab````cd```;
201
196
DROP TABLE ```ab````cd```;
202
197
 
203
198
CREATE TABLE ```a` (i INT);
 
199
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
204
200
SHOW CREATE TABLE ```a`;
205
201
DROP TABLE ```a`;
206
202
 
207
203
CREATE TABLE `a.1` (i INT);
 
204
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
208
205
SHOW CREATE TABLE `a.1`;
209
206
DROP TABLE `a.1`;
210
207
 
216
213
select @@max_heap_table_size;
217
214
 
218
215
CREATE TABLE t1 (
219
 
 a int(11) default NULL,
 
216
 a int default NULL,
220
217
 KEY a USING BTREE (a)
221
218
) ENGINE=HEAP;
222
219
 
223
220
CREATE TABLE t2 (
224
 
 b int(11) default NULL,
 
221
 b int default NULL,
225
222
 index(b)
226
223
) ENGINE=HEAP;
227
224
 
228
225
CREATE TABLE t3 (
229
 
 a int(11) default NULL,
230
 
 b int(11) default NULL,
 
226
 a int default NULL,
 
227
 b int default NULL,
231
228
 KEY a USING BTREE (a),
232
229
 index(b)
233
230
) ENGINE=HEAP;
305
302
# Test for BUG#9439 "Reporting wrong datatype for sub_part on show index"
306
303
CREATE TABLE t1(
307
304
  field1 text NOT NULL,
308
 
  PRIMARY KEY(field1(1000))
 
305
  PRIMARY KEY(field1(180))
309
306
);
310
307
--enable_metadata
311
308
show index from t1;
319
316
  PRIMARY KEY USING HASH (c1),
320
317
  INDEX USING BTREE(c2)
321
318
);
 
319
--replace_regex /ENGINE=[a-zA-Z]+/ENGINE=DEFAULT/
322
320
SHOW CREATE TABLE t1;
323
321
DROP TABLE t1;
324
322
 
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
323
#
340
324
# BUG 12183 -  SHOW OPEN TABLES behavior doesn't match grammar
341
325
# First we close all open tables with FLUSH tables and then we open some.
417
401
--error ER_NO_SUCH_TABLE
418
402
SHOW COLUMNS FROM no_such_table;
419
403
 
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
404
#
438
405
# Bug #30088: Can't disable myisam-recover by a value of ""
439
406
#
441
408
 
442
409
--echo End of 5.0 tests
443
410
 
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
411
#
458
412
# Bug #19874: SHOW COLUMNS and SHOW KEYS handle identifiers containing
459
413
# \ incorrectly
482
436
show engine mutex status;
483
437
 
484
438
show engine csv status;
485
 
show engine csv logs;
486
 
show engine csv mutex;
 
439
 
487
440
#
488
441
# Bug#25081 SHOW FULL TABLES on table with latin chars in name fails
489
442
#
490
 
set names utf8;
491
443
--disable_warnings
492
444
drop table if exists `été`;
493
445
--enable_warnings
494
446
create table `été` (field1 int);
495
447
show full tables;
496
448
drop table `été`;
497
 
set names latin1;
498
449
 
499
450
#
500
451
# Bug#26402 Server crashes with old-style named table