1
# check that CSV engine was compiled in, as the result of the test
2
# depends on the presence of the log tables (which are CSV-based).
3
--source include/have_csv.inc
2
6
# Test of some show commands
46
54
show variables like "server_id%";
47
55
show variables like "SERVER_id%";
48
56
show variables like "this_doesn't_exists%";
49
--replace_column 1 # 6 # 7 # 8 # 9 # 10 #
50
57
show table status from test like "this_doesn't_exists%";
52
59
show databases like "test%";
102
109
show create table t1;
114
create table t1(n int);
115
insert into t1 values (1);
105
119
create temporary table t1 (a int not null, b VARCHAR(10), INDEX (b) ) COMMENT="test" ENGINE=MYISAM ROW_FORMAT=fixed;
106
120
show create table t1;
107
121
alter table t1 ROW_FORMAT=dynamic;
108
122
show create table t1;
109
ALTER TABLE t1 COMMENT="", ROW_FORMAT='default';
123
ALTER TABLE t1 COMMENT="" ROW_FORMAT=default;
110
124
show create table t1;
113
127
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));
114
128
show columns from t1;
115
show columns from t1;
129
show full columns from t1;
193
207
CREATE TEMPORARY TABLE t1 (
194
208
a int default NULL,
195
209
KEY a USING BTREE (a)
198
212
CREATE TEMPORARY TABLE t2 (
199
213
b int default NULL,
203
217
CREATE TEMPORARY TABLE t3 (
204
218
a int default NULL,
205
219
b int default NULL,
206
220
KEY a USING BTREE (a),
210
224
insert into t1 values (1),(2);
211
225
insert into t2 values (1),(2);
212
226
insert into t3 values (1,1),(2,2);
213
--replace_column 1 # 6 # 7 # 8 # 9 # 10 #
227
--replace_column 6 # 7 # 8 # 9 #
214
228
show table status;
215
229
insert into t1 values (3),(4);
216
230
insert into t2 values (3),(4);
217
231
insert into t3 values (3,3),(4,4);
218
--replace_column 1 # 6 # 7 # 8 # 9 # 10 #
232
--replace_column 6 # 7 # 8 # 9 #
219
233
show table status;
220
234
insert into t1 values (5);
221
235
insert into t2 values (5);
222
236
insert into t3 values (5,5);
223
--replace_column 1 # 6 # 7 # 8 # 9 # 10 #
237
--replace_column 6 # 7 # 8 # 9 #
224
238
show table status;
225
239
delete from t1 where a=3;
226
240
delete from t2 where b=3;
227
241
delete from t3 where a=3;
228
--replace_column 1 # 6 # 7 # 8 # 9 # 10 #
242
--replace_column 6 # 7 # 8 # 9 # 10 #
229
243
show table status;
230
244
truncate table t1;
231
245
truncate table t2;
232
246
truncate table t3;
233
--replace_column 1 # 6 # 7 # 8 # 9 # 10 #
247
--replace_column 6 # 7 # 8 # 9 #
234
248
show table status;
235
249
insert into t1 values (5);
236
250
insert into t2 values (5);
237
251
insert into t3 values (5,5);
238
--replace_column 1 # 6 # 7 # 8 # 9 # 10 #
252
--replace_column 6 # 7 # 8 # 9 #
239
253
show table status;
240
254
delete from t1 where a=5;
241
255
delete from t2 where b=5;
242
256
delete from t3 where a=5;
243
--replace_column 1 # 6 # 7 # 8 # 9 # 10 #
257
--replace_column 6 # 7 # 8 # 9 # 10 #
244
258
show table status;
246
260
drop table t1, t2, t3;
316
# BUG 12183 - SHOW OPEN TABLES behavior doesn't match grammar
317
# First we close all open tables with FLUSH tables and then we open some.
321
--echo # Bug#12183: SHOW OPEN TABLES behavior doesn't match grammar.
324
# NOTE: SHOW OPEN TABLES does not sort result list by database or table names.
325
# Tables are listed in the order they were opened. We can not use the system
326
# database (mysql) for the test here, because we have no control over the order
327
# of opening tables in it. Consequently, we can not use 'SHOW OPEN TABLES'.
330
DROP DATABASE IF EXISTS mysqltest1;
333
CREATE DATABASE mysqltest1;
338
CREATE TABLE t1(a INT);
339
CREATE TABLE t2(a INT);
343
--disable_ps_protocol
353
SHOW OPEN TABLES FROM mysqltest1;
357
SHOW OPEN TABLES FROM mysqltest1 LIKE 'z%';
361
SHOW OPEN TABLES FROM mysqltest1 LIKE 't1%';
365
SHOW OPEN TABLES FROM mysqltest1 LIKE '%1%';
374
DROP DATABASE mysqltest1;
302
380
# BUG #12591 (SHOW TABLES FROM dbname produces wrong error message)
304
--error ER_BAD_DB_ERROR
305
383
SHOW TABLES FROM non_existing_database;
307
385
--echo End of 4.1 tests
336
414
drop database `mysqlttest\1`;
339
# Bug#25081 show TABLES on table with latin chars in name fails
417
# Bug#24392: SHOW ENGINE MUTEX STATUS is a synonym for SHOW INNODB STATUS
420
--error ER_UNKNOWN_STORAGE_ENGINE
421
show engine foobar status;
423
show engine foobar logs;
425
show engine foobar mutex;
427
--error ER_UNKNOWN_STORAGE_ENGINE
428
show engine mutex status;
430
show engine csv status;
433
# Bug#25081 SHOW FULL TABLES on table with latin chars in name fails
341
435
--disable_warnings
342
436
drop table if exists `été`;
343
437
--enable_warnings
344
438
create table `été` (field1 int);
346
440
drop table `été`;