~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/information_schema.result

  • Committer: Brian Aker
  • Date: 2009-11-12 16:13:04 UTC
  • mfrom: (1211.1.7 staging)
  • Revision ID: brian@gaz-20091112161304-opamiauv36fg0n6u
Rollup of Brian, Padraig, and Stewart patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
DROP TABLE IF EXISTS t0,t1,t2,t3,t4,t5;
 
2
select * from information_schema.SCHEMATA where schema_name > 'm';
 
3
CATALOG_NAME    SCHEMA_NAME     DEFAULT_CHARACTER_SET_NAME      DEFAULT_COLLATION_NAME  SQL_PATH
 
4
NULL    mysql   utf8    utf8_general_ci NULL
 
5
NULL    test    utf8    utf8_general_ci NULL
 
6
select schema_name from information_schema.schemata;
 
7
schema_name
 
8
information_schema
 
9
mysql
 
10
test
 
11
show databases like 't%';
 
12
Database (t%)
 
13
test
 
14
show databases;
 
15
Database
 
16
information_schema
 
17
mysql
 
18
test
 
19
create database mysqltest;
 
20
create table mysqltest.t1(a int, b VARCHAR(30), KEY string_data (b));
 
21
create table test.t2(a int);
 
22
create table t3(a int, KEY a_data (a));
 
23
create table mysqltest.t4(a int);
 
24
create table t5 (id int auto_increment primary key);
 
25
insert into t5 values (10);
 
26
select table_name from information_schema.TABLES
 
27
where table_schema = "mysqltest" and table_name like "t%";
 
28
table_name
 
29
t1
 
30
t4
 
31
select * from information_schema.STATISTICS where TABLE_SCHEMA = "mysqltest";
 
32
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      NON_UNIQUE      INDEX_SCHEMA    INDEX_NAME      SEQ_IN_INDEX    COLUMN_NAME     COLLATION       CARDINALITY     SUB_PART        PACKED  NULLABLE        INDEX_TYPE      COMMENT INDEX_COMMENT
 
33
NULL    mysqltest       t1      1       mysqltest       string_data     1       b       A       0       NULL    NULL    YES     BTREE           
 
34
show tables like 't%';
 
35
Tables_in_test (t%)
 
36
t2
 
37
t3
 
38
t5
 
39
show full columns from t3 like "a%";
 
40
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
 
41
a       int     NULL    YES     MUL     NULL            #       
 
42
select * from information_schema.COLUMNS where table_name="t1"
 
43
and column_name= "a";
 
44
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATA_TYPE       CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   CHARACTER_SET_NAME      COLLATION_NAME  COLUMN_TYPE     COLUMN_KEY      EXTRA   PRIVILEGES      COLUMN_COMMENT  STORAGE FORMAT
 
45
NULL    mysqltest       t1      a       1       NULL    YES     int     NULL    NULL    10      0       NULL    NULL    int                                     Default Default
 
46
select table_name, column_name, privileges from information_schema.columns 
 
47
where table_schema = 'mysqltest' and table_name = 't1';
 
48
table_name      column_name     privileges
 
49
t1      a       
 
50
t1      b       
 
51
show columns from mysqltest.t1;
 
52
Field   Type    Null    Key     Default Extra
 
53
a       int     YES             NULL    
 
54
b       varchar(30)     YES     MUL     NULL    
 
55
drop tables mysqltest.t4, mysqltest.t1, t2, t3, t5;
 
56
drop database mysqltest;
 
57
select * from information_schema.CHARACTER_SETS
 
58
where CHARACTER_SET_NAME like 'latin1%';
 
59
CHARACTER_SET_NAME      DEFAULT_COLLATE_NAME    DESCRIPTION     MAXLEN
 
60
select * from information_schema.COLLATIONS
 
61
where COLLATION_NAME like 'latin1%';
 
62
COLLATION_NAME  CHARACTER_SET_NAME      DESCRIPTION     ID      IS_DEFAULT      IS_COMPILED     SORTLEN
 
63
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
 
64
where COLLATION_NAME like 'latin1%';
 
65
COLLATION_NAME  CHARACTER_SET_NAME
 
66
select * from information_schema.table_names;
 
67
ERROR 42S02: Unknown table 'table_names' in information_schema
 
68
select column_type from information_schema.columns
 
69
where table_schema="information_schema" and table_name="COLUMNS" and
 
70
(column_name="character_set_name" or column_name="collation_name");
 
71
column_type
 
72
varchar(64)
 
73
varchar(64)
 
74
select TABLE_ROWS from information_schema.tables where 
 
75
table_schema="information_schema" and table_name="COLUMNS";
 
76
TABLE_ROWS
 
77
NULL
 
78
select table_type from information_schema.tables
 
79
where table_schema="mysql" and table_name="user";
 
80
table_type
 
81
select table_schema,table_name, column_name from
 
82
information_schema.columns 
 
83
where data_type = 'longtext';
 
84
table_schema    table_name      column_name
 
85
select table_name, column_name, data_type from information_schema.columns
 
86
where data_type = 'datetime';
 
87
table_name      column_name     data_type
 
88
INNODB_TRX      trx_started     datetime
 
89
INNODB_TRX      trx_wait_started        datetime
 
90
TABLES  CREATE_TIME     datetime
 
91
TABLES  UPDATE_TIME     datetime
 
92
TABLES  CHECK_TIME      datetime
 
93
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES A
 
94
WHERE NOT EXISTS 
 
95
(SELECT * FROM INFORMATION_SCHEMA.COLUMNS B
 
96
WHERE A.TABLE_SCHEMA = B.TABLE_SCHEMA
 
97
AND A.TABLE_NAME = B.TABLE_NAME);
 
98
COUNT(*)
 
99
0
 
100
create table t1
 
101
( x_bigint BIGINT,
 
102
x_integer INTEGER,
 
103
x_int int,
 
104
x_decimal DECIMAL(5,3),
 
105
x_numeric NUMERIC(5,3),
 
106
x_real REAL,
 
107
x_float FLOAT,
 
108
x_double_precision DOUBLE PRECISION );
 
109
SELECT COLUMN_NAME, CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH
 
110
FROM INFORMATION_SCHEMA.COLUMNS
 
111
WHERE TABLE_NAME= 't1';
 
112
COLUMN_NAME     CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH
 
113
x_bigint        NULL    NULL
 
114
x_integer       NULL    NULL
 
115
x_int   NULL    NULL
 
116
x_decimal       NULL    NULL
 
117
x_numeric       NULL    NULL
 
118
x_real  NULL    NULL
 
119
x_float NULL    NULL
 
120
x_double_precision      NULL    NULL
 
121
drop table t1;
 
122
SELECT table_schema, count(*) FROM information_schema.TABLES
 
123
WHERE table_name NOT LIKE 'ndb_%' AND 
 
124
table_name NOT LIKE 'falcon%' AND
 
125
table_name NOT LIKE 'MEMCACHED%'
 
126
GROUP BY TABLE_SCHEMA;
 
127
table_schema    count(*)
 
128
information_schema      24
 
129
show create database information_schema;
 
130
Database        Create Database
 
131
information_schema      CREATE DATABASE `information_schema`
 
132
create table t1(f1 LONGBLOB, f2 LONGTEXT);
 
133
select column_name,data_type,CHARACTER_OCTET_LENGTH,
 
134
CHARACTER_MAXIMUM_LENGTH
 
135
from information_schema.columns
 
136
where table_name='t1';
 
137
column_name     data_type       CHARACTER_OCTET_LENGTH  CHARACTER_MAXIMUM_LENGTH
 
138
f1      blob    4294967295      4294967295
 
139
f2      text    4294967295      4294967295
 
140
drop table t1;
 
141
create table t1(f1 int, f2 int, f3 BIGINT, f4 int,
 
142
f5 BIGINT, f6 int, f7 int);
 
143
select column_name, NUMERIC_PRECISION, NUMERIC_SCALE
 
144
from information_schema.columns
 
145
where table_name='t1';
 
146
column_name     NUMERIC_PRECISION       NUMERIC_SCALE
 
147
f1      10      0
 
148
f2      10      0
 
149
f3      19      0
 
150
f4      10      0
 
151
f5      19      0
 
152
f6      10      0
 
153
f7      10      0
 
154
drop table t1;
 
155
create table t1 (a int not null, b int);
 
156
use information_schema;
 
157
select column_name, column_default from columns
 
158
where table_schema='test' and table_name='t1';
 
159
column_name     column_default
 
160
a       NULL
 
161
b       NULL
 
162
use test;
 
163
show columns from t1;
 
164
Field   Type    Null    Key     Default Extra
 
165
a       int     NO              NULL    
 
166
b       int     YES             NULL    
 
167
drop table t1;
 
168
alter database information_schema;
 
169
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '' at line 1
 
170
drop database information_schema;
 
171
ERROR 42000: Access denied for user ''@'' to database 'information_schema'
 
172
drop table information_schema.tables;
 
173
ERROR 42000: Access denied for user ''@'' to database 'information_schema'
 
174
alter table information_schema.tables;
 
175
ERROR 42000: Access denied for user ''@'' to database 'information_schema'
 
176
use information_schema;
 
177
create temporary table schemata(f1 char(10));
 
178
ERROR 42000: Access denied for user ''@'' to database 'information_schema'
 
179
use test;
 
180
create table t1(id int);
 
181
insert into t1(id) values (1);
 
182
select 1 from (select 1 from test.t1) a;
 
183
1
 
184
1
 
185
use information_schema;
 
186
select 1 from (select 1 from test.t1) a;
 
187
1
 
188
1
 
189
use test;
 
190
drop table t1;
 
191
create temporary table t1(f1 int, index(f1));
 
192
show columns from t1;
 
193
Field   Type    Null    Key     Default Extra
 
194
f1      int     YES     MUL     NULL    
 
195
describe t1;
 
196
Field   Type    Null    Key     Default Extra
 
197
f1      int     YES     MUL     NULL    
 
198
show indexes from t1;
 
199
Table   Non_unique      Key_name        Seq_in_index    Column_name     Collation       Cardinality     Sub_part        Packed  Null    Index_type      Comment Index_Comment
 
200
t1      1       f1      1       f1      A       0       NULL    NULL    YES     BTREE           
 
201
drop table t1;
 
202
create table t1(f1 varbinary(32), f2 varbinary(64));
 
203
select character_maximum_length, character_octet_length
 
204
from information_schema.columns where table_name='t1';
 
205
character_maximum_length        character_octet_length
 
206
32      32
 
207
64      64
 
208
drop table t1;
 
209
select column_type, group_concat(table_schema, '.', table_name), count(*) as num
 
210
from information_schema.columns where
 
211
table_schema='information_schema' and
 
212
(column_type = 'varchar(7)' or column_type = 'varchar(20)'
 
213
 or column_type = 'varchar(27)')
 
214
group by column_type order by num;
 
215
column_type     group_concat(table_schema, '.', table_name)     num
 
216
varchar(20)     information_schema.MODULES      1
 
217
varchar(27)     information_schema.COLUMNS      1
 
218
create table t1(f1 char(1) not null, f2 char(9) not null);
 
219
select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
 
220
information_schema.columns where table_schema='test' and table_name = 't1';
 
221
CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH
 
222
1       4
 
223
9       36
 
224
drop table t1;
 
225
set @a:= '.';
 
226
create table t1(f1 char(5));
 
227
create table t2(f1 char(5));
 
228
select concat(@a, table_name), @a, table_name
 
229
from information_schema.tables where table_schema = 'test';
 
230
concat(@a, table_name)  @a      table_name
 
231
.t1     .       t1
 
232
.t2     .       t2
 
233
drop table t1,t2;
 
234
SELECT t.table_name, c1.column_name
 
235
FROM information_schema.tables t
 
236
INNER JOIN
 
237
information_schema.columns c1
 
238
ON t.table_schema = c1.table_schema AND
 
239
t.table_name = c1.table_name
 
240
WHERE t.table_schema = 'information_schema' AND
 
241
c1.ordinal_position =
 
242
( SELECT COALESCE(MIN(c2.ordinal_position),1)
 
243
FROM information_schema.columns c2
 
244
WHERE c2.table_schema = t.table_schema AND
 
245
c2.table_name = t.table_name AND
 
246
c2.column_name LIKE '%SCHEMA%'
 
247
        )
 
248
AND t.table_name NOT LIKE 'falcon%'
 
249
  AND t.table_name NOT LIKE 'MEMCACHED%';
 
250
table_name      column_name
 
251
CHARACTER_SETS  CHARACTER_SET_NAME
 
252
COLLATIONS      COLLATION_NAME
 
253
COLLATION_CHARACTER_SET_APPLICABILITY   COLLATION_NAME
 
254
COLUMNS TABLE_SCHEMA
 
255
GLOBAL_STATUS   VARIABLE_NAME
 
256
GLOBAL_VARIABLES        VARIABLE_NAME
 
257
INNODB_CMP      page_size
 
258
INNODB_CMPMEM   page_size
 
259
INNODB_CMPMEM_RESET     page_size
 
260
INNODB_CMP_RESET        page_size
 
261
INNODB_LOCKS    lock_id
 
262
INNODB_LOCK_WAITS       requesting_trx_id
 
263
INNODB_TRX      trx_id
 
264
KEY_COLUMN_USAGE        CONSTRAINT_SCHEMA
 
265
MODULES MODULE_NAME
 
266
PLUGINS PLUGIN_NAME
 
267
PROCESSLIST     ID
 
268
REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
 
269
SCHEMATA        SCHEMA_NAME
 
270
SESSION_STATUS  VARIABLE_NAME
 
271
SESSION_VARIABLES       VARIABLE_NAME
 
272
STATISTICS      TABLE_SCHEMA
 
273
TABLES  TABLE_SCHEMA
 
274
TABLE_CONSTRAINTS       CONSTRAINT_SCHEMA
 
275
SELECT t.table_name, c1.column_name
 
276
FROM information_schema.tables t
 
277
INNER JOIN
 
278
information_schema.columns c1
 
279
ON t.table_schema = c1.table_schema AND
 
280
t.table_name = c1.table_name
 
281
WHERE t.table_schema = 'information_schema' AND
 
282
c1.ordinal_position =
 
283
( SELECT COALESCE(MIN(c2.ordinal_position),1)
 
284
FROM information_schema.columns c2
 
285
WHERE c2.table_schema = 'information_schema' AND
 
286
c2.table_name = t.table_name AND
 
287
c2.column_name LIKE '%SCHEMA%'
 
288
        )
 
289
AND t.table_name NOT LIKE 'falcon%'
 
290
  AND t.table_name NOT LIKE 'MEMCACHED%';
 
291
table_name      column_name
 
292
CHARACTER_SETS  CHARACTER_SET_NAME
 
293
COLLATIONS      COLLATION_NAME
 
294
COLLATION_CHARACTER_SET_APPLICABILITY   COLLATION_NAME
 
295
COLUMNS TABLE_SCHEMA
 
296
GLOBAL_STATUS   VARIABLE_NAME
 
297
GLOBAL_VARIABLES        VARIABLE_NAME
 
298
INNODB_CMP      page_size
 
299
INNODB_CMPMEM   page_size
 
300
INNODB_CMPMEM_RESET     page_size
 
301
INNODB_CMP_RESET        page_size
 
302
INNODB_LOCKS    lock_id
 
303
INNODB_LOCK_WAITS       requesting_trx_id
 
304
INNODB_TRX      trx_id
 
305
KEY_COLUMN_USAGE        CONSTRAINT_SCHEMA
 
306
MODULES MODULE_NAME
 
307
PLUGINS PLUGIN_NAME
 
308
PROCESSLIST     ID
 
309
REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
 
310
SCHEMATA        SCHEMA_NAME
 
311
SESSION_STATUS  VARIABLE_NAME
 
312
SESSION_VARIABLES       VARIABLE_NAME
 
313
STATISTICS      TABLE_SCHEMA
 
314
TABLES  TABLE_SCHEMA
 
315
TABLE_CONSTRAINTS       CONSTRAINT_SCHEMA
 
316
SELECT MAX(table_name) FROM information_schema.tables;
 
317
MAX(table_name)
 
318
TABLE_CONSTRAINTS
 
319
SELECT table_name from information_schema.tables
 
320
WHERE table_name=(SELECT MAX(table_name)
 
321
FROM information_schema.tables);
 
322
table_name
 
323
TABLE_CONSTRAINTS
 
324
create table t1 (f1 int);
 
325
create table t2 (f1 int, f2 int);
 
326
select table_name from information_schema.tables
 
327
where table_schema = 'test' and table_name not in
 
328
(select table_name from information_schema.columns
 
329
where table_schema = 'test' and column_name = 'f3');
 
330
table_name
 
331
t1
 
332
t2
 
333
drop table t1,t2;
 
334
select 1 as f1 from information_schema.tables  where "CHARACTER_SETS"=
 
335
(select cast(table_name as char)  from information_schema.tables
 
336
order by table_name limit 1) limit 1;
 
337
f1
 
338
1
 
339
select t.table_name, group_concat(t.table_schema, '.', t.table_name),
 
340
count(*) as num1
 
341
from information_schema.tables t
 
342
inner join information_schema.columns c1
 
343
on t.table_schema = c1.table_schema AND t.table_name = c1.table_name
 
344
where t.table_schema = 'information_schema' AND
 
345
t.table_name not like 'falcon%' AND
 
346
t.table_name not like 'MEMCACHED%' AND
 
347
c1.ordinal_position =
 
348
(select isnull(c2.column_type) -
 
349
isnull(group_concat(c2.table_schema, '.', c2.table_name)) +
 
350
count(*) as num
 
351
from information_schema.columns c2 where
 
352
c2.table_schema='information_schema' and
 
353
(c2.column_type = 'varchar(7)' or c2.column_type = 'varchar(20)')
 
354
group by c2.column_type order by num limit 1)
 
355
group by t.table_name order by num1, t.table_name;
 
356
table_name      group_concat(t.table_schema, '.', t.table_name) num1
 
357
CHARACTER_SETS  information_schema.CHARACTER_SETS       1
 
358
COLLATIONS      information_schema.COLLATIONS   1
 
359
COLLATION_CHARACTER_SET_APPLICABILITY   information_schema.COLLATION_CHARACTER_SET_APPLICABILITY        1
 
360
COLUMNS information_schema.COLUMNS      1
 
361
GLOBAL_STATUS   information_schema.GLOBAL_STATUS        1
 
362
GLOBAL_VARIABLES        information_schema.GLOBAL_VARIABLES     1
 
363
INNODB_CMP      information_schema.INNODB_CMP   1
 
364
INNODB_CMPMEM   information_schema.INNODB_CMPMEM        1
 
365
INNODB_CMPMEM_RESET     information_schema.INNODB_CMPMEM_RESET  1
 
366
INNODB_CMP_RESET        information_schema.INNODB_CMP_RESET     1
 
367
INNODB_LOCKS    information_schema.INNODB_LOCKS 1
 
368
INNODB_LOCK_WAITS       information_schema.INNODB_LOCK_WAITS    1
 
369
INNODB_TRX      information_schema.INNODB_TRX   1
 
370
KEY_COLUMN_USAGE        information_schema.KEY_COLUMN_USAGE     1
 
371
MODULES information_schema.MODULES      1
 
372
PLUGINS information_schema.PLUGINS      1
 
373
PROCESSLIST     information_schema.PROCESSLIST  1
 
374
REFERENTIAL_CONSTRAINTS information_schema.REFERENTIAL_CONSTRAINTS      1
 
375
SCHEMATA        information_schema.SCHEMATA     1
 
376
SESSION_STATUS  information_schema.SESSION_STATUS       1
 
377
SESSION_VARIABLES       information_schema.SESSION_VARIABLES    1
 
378
STATISTICS      information_schema.STATISTICS   1
 
379
TABLES  information_schema.TABLES       1
 
380
TABLE_CONSTRAINTS       information_schema.TABLE_CONSTRAINTS    1
 
381
alter database;
 
382
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '' at line 1
 
383
alter database test;
 
384
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your Drizzle server version for the right syntax to use near '' at line 1
 
385
create table t1 (
 
386
f1 varchar(50),
 
387
f2 varchar(50) not null,
 
388
f3 varchar(50) default '',
 
389
f4 varchar(50) default NULL,
 
390
f5 bigint not null,
 
391
f6 bigint not null default 10,
 
392
f7 datetime not null,
 
393
f8 datetime default '2006-01-01'
 
394
);
 
395
select column_default from information_schema.columns where table_name= 't1';
 
396
column_default
 
397
NULL
 
398
NULL
 
399
 
 
400
NULL
 
401
NULL
 
402
10
 
403
NULL
 
404
2006-01-01 00:00:00
 
405
show columns from t1;
 
406
Field   Type    Null    Key     Default Extra
 
407
f1      varchar(50)     YES             NULL    
 
408
f2      varchar(50)     NO              NULL    
 
409
f3      varchar(50)     YES                     
 
410
f4      varchar(50)     YES             NULL    
 
411
f5      bigint  NO              NULL    
 
412
f6      bigint  NO              10      
 
413
f7      datetime        NO              NULL    
 
414
f8      datetime        YES             2006-01-01 00:00:00     
 
415
drop table t1;
 
416
show fields from information_schema.table_names;
 
417
ERROR 42S02: Unknown table 'table_names' in information_schema
 
418
show keys from information_schema.table_names;
 
419
ERROR 42S02: Unknown table 'table_names' in information_schema
 
420
SET max_heap_table_size = DEFAULT;
 
421
USE test;
 
422
End of 5.0 tests.
 
423
SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
 
424
WHERE SCHEMA_NAME ='information_schema';
 
425
SCHEMA_NAME
 
426
information_schema
 
427
SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES
 
428
WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db';
 
429
TABLE_COLLATION
 
430
select * from information_schema.columns where table_schema = NULL;
 
431
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATA_TYPE       CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   CHARACTER_SET_NAME      COLLATION_NAME  COLUMN_TYPE     COLUMN_KEY      EXTRA   PRIVILEGES      COLUMN_COMMENT  STORAGE FORMAT
 
432
select * from `information_schema`.`COLUMNS` where `TABLE_NAME` = NULL;
 
433
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATA_TYPE       CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   CHARACTER_SET_NAME      COLLATION_NAME  COLUMN_TYPE     COLUMN_KEY      EXTRA   PRIVILEGES      COLUMN_COMMENT  STORAGE FORMAT
 
434
select * from `information_schema`.`KEY_COLUMN_USAGE` where `TABLE_SCHEMA` = NULL;
 
435
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        POSITION_IN_UNIQUE_CONSTRAINT   REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME   REFERENCED_COLUMN_NAME
 
436
select * from `information_schema`.`KEY_COLUMN_USAGE` where `TABLE_NAME` = NULL;
 
437
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        POSITION_IN_UNIQUE_CONSTRAINT   REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME   REFERENCED_COLUMN_NAME
 
438
select * from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `CONSTRAINT_SCHEMA` = NULL;
 
439
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG       UNIQUE_CONSTRAINT_SCHEMA        UNIQUE_CONSTRAINT_NAME  MATCH_OPTION    UPDATE_RULE     DELETE_RULE     TABLE_NAME      REFERENCED_TABLE_NAME
 
440
select * from `information_schema`.`REFERENTIAL_CONSTRAINTS` where `TABLE_NAME` = NULL;
 
441
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG       UNIQUE_CONSTRAINT_SCHEMA        UNIQUE_CONSTRAINT_NAME  MATCH_OPTION    UPDATE_RULE     DELETE_RULE     TABLE_NAME      REFERENCED_TABLE_NAME
 
442
select * from information_schema.schemata where schema_name = NULL;
 
443
CATALOG_NAME    SCHEMA_NAME     DEFAULT_CHARACTER_SET_NAME      DEFAULT_COLLATION_NAME  SQL_PATH
 
444
select * from `information_schema`.`STATISTICS` where `TABLE_SCHEMA` = NULL;
 
445
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      NON_UNIQUE      INDEX_SCHEMA    INDEX_NAME      SEQ_IN_INDEX    COLUMN_NAME     COLLATION       CARDINALITY     SUB_PART        PACKED  NULLABLE        INDEX_TYPE      COMMENT INDEX_COMMENT
 
446
select * from `information_schema`.`STATISTICS` where `TABLE_NAME` = NULL;
 
447
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      NON_UNIQUE      INDEX_SCHEMA    INDEX_NAME      SEQ_IN_INDEX    COLUMN_NAME     COLLATION       CARDINALITY     SUB_PART        PACKED  NULLABLE        INDEX_TYPE      COMMENT INDEX_COMMENT
 
448
select * from information_schema.tables where table_schema = NULL;
 
449
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      TABLE_TYPE      ENGINE  VERSION ROW_FORMAT      TABLE_ROWS      AVG_ROW_LENGTH  DATA_LENGTH     MAX_DATA_LENGTH INDEX_LENGTH    DATA_FREE       AUTO_INCREMENT  CREATE_TIME     UPDATE_TIME     CHECK_TIME      TABLE_COLLATION CHECKSUM        CREATE_OPTIONS  TABLE_COMMENT
 
450
select * from information_schema.tables where table_catalog = NULL;
 
451
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      TABLE_TYPE      ENGINE  VERSION ROW_FORMAT      TABLE_ROWS      AVG_ROW_LENGTH  DATA_LENGTH     MAX_DATA_LENGTH INDEX_LENGTH    DATA_FREE       AUTO_INCREMENT  CREATE_TIME     UPDATE_TIME     CHECK_TIME      TABLE_COLLATION CHECKSUM        CREATE_OPTIONS  TABLE_COMMENT
 
452
select * from information_schema.tables where table_name = NULL;
 
453
TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      TABLE_TYPE      ENGINE  VERSION ROW_FORMAT      TABLE_ROWS      AVG_ROW_LENGTH  DATA_LENGTH     MAX_DATA_LENGTH INDEX_LENGTH    DATA_FREE       AUTO_INCREMENT  CREATE_TIME     UPDATE_TIME     CHECK_TIME      TABLE_COLLATION CHECKSUM        CREATE_OPTIONS  TABLE_COMMENT
 
454
select * from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_SCHEMA` = NULL;
 
455
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME TABLE_SCHEMA    TABLE_NAME      CONSTRAINT_TYPE
 
456
select * from `information_schema`.`TABLE_CONSTRAINTS` where `TABLE_NAME` = NULL;
 
457
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME TABLE_SCHEMA    TABLE_NAME      CONSTRAINT_TYPE
 
458
#
 
459
# Test that the query is visible to self and others.
 
460
#
 
461
SELECT info FROM information_schema.processlist WHERE id = CONNECTION_ID();
 
462
info
 
463
SELECT info FROM information_schema.processlist WHERE id = CONNECTION_ID()
 
464
show processlist;
 
465
Id      User    Host    db      Command Time    State   Info
 
466
#       #       #       mysqltest       Sleep   #       #       NULL
 
467
#       #       #       test    Sleep   #       #       NULL
 
468
#       #       #       test    Query   #       #       show processlist
 
469
SELECT info, command, db
 
470
FROM information_schema.processlist
 
471
WHERE id = CONNECTION_ID();
 
472
info    command db
 
473
SELECT info, command, db
 
474
FROM information_schema.processlist
 
475
WHERE id = CONNECTION_ID()      Query   test
 
476
SELECT *
 
477
FROM information_schema.character_sets
 
478
ORDER BY character_set_name;
 
479
CHARACTER_SET_NAME      DEFAULT_COLLATE_NAME    DESCRIPTION     MAXLEN
 
480
binary  binary          1
 
481
utf8    utf8_general_ci UTF-8 Unicode   4
 
482
SELECT *
 
483
FROM information_schema.collations
 
484
ORDER BY collation_name;
 
485
COLLATION_NAME  CHARACTER_SET_NAME      DESCRIPTION     ID      IS_DEFAULT      IS_COMPILED     SORTLEN
 
486
binary  binary  63      0       Yes     1       0
 
487
utf8_bin        utf8    46      0       Yes     1       0
 
488
utf8_czech_ci   utf8    234     0       Yes     8       0
 
489
utf8_danish_ci  utf8    235     0       Yes     8       0
 
490
utf8_esperanto_ci       utf8    241     0       Yes     8       0
 
491
utf8_estonian_ci        utf8    230     0       Yes     8       0
 
492
utf8_general_ci utf8    45      0       Yes     1       0
 
493
utf8_hungarian_ci       utf8    242     0       Yes     8       0
 
494
utf8_icelandic_ci       utf8    225     0       Yes     8       0
 
495
utf8_latvian_ci utf8    226     0       Yes     8       0
 
496
utf8_lithuanian_ci      utf8    236     0       Yes     8       0
 
497
utf8_persian_ci utf8    240     0       Yes     8       0
 
498
utf8_polish_ci  utf8    229     0       Yes     8       0
 
499
utf8_romanian_ci        utf8    227     0       Yes     8       0
 
500
utf8_roman_ci   utf8    239     0       Yes     8       0
 
501
utf8_sinhala_ci utf8    243     0       Yes     8       0
 
502
utf8_slovak_ci  utf8    237     0       Yes     8       0
 
503
utf8_slovenian_ci       utf8    228     0       Yes     8       0
 
504
utf8_spanish2_ci        utf8    238     0       Yes     8       0
 
505
utf8_spanish_ci utf8    231     0       Yes     8       0
 
506
utf8_swedish_ci utf8    232     0       Yes     8       0
 
507
utf8_turkish_ci utf8    233     0       Yes     8       0
 
508
utf8_unicode_ci utf8    224     0       Yes     8       0
 
509
SELECT * 
 
510
FROM information_schema.collation_character_set_applicability
 
511
ORDER BY collation_name;
 
512
COLLATION_NAME  CHARACTER_SET_NAME
 
513
binary  binary
 
514
utf8_bin        utf8
 
515
utf8_czech_ci   utf8
 
516
utf8_danish_ci  utf8
 
517
utf8_esperanto_ci       utf8
 
518
utf8_estonian_ci        utf8
 
519
utf8_general_ci utf8
 
520
utf8_hungarian_ci       utf8
 
521
utf8_icelandic_ci       utf8
 
522
utf8_latvian_ci utf8
 
523
utf8_lithuanian_ci      utf8
 
524
utf8_persian_ci utf8
 
525
utf8_polish_ci  utf8
 
526
utf8_romanian_ci        utf8
 
527
utf8_roman_ci   utf8
 
528
utf8_sinhala_ci utf8
 
529
utf8_slovak_ci  utf8
 
530
utf8_slovenian_ci       utf8
 
531
utf8_spanish2_ci        utf8
 
532
utf8_spanish_ci utf8
 
533
utf8_swedish_ci utf8
 
534
utf8_turkish_ci utf8
 
535
utf8_unicode_ci utf8
 
536
SELECT table_name, column_name
 
537
FROM information_schema.columns
 
538
WHERE table_name NOT LIKE 'MEMCACHED%'
 
539
ORDER BY table_name;
 
540
table_name      column_name
 
541
CHARACTER_SETS  CHARACTER_SET_NAME
 
542
CHARACTER_SETS  DEFAULT_COLLATE_NAME
 
543
CHARACTER_SETS  DESCRIPTION
 
544
CHARACTER_SETS  MAXLEN
 
545
COLLATIONS      SORTLEN
 
546
COLLATIONS      IS_COMPILED
 
547
COLLATIONS      IS_DEFAULT
 
548
COLLATIONS      ID
 
549
COLLATIONS      DESCRIPTION
 
550
COLLATIONS      CHARACTER_SET_NAME
 
551
COLLATIONS      COLLATION_NAME
 
552
COLLATION_CHARACTER_SET_APPLICABILITY   CHARACTER_SET_NAME
 
553
COLLATION_CHARACTER_SET_APPLICABILITY   COLLATION_NAME
 
554
COLUMNS CHARACTER_SET_NAME
 
555
COLUMNS COLLATION_NAME
 
556
COLUMNS COLUMN_TYPE
 
557
COLUMNS COLUMN_KEY
 
558
COLUMNS EXTRA
 
559
COLUMNS PRIVILEGES
 
560
COLUMNS COLUMN_COMMENT
 
561
COLUMNS STORAGE
 
562
COLUMNS FORMAT
 
563
COLUMNS NUMERIC_SCALE
 
564
COLUMNS NUMERIC_PRECISION
 
565
COLUMNS CHARACTER_OCTET_LENGTH
 
566
COLUMNS TABLE_CATALOG
 
567
COLUMNS TABLE_SCHEMA
 
568
COLUMNS TABLE_NAME
 
569
COLUMNS COLUMN_NAME
 
570
COLUMNS ORDINAL_POSITION
 
571
COLUMNS COLUMN_DEFAULT
 
572
COLUMNS IS_NULLABLE
 
573
COLUMNS DATA_TYPE
 
574
COLUMNS CHARACTER_MAXIMUM_LENGTH
 
575
GLOBAL_STATUS   VARIABLE_VALUE
 
576
GLOBAL_STATUS   VARIABLE_NAME
 
577
GLOBAL_VARIABLES        VARIABLE_NAME
 
578
GLOBAL_VARIABLES        VARIABLE_VALUE
 
579
INNODB_CMP      uncompress_time
 
580
INNODB_CMP      uncompress_ops
 
581
INNODB_CMP      compress_time
 
582
INNODB_CMP      compress_ops_ok
 
583
INNODB_CMP      compress_ops
 
584
INNODB_CMP      page_size
 
585
INNODB_CMPMEM   relocation_time
 
586
INNODB_CMPMEM   relocation_ops
 
587
INNODB_CMPMEM   pages_free
 
588
INNODB_CMPMEM   pages_used
 
589
INNODB_CMPMEM   page_size
 
590
INNODB_CMPMEM_RESET     relocation_time
 
591
INNODB_CMPMEM_RESET     relocation_ops
 
592
INNODB_CMPMEM_RESET     pages_free
 
593
INNODB_CMPMEM_RESET     pages_used
 
594
INNODB_CMPMEM_RESET     page_size
 
595
INNODB_CMP_RESET        uncompress_time
 
596
INNODB_CMP_RESET        uncompress_ops
 
597
INNODB_CMP_RESET        compress_time
 
598
INNODB_CMP_RESET        compress_ops_ok
 
599
INNODB_CMP_RESET        compress_ops
 
600
INNODB_CMP_RESET        page_size
 
601
INNODB_LOCKS    lock_data
 
602
INNODB_LOCKS    lock_rec
 
603
INNODB_LOCKS    lock_page
 
604
INNODB_LOCKS    lock_space
 
605
INNODB_LOCKS    lock_index
 
606
INNODB_LOCKS    lock_table
 
607
INNODB_LOCKS    lock_type
 
608
INNODB_LOCKS    lock_mode
 
609
INNODB_LOCKS    lock_trx_id
 
610
INNODB_LOCKS    lock_id
 
611
INNODB_LOCK_WAITS       blocking_lock_id
 
612
INNODB_LOCK_WAITS       blocking_trx_id
 
613
INNODB_LOCK_WAITS       requested_lock_id
 
614
INNODB_LOCK_WAITS       requesting_trx_id
 
615
INNODB_TRX      trx_query
 
616
INNODB_TRX      trx_mysql_thread_id
 
617
INNODB_TRX      trx_weight
 
618
INNODB_TRX      trx_wait_started
 
619
INNODB_TRX      trx_requested_lock_id
 
620
INNODB_TRX      trx_started
 
621
INNODB_TRX      trx_state
 
622
INNODB_TRX      trx_id
 
623
KEY_COLUMN_USAGE        ORDINAL_POSITION
 
624
KEY_COLUMN_USAGE        POSITION_IN_UNIQUE_CONSTRAINT
 
625
KEY_COLUMN_USAGE        REFERENCED_TABLE_SCHEMA
 
626
KEY_COLUMN_USAGE        REFERENCED_TABLE_NAME
 
627
KEY_COLUMN_USAGE        REFERENCED_COLUMN_NAME
 
628
KEY_COLUMN_USAGE        COLUMN_NAME
 
629
KEY_COLUMN_USAGE        TABLE_NAME
 
630
KEY_COLUMN_USAGE        TABLE_SCHEMA
 
631
KEY_COLUMN_USAGE        TABLE_CATALOG
 
632
KEY_COLUMN_USAGE        CONSTRAINT_NAME
 
633
KEY_COLUMN_USAGE        CONSTRAINT_SCHEMA
 
634
KEY_COLUMN_USAGE        CONSTRAINT_CATALOG
 
635
MODULES MODULE_LICENSE
 
636
MODULES MODULE_DESCRIPTION
 
637
MODULES MODULE_LIBRARY
 
638
MODULES IS_BUILTIN
 
639
MODULES MODULE_AUTHOR
 
640
MODULES MODULE_VERSION
 
641
MODULES MODULE_NAME
 
642
PLUGINS MODULE_NAME
 
643
PLUGINS IS_ACTIVE
 
644
PLUGINS PLUGIN_TYPE
 
645
PLUGINS PLUGIN_NAME
 
646
PROCESSLIST     INFO
 
647
PROCESSLIST     STATE
 
648
PROCESSLIST     TIME
 
649
PROCESSLIST     COMMAND
 
650
PROCESSLIST     DB
 
651
PROCESSLIST     HOST
 
652
PROCESSLIST     USER
 
653
PROCESSLIST     ID
 
654
REFERENTIAL_CONSTRAINTS REFERENCED_TABLE_NAME
 
655
REFERENTIAL_CONSTRAINTS TABLE_NAME
 
656
REFERENTIAL_CONSTRAINTS DELETE_RULE
 
657
REFERENTIAL_CONSTRAINTS UPDATE_RULE
 
658
REFERENTIAL_CONSTRAINTS MATCH_OPTION
 
659
REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_NAME
 
660
REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_SCHEMA
 
661
REFERENTIAL_CONSTRAINTS UNIQUE_CONSTRAINT_CATALOG
 
662
REFERENTIAL_CONSTRAINTS CONSTRAINT_NAME
 
663
REFERENTIAL_CONSTRAINTS CONSTRAINT_SCHEMA
 
664
REFERENTIAL_CONSTRAINTS CONSTRAINT_CATALOG
 
665
SCHEMATA        SQL_PATH
 
666
SCHEMATA        DEFAULT_COLLATION_NAME
 
667
SCHEMATA        DEFAULT_CHARACTER_SET_NAME
 
668
SCHEMATA        SCHEMA_NAME
 
669
SCHEMATA        CATALOG_NAME
 
670
SESSION_STATUS  VARIABLE_NAME
 
671
SESSION_STATUS  VARIABLE_VALUE
 
672
SESSION_VARIABLES       VARIABLE_VALUE
 
673
SESSION_VARIABLES       VARIABLE_NAME
 
674
STATISTICS      INDEX_COMMENT
 
675
STATISTICS      COMMENT
 
676
STATISTICS      INDEX_TYPE
 
677
STATISTICS      NULLABLE
 
678
STATISTICS      PACKED
 
679
STATISTICS      SUB_PART
 
680
STATISTICS      CARDINALITY
 
681
STATISTICS      COLLATION
 
682
STATISTICS      COLUMN_NAME
 
683
STATISTICS      TABLE_CATALOG
 
684
STATISTICS      TABLE_SCHEMA
 
685
STATISTICS      TABLE_NAME
 
686
STATISTICS      NON_UNIQUE
 
687
STATISTICS      INDEX_SCHEMA
 
688
STATISTICS      INDEX_NAME
 
689
STATISTICS      SEQ_IN_INDEX
 
690
TABLES  DATA_FREE
 
691
TABLES  AUTO_INCREMENT
 
692
TABLES  CREATE_TIME
 
693
TABLES  UPDATE_TIME
 
694
TABLES  CHECK_TIME
 
695
TABLES  TABLE_COLLATION
 
696
TABLES  CHECKSUM
 
697
TABLES  CREATE_OPTIONS
 
698
TABLES  TABLE_COMMENT
 
699
TABLES  INDEX_LENGTH
 
700
TABLES  MAX_DATA_LENGTH
 
701
TABLES  DATA_LENGTH
 
702
TABLES  TABLE_CATALOG
 
703
TABLES  TABLE_SCHEMA
 
704
TABLES  TABLE_NAME
 
705
TABLES  TABLE_TYPE
 
706
TABLES  ENGINE
 
707
TABLES  VERSION
 
708
TABLES  ROW_FORMAT
 
709
TABLES  TABLE_ROWS
 
710
TABLES  AVG_ROW_LENGTH
 
711
TABLE_CONSTRAINTS       TABLE_NAME
 
712
TABLE_CONSTRAINTS       TABLE_SCHEMA
 
713
TABLE_CONSTRAINTS       CONSTRAINT_NAME
 
714
TABLE_CONSTRAINTS       CONSTRAINT_SCHEMA
 
715
TABLE_CONSTRAINTS       CONSTRAINT_CATALOG
 
716
TABLE_CONSTRAINTS       CONSTRAINT_TYPE
 
717
SELECT *
 
718
FROM information_schema.key_column_usage;
 
719
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME TABLE_CATALOG   TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        POSITION_IN_UNIQUE_CONSTRAINT   REFERENCED_TABLE_SCHEMA REFERENCED_TABLE_NAME   REFERENCED_COLUMN_NAME
 
720
SELECT * 
 
721
FROM information_schema.referential_constraints;
 
722
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME UNIQUE_CONSTRAINT_CATALOG       UNIQUE_CONSTRAINT_SCHEMA        UNIQUE_CONSTRAINT_NAME  MATCH_OPTION    UPDATE_RULE     DELETE_RULE     TABLE_NAME      REFERENCED_TABLE_NAME
 
723
SELECT catalog_name, schema_name
 
724
FROM information_schema.schemata
 
725
ORDER BY schema_name;
 
726
catalog_name    schema_name
 
727
NULL    information_schema
 
728
NULL    mysql
 
729
NULL    test
 
730
SELECT *
 
731
FROM information_schema.session_status
 
732
ORDER BY variable_name;
 
733
VARIABLE_NAME   VARIABLE_VALUE
 
734
#       #
 
735
#       #
 
736
#       #
 
737
#       #
 
738
#       #
 
739
#       #
 
740
#       #
 
741
#       #
 
742
#       #
 
743
#       #
 
744
#       #
 
745
#       #
 
746
#       #
 
747
#       #
 
748
#       #
 
749
#       #
 
750
#       #
 
751
#       #
 
752
#       #
 
753
#       #
 
754
#       #
 
755
#       #
 
756
#       #
 
757
#       #
 
758
#       #
 
759
#       #
 
760
#       #
 
761
#       #
 
762
#       #
 
763
#       #
 
764
#       #
 
765
#       #
 
766
#       #
 
767
#       #
 
768
#       #
 
769
#       #
 
770
#       #
 
771
#       #
 
772
#       #
 
773
#       #
 
774
#       #
 
775
#       #
 
776
#       #
 
777
#       #
 
778
#       #
 
779
#       #
 
780
#       #
 
781
#       #
 
782
#       #
 
783
#       #
 
784
#       #
 
785
#       #
 
786
#       #
 
787
#       #
 
788
#       #
 
789
#       #
 
790
#       #
 
791
#       #
 
792
#       #
 
793
#       #
 
794
#       #
 
795
#       #
 
796
#       #
 
797
#       #
 
798
#       #
 
799
#       #
 
800
#       #
 
801
#       #
 
802
#       #
 
803
#       #
 
804
#       #
 
805
#       #
 
806
#       #
 
807
#       #
 
808
#       #
 
809
#       #
 
810
#       #
 
811
#       #
 
812
#       #
 
813
#       #
 
814
#       #
 
815
#       #
 
816
#       #
 
817
#       #
 
818
#       #
 
819
#       #
 
820
#       #
 
821
#       #
 
822
#       #
 
823
#       #
 
824
#       #
 
825
#       #
 
826
#       #
 
827
#       #
 
828
#       #
 
829
#       #
 
830
#       #
 
831
#       #
 
832
#       #
 
833
#       #
 
834
#       #
 
835
#       #
 
836
#       #
 
837
#       #
 
838
SHOW STATUS;
 
839
Variable_name   Value
 
840
#       #
 
841
#       #
 
842
#       #
 
843
#       #
 
844
#       #
 
845
#       #
 
846
#       #
 
847
#       #
 
848
#       #
 
849
#       #
 
850
#       #
 
851
#       #
 
852
#       #
 
853
#       #
 
854
#       #
 
855
#       #
 
856
#       #
 
857
#       #
 
858
#       #
 
859
#       #
 
860
#       #
 
861
#       #
 
862
#       #
 
863
#       #
 
864
#       #
 
865
#       #
 
866
#       #
 
867
#       #
 
868
#       #
 
869
#       #
 
870
#       #
 
871
#       #
 
872
#       #
 
873
#       #
 
874
#       #
 
875
#       #
 
876
#       #
 
877
#       #
 
878
#       #
 
879
#       #
 
880
#       #
 
881
#       #
 
882
#       #
 
883
#       #
 
884
#       #
 
885
#       #
 
886
#       #
 
887
#       #
 
888
#       #
 
889
#       #
 
890
#       #
 
891
#       #
 
892
#       #
 
893
#       #
 
894
#       #
 
895
#       #
 
896
#       #
 
897
#       #
 
898
#       #
 
899
#       #
 
900
#       #
 
901
#       #
 
902
#       #
 
903
#       #
 
904
#       #
 
905
#       #
 
906
#       #
 
907
#       #
 
908
#       #
 
909
#       #
 
910
#       #
 
911
#       #
 
912
#       #
 
913
#       #
 
914
#       #
 
915
#       #
 
916
#       #
 
917
#       #
 
918
#       #
 
919
#       #
 
920
#       #
 
921
#       #
 
922
#       #
 
923
#       #
 
924
#       #
 
925
#       #
 
926
#       #
 
927
#       #
 
928
#       #
 
929
#       #
 
930
#       #
 
931
#       #
 
932
#       #
 
933
#       #
 
934
#       #
 
935
#       #
 
936
#       #
 
937
#       #
 
938
#       #
 
939
#       #
 
940
#       #
 
941
#       #
 
942
#       #
 
943
#       #
 
944
SELECT *
 
945
FROM information_schema.global_status
 
946
ORDER BY variable_name;
 
947
VARIABLE_NAME   VARIABLE_VALUE
 
948
#       #
 
949
#       #
 
950
#       #
 
951
#       #
 
952
#       #
 
953
#       #
 
954
#       #
 
955
#       #
 
956
#       #
 
957
#       #
 
958
#       #
 
959
#       #
 
960
#       #
 
961
#       #
 
962
#       #
 
963
#       #
 
964
#       #
 
965
#       #
 
966
#       #
 
967
#       #
 
968
#       #
 
969
#       #
 
970
#       #
 
971
#       #
 
972
#       #
 
973
#       #
 
974
#       #
 
975
#       #
 
976
#       #
 
977
#       #
 
978
#       #
 
979
#       #
 
980
#       #
 
981
#       #
 
982
#       #
 
983
#       #
 
984
#       #
 
985
#       #
 
986
#       #
 
987
#       #
 
988
#       #
 
989
#       #
 
990
#       #
 
991
#       #
 
992
#       #
 
993
#       #
 
994
#       #
 
995
#       #
 
996
#       #
 
997
#       #
 
998
#       #
 
999
#       #
 
1000
#       #
 
1001
#       #
 
1002
#       #
 
1003
#       #
 
1004
#       #
 
1005
#       #
 
1006
#       #
 
1007
#       #
 
1008
#       #
 
1009
#       #
 
1010
#       #
 
1011
#       #
 
1012
#       #
 
1013
#       #
 
1014
#       #
 
1015
#       #
 
1016
#       #
 
1017
#       #
 
1018
#       #
 
1019
#       #
 
1020
#       #
 
1021
#       #
 
1022
#       #
 
1023
#       #
 
1024
#       #
 
1025
#       #
 
1026
#       #
 
1027
#       #
 
1028
#       #
 
1029
#       #
 
1030
#       #
 
1031
#       #
 
1032
#       #
 
1033
#       #
 
1034
#       #
 
1035
#       #
 
1036
#       #
 
1037
#       #
 
1038
#       #
 
1039
#       #
 
1040
#       #
 
1041
#       #
 
1042
#       #
 
1043
#       #
 
1044
#       #
 
1045
#       #
 
1046
#       #
 
1047
#       #
 
1048
#       #
 
1049
#       #
 
1050
#       #
 
1051
#       #
 
1052
SELECT *
 
1053
FROM information_schema.table_constraints;
 
1054
CONSTRAINT_CATALOG      CONSTRAINT_SCHEMA       CONSTRAINT_NAME TABLE_SCHEMA    TABLE_NAME      CONSTRAINT_TYPE
 
1055
SELECT table_schema, table_name
 
1056
FROM information_schema.tables
 
1057
WHERE table_name NOT LIKE 'MEMCACHED%'
 
1058
ORDER BY table_name;
 
1059
table_schema    table_name
 
1060
information_schema      CHARACTER_SETS
 
1061
information_schema      COLLATIONS
 
1062
information_schema      COLLATION_CHARACTER_SET_APPLICABILITY
 
1063
information_schema      COLUMNS
 
1064
information_schema      GLOBAL_STATUS
 
1065
information_schema      GLOBAL_VARIABLES
 
1066
information_schema      INNODB_CMP
 
1067
information_schema      INNODB_CMPMEM
 
1068
information_schema      INNODB_CMPMEM_RESET
 
1069
information_schema      INNODB_CMP_RESET
 
1070
information_schema      INNODB_LOCKS
 
1071
information_schema      INNODB_LOCK_WAITS
 
1072
information_schema      INNODB_TRX
 
1073
information_schema      KEY_COLUMN_USAGE
 
1074
information_schema      MODULES
 
1075
information_schema      PLUGINS
 
1076
information_schema      PROCESSLIST
 
1077
information_schema      REFERENTIAL_CONSTRAINTS
 
1078
information_schema      SCHEMATA
 
1079
information_schema      SESSION_STATUS
 
1080
information_schema      SESSION_VARIABLES
 
1081
information_schema      STATISTICS
 
1082
information_schema      TABLES
 
1083
information_schema      TABLE_CONSTRAINTS