~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2008-07-06 15:03:34 UTC
  • Revision ID: brian@tangent.org-20080706150334-xv3xa202trvs0712
USE_RAID cleanup, along with ftbench tools.

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