~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/information_schema.result

  • Committer: Monty Taylor
  • Date: 2008-09-15 17:24:04 UTC
  • Revision ID: monty@inaugust.com-20080915172404-ygh6hiyu0q7qpa9x
Removed strndup calls.

Show diffs side-by-side

added added

removed removed

Lines of Context:
36
36
t2
37
37
t3
38
38
t5
 
39
show table status;
 
40
Name    Engine  Version Row_format      Rows    Avg_row_length  Data_length     Max_data_length Index_length    Data_free       Auto_increment  Create_time     Update_time     Check_time      Collation       Checksum        Create_options  Comment
 
41
t2      InnoDB  10      Compact 0       0       16384   #       0       0       NULL    #       #       NULL    utf8_general_ci NULL            
 
42
t3      InnoDB  10      Compact 0       0       16384   #       16384   0       NULL    #       #       NULL    utf8_general_ci NULL            
 
43
t5      InnoDB  10      Compact 1       16384   16384   #       0       0       11      #       #       NULL    utf8_general_ci NULL            
39
44
show full columns from t3 like "a%";
40
45
Field   Type    Collation       Null    Key     Default Extra   Privileges      Comment
41
 
a       int     NULL    YES     MUL     NULL            #       
 
46
a       int     NULL    YES     MUL     NULL                    
42
47
select * from information_schema.COLUMNS where table_name="t1"
43
48
and column_name= "a";
44
49
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
57
62
select * from information_schema.CHARACTER_SETS
58
63
where CHARACTER_SET_NAME like 'latin1%';
59
64
CHARACTER_SET_NAME      DEFAULT_COLLATE_NAME    DESCRIPTION     MAXLEN
 
65
SHOW CHARACTER SET LIKE 'latin1%';
 
66
Charset Description     Default collation       Maxlen
60
67
select * from information_schema.COLLATIONS
61
68
where COLLATION_NAME like 'latin1%';
62
69
COLLATION_NAME  CHARACTER_SET_NAME      ID      IS_DEFAULT      IS_COMPILED     SORTLEN
 
70
SHOW COLLATION LIKE 'latin1%';
 
71
Collation       Charset Id      Default Compiled        Sortlen
63
72
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
64
73
where COLLATION_NAME like 'latin1%';
65
74
COLLATION_NAME  CHARACTER_SET_NAME
91
100
TABLES  CREATE_TIME     datetime
92
101
TABLES  UPDATE_TIME     datetime
93
102
TABLES  CHECK_TIME      datetime
94
 
INNODB_TRX      trx_started     datetime
95
 
INNODB_TRX      trx_wait_started        datetime
96
103
SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES A
97
104
WHERE NOT EXISTS 
98
105
(SELECT * FROM INFORMATION_SCHEMA.COLUMNS B
103
110
create table t1
104
111
( x_bigint BIGINT,
105
112
x_integer INTEGER,
106
 
x_int int,
 
113
x_smallint SMALLINT,
107
114
x_decimal DECIMAL(5,3),
108
115
x_numeric NUMERIC(5,3),
109
116
x_real REAL,
115
122
COLUMN_NAME     CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH
116
123
x_bigint        NULL    NULL
117
124
x_integer       NULL    NULL
118
 
x_int   NULL    NULL
 
125
x_smallint      NULL    NULL
119
126
x_decimal       NULL    NULL
120
127
x_numeric       NULL    NULL
121
128
x_real  NULL    NULL
125
132
SELECT table_schema, count(*) FROM information_schema.TABLES
126
133
WHERE table_name NOT LIKE 'ndb_%' AND table_name NOT LIKE 'falcon%' GROUP BY TABLE_SCHEMA;
127
134
table_schema    count(*)
128
 
information_schema      23
 
135
information_schema      16
129
136
show create database information_schema;
130
137
Database        Create Database
131
138
information_schema      CREATE DATABASE `information_schema` /*!40100 DEFAULT CHARACTER SET utf8 */
138
145
f1      blob    4294967295      4294967295
139
146
f2      text    4294967295      4294967295
140
147
drop table t1;
141
 
create table t1(f1 int, f2 int, f3 BIGINT, f4 int,
142
 
f5 BIGINT, f6 int, f7 int);
 
148
create table t1(f1 tinyint, f2 SMALLINT, f3 BIGINT, f4 int,
 
149
f5 BIGINT, f6 TINYINT, f7 SMALLINT);
143
150
select column_name, NUMERIC_PRECISION, NUMERIC_SCALE
144
151
from information_schema.columns
145
152
where table_name='t1';
146
153
column_name     NUMERIC_PRECISION       NUMERIC_SCALE
147
 
f1      10      0
148
 
f2      10      0
 
154
f1      3       0
 
155
f2      5       0
149
156
f3      19      0
150
157
f4      10      0
151
158
f5      19      0
152
 
f6      10      0
153
 
f7      10      0
 
159
f6      3       0
 
160
f7      5       0
154
161
drop table t1;
155
162
create table t1 (a int not null, b int);
156
163
use information_schema;
263
270
STATISTICS      TABLE_SCHEMA
264
271
TABLES  TABLE_SCHEMA
265
272
TABLE_CONSTRAINTS       CONSTRAINT_SCHEMA
266
 
INNODB_CMP_RESET        page_size
267
 
INNODB_TRX      trx_id
268
 
INNODB_CMPMEM_RESET     page_size
269
 
INNODB_LOCK_WAITS       requesting_trx_id
270
 
INNODB_CMPMEM   page_size
271
 
INNODB_CMP      page_size
272
 
INNODB_LOCKS    lock_id
273
273
SELECT t.table_name, c1.column_name
274
274
FROM information_schema.tables t
275
275
INNER JOIN
302
302
STATISTICS      TABLE_SCHEMA
303
303
TABLES  TABLE_SCHEMA
304
304
TABLE_CONSTRAINTS       CONSTRAINT_SCHEMA
305
 
INNODB_CMP_RESET        page_size
306
 
INNODB_TRX      trx_id
307
 
INNODB_CMPMEM_RESET     page_size
308
 
INNODB_LOCK_WAITS       requesting_trx_id
309
 
INNODB_CMPMEM   page_size
310
 
INNODB_CMP      page_size
311
 
INNODB_LOCKS    lock_id
312
305
SELECT MAX(table_name) FROM information_schema.tables;
313
306
MAX(table_name)
314
307
TABLE_CONSTRAINTS
355
348
COLUMNS information_schema.COLUMNS      1
356
349
GLOBAL_STATUS   information_schema.GLOBAL_STATUS        1
357
350
GLOBAL_VARIABLES        information_schema.GLOBAL_VARIABLES     1
358
 
INNODB_CMP      information_schema.INNODB_CMP   1
359
 
INNODB_CMPMEM   information_schema.INNODB_CMPMEM        1
360
 
INNODB_CMPMEM_RESET     information_schema.INNODB_CMPMEM_RESET  1
361
 
INNODB_CMP_RESET        information_schema.INNODB_CMP_RESET     1
362
 
INNODB_LOCKS    information_schema.INNODB_LOCKS 1
363
 
INNODB_LOCK_WAITS       information_schema.INNODB_LOCK_WAITS    1
364
 
INNODB_TRX      information_schema.INNODB_TRX   1
365
351
KEY_COLUMN_USAGE        information_schema.KEY_COLUMN_USAGE     1
366
352
PLUGINS information_schema.PLUGINS      1
367
353
PROCESSLIST     information_schema.PROCESSLIST  1