~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/t/information_schema.test

  • Committer: Brian Aker
  • Date: 2008-10-06 06:47:29 UTC
  • Revision ID: brian@tangent.org-20081006064729-2i9mhjkzyvow9xsm
RemoveĀ uint.

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
 
 
16
13
select * from information_schema.SCHEMATA where schema_name > 'm';
17
14
select schema_name from information_schema.schemata;
18
15
show databases like 't%';
19
16
show databases;
20
 
show databases where `database` = 't%';
21
17
 
22
18
# Test for information_schema.tables &
23
19
# show tables
34
30
where table_schema = "mysqltest" and table_name like "t%";
35
31
 
36
32
select * from information_schema.STATISTICS where TABLE_SCHEMA = "mysqltest";
37
 
show keys from t3 where Key_name = "a_data";
38
33
 
39
34
show tables like 't%';
40
35
--replace_column 8 # 12 # 13 #
42
37
show full columns from t3 like "a%";
43
38
select * from information_schema.COLUMNS where table_name="t1"
44
39
and column_name= "a";
45
 
show columns from mysqltest.t1 where field like "%a%";
46
40
 
47
41
connect (user3,localhost,mysqltest_2,,);
48
42
connection user3;
62
56
select * from information_schema.CHARACTER_SETS
63
57
where CHARACTER_SET_NAME like 'latin1%';
64
58
SHOW CHARACTER SET LIKE 'latin1%';
65
 
SHOW CHARACTER SET WHERE charset like 'latin1%';
66
59
 
67
60
# Test for information_schema.COLLATIONS &
68
61
# SHOW COLLATION
72
65
where COLLATION_NAME like 'latin1%';
73
66
--replace_column 5 #
74
67
SHOW COLLATION LIKE 'latin1%';
75
 
--replace_column 5 #
76
 
SHOW COLLATION WHERE collation like 'latin1%';
77
68
 
78
69
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
79
70
where COLLATION_NAME like 'latin1%';
99
90
select table_type from information_schema.tables
100
91
where table_schema="mysql" and table_name="user";
101
92
 
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
 
 
109
93
#
110
94
# Bug #7981:SHOW GLOBAL STATUS crashes server
111
95
#
139
123
create table t1
140
124
( x_bigint BIGINT,
141
125
  x_integer INTEGER,
142
 
  x_smallint SMALLINT,
 
126
  x_int int,
143
127
  x_decimal DECIMAL(5,3),
144
128
  x_numeric NUMERIC(5,3),
145
129
  x_real REAL,
172
156
from information_schema.columns
173
157
where table_name='t1';
174
158
drop table t1;
175
 
create table t1(f1 tinyint, f2 SMALLINT, f3 BIGINT, f4 int,
176
 
                f5 BIGINT, f6 TINYINT, f7 SMALLINT);
 
159
create table t1(f1 int, f2 int, f3 BIGINT, f4 int,
 
160
                f5 BIGINT, f6 int, f7 int);
177
161
select column_name, NUMERIC_PRECISION, NUMERIC_SCALE
178
162
from information_schema.columns
179
163
where table_name='t1';
191
175
drop table t1;
192
176
 
193
177
#
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
 
#
209
178
# Bug #9846 Inappropriate error displayed while dropping table from 'INFORMATION_SCHEMA'
210
179
#
211
180
--error ER_PARSE_ERROR
248
217
#
249
218
# Bug#14271 I_S: columns has no size for (var)binary columns
250
219
#
251
 
create table t1(f1 binary(32), f2 varbinary(64));
 
220
create table t1(f1 varbinary(32), f2 varbinary(64));
252
221
select character_maximum_length, character_octet_length
253
222
from information_schema.columns where table_name='t1';
254
223
drop table t1;
266
235
#
267
236
# Bug#19236 bad COLUMNS.CHARACTER_MAXIMUM_LENGHT and CHARACTER_OCTET_LENGTH
268
237
#
269
 
create table t1(f1 char(1) not null, f2 char(9) not null)
270
 
default character set utf8;
 
238
create table t1(f1 char(1) not null, f2 char(9) not null);
271
239
select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
272
240
information_schema.columns where table_schema='test' and table_name = 't1';
273
241
drop table t1;
329
297
#
330
298
# Bug#23299 Some queries against INFORMATION_SCHEMA with subqueries fail
331
299
#
332
 
create table t1 (f1 int(11));
333
 
create table t2 (f1 int(11), f2 int(11));
 
300
create table t1 (f1 int);
 
301
create table t2 (f1 int, f2 int);
334
302
 
335
303
select table_name from information_schema.tables
336
304
where table_schema = 'test' and table_name not in