~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to mysql-test/t/information_schema.test

Removed DBUG symbols and fixed TRUE/FALSE

Show diffs side-by-side

added added

removed removed

Lines of Context:
10
10
--enable_warnings
11
11
 
12
12
 
 
13
show variables where variable_name like "skip_show_database";
 
14
 
 
15
 
13
16
select * from information_schema.SCHEMATA where schema_name > 'm';
14
17
select schema_name from information_schema.schemata;
15
18
show databases like 't%';
16
19
show databases;
 
20
show databases where `database` = 't%';
17
21
 
18
22
# Test for information_schema.tables &
19
23
# show tables
30
34
where table_schema = "mysqltest" and table_name like "t%";
31
35
 
32
36
select * from information_schema.STATISTICS where TABLE_SCHEMA = "mysqltest";
 
37
show keys from t3 where Key_name = "a_data";
33
38
 
34
39
show tables like 't%';
35
40
--replace_column 8 # 12 # 13 #
37
42
show full columns from t3 like "a%";
38
43
select * from information_schema.COLUMNS where table_name="t1"
39
44
and column_name= "a";
 
45
show columns from mysqltest.t1 where field like "%a%";
40
46
 
41
47
connect (user3,localhost,mysqltest_2,,);
42
48
connection user3;
55
61
 
56
62
select * from information_schema.CHARACTER_SETS
57
63
where CHARACTER_SET_NAME like 'latin1%';
 
64
SHOW CHARACTER SET LIKE 'latin1%';
 
65
SHOW CHARACTER SET WHERE charset like 'latin1%';
58
66
 
59
67
# Test for information_schema.COLLATIONS &
60
68
# SHOW COLLATION
62
70
--replace_column 5 #
63
71
select * from information_schema.COLLATIONS
64
72
where COLLATION_NAME like 'latin1%';
 
73
--replace_column 5 #
 
74
SHOW COLLATION LIKE 'latin1%';
 
75
--replace_column 5 #
 
76
SHOW COLLATION WHERE collation like 'latin1%';
65
77
 
66
78
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
67
79
where COLLATION_NAME like 'latin1%';
87
99
select table_type from information_schema.tables
88
100
where table_schema="mysql" and table_name="user";
89
101
 
 
102
# test for 'show open tables ... where'
 
103
show open tables where `table` like "user";
 
104
# test for 'show status ... where'
 
105
show status where variable_name like "%database%";
 
106
# test for 'show variables ... where'
 
107
show variables where variable_name like "skip_show_databas";
 
108
 
90
109
#
91
110
# Bug #7981:SHOW GLOBAL STATUS crashes server
92
111
#
120
139
create table t1
121
140
( x_bigint BIGINT,
122
141
  x_integer INTEGER,
123
 
  x_int int,
 
142
  x_smallint SMALLINT,
124
143
  x_decimal DECIMAL(5,3),
125
144
  x_numeric NUMERIC(5,3),
126
145
  x_real REAL,
153
172
from information_schema.columns
154
173
where table_name='t1';
155
174
drop table t1;
156
 
create table t1(f1 int, f2 int, f3 BIGINT, f4 int,
157
 
                f5 BIGINT, f6 int, f7 int);
 
175
create table t1(f1 tinyint, f2 SMALLINT, f3 BIGINT, f4 int,
 
176
                f5 BIGINT, f6 TINYINT, f7 SMALLINT);
158
177
select column_name, NUMERIC_PRECISION, NUMERIC_SCALE
159
178
from information_schema.columns
160
179
where table_name='t1';
172
191
drop table t1;
173
192
 
174
193
#
 
194
# Bug #12636: SHOW TABLE STATUS with where condition containing a subquery
 
195
#             over information schema
 
196
#
 
197
 
 
198
CREATE TABLE t1 (a int);
 
199
CREATE TABLE t2 (b int);
 
200
 
 
201
--replace_column 8 # 12 # 13 #
 
202
SHOW TABLE STATUS FROM test
 
203
  WHERE name IN ( SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
 
204
                    WHERE TABLE_SCHEMA='test' AND TABLE_TYPE='BASE TABLE');
 
205
 
 
206
DROP TABLE t1,t2;
 
207
 
 
208
#
175
209
# Bug #9846 Inappropriate error displayed while dropping table from 'INFORMATION_SCHEMA'
176
210
#
177
211
--error ER_PARSE_ERROR
214
248
#
215
249
# Bug#14271 I_S: columns has no size for (var)binary columns
216
250
#
217
 
create table t1(f1 varbinary(32), f2 varbinary(64));
 
251
create table t1(f1 binary(32), f2 varbinary(64));
218
252
select character_maximum_length, character_octet_length
219
253
from information_schema.columns where table_name='t1';
220
254
drop table t1;
232
266
#
233
267
# Bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
234
268
#
235
 
create table t1(f1 char(1) not null, f2 char(9) not null);
 
269
create table t1(f1 char(1) not null, f2 char(9) not null)
 
270
default character set utf8;
236
271
select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
237
272
information_schema.columns where table_schema='test' and table_name = 't1';
238
273
drop table t1;
294
329
#
295
330
# Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail
296
331
#
297
 
create table t1 (f1 int);
298
 
create table t2 (f1 int, f2 int);
 
332
create table t1 (f1 int(11));
 
333
create table t2 (f1 int(11), f2 int(11));
299
334
 
300
335
select table_name from information_schema.tables
301
336
where table_schema = 'test' and table_name not in