~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to tests/r/data_dictionary_like_info.result

Updating from additional schemas added.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
t4
22
22
select * from data_dictionary.COLUMNS where table_name="t1"
23
23
and column_name= "a";
24
 
TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATATYPE        CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   COLLATION_NAME  COLUMN_COMMENT
 
24
TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATA_TYPE       CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   COLLATION_NAME  COLUMN_COMMENT
25
25
mysqltest       t1      a       0               TRUE    4       #       0       0       0       #       #
26
26
select table_name, column_name from data_dictionary.columns 
27
27
where table_schema = 'mysqltest' and table_name = 't1';
36
36
select * from data_dictionary.COLLATIONS
37
37
where COLLATION_NAME like 'latin1%';
38
38
CHARACTER_SET_NAME      COLLATION_NAME  DESCRIPTION     ID      IS_DEFAULT      IS_COMPILED     SORTLEN
39
 
select DATATYPE from data_dictionary.columns
 
39
select DATA_TYPE from data_dictionary.columns
40
40
where table_schema="data_dictionary" and table_name="COLUMNS" and
41
41
(column_name="character_set_name" or column_name="collation_name");
42
 
DATATYPE
 
42
DATA_TYPE
43
43
1
44
44
select TABLE_TYPE from data_dictionary.tables where 
45
45
table_schema="data_dictionary" and table_name="COLUMNS";
50
50
table_type
51
51
select table_schema,table_name, column_name from
52
52
data_dictionary.columns 
53
 
where DATATYPE = 'longtext';
 
53
where DATA_TYPE = 'longtext';
54
54
table_schema    table_name      column_name
55
 
select table_name, column_name, DATATYPE from data_dictionary.columns
56
 
where DATATYPE = 'datetime';
57
 
table_name      column_name     DATATYPE
 
55
select table_name, column_name, DATA_TYPE from data_dictionary.columns
 
56
where DATA_TYPE = 'datetime';
 
57
table_name      column_name     DATA_TYPE
58
58
SELECT COUNT(*) FROM DATA_DICTIONARY.TABLES A
59
59
WHERE NOT EXISTS 
60
60
(SELECT * FROM DATA_DICTIONARY.COLUMNS B
91
91
GROUP BY TABLE_SCHEMA;
92
92
table_schema    count(*)
93
93
create table t1(f1 LONGBLOB, f2 LONGTEXT);
94
 
select column_name,DATATYPE,CHARACTER_OCTET_LENGTH,
 
94
select column_name, DATA_TYPE, CHARACTER_OCTET_LENGTH,
95
95
CHARACTER_MAXIMUM_LENGTH
96
96
from data_dictionary.columns
97
97
where table_name='t1';
98
 
column_name     DATATYPE        CHARACTER_OCTET_LENGTH  CHARACTER_MAXIMUM_LENGTH
 
98
column_name     DATA_TYPE       CHARACTER_OCTET_LENGTH  CHARACTER_MAXIMUM_LENGTH
99
99
f1      2       0       0
100
100
f2      2       0       0
101
101
drop table t1;
149
149
32      128
150
150
64      256
151
151
drop table t1;
152
 
select DATATYPE, group_concat(table_schema, '.', table_name), count(*) as num
 
152
select DATA_TYPE, group_concat(table_schema, '.', table_name), count(*) as num
153
153
from data_dictionary.columns where
154
154
table_schema='data_dictionary' and
155
 
(DATATYPE = 'varchar' or DATATYPE = 'varchar'
156
 
 or DATATYPE = 'varchar')
157
 
group by DATATYPE order by DATATYPE, num;
158
 
DATATYPE        group_concat(table_schema, '.', table_name)     num
 
155
(DATA_TYPE = 'varchar' or DATA_TYPE = 'varchar'
 
156
 or DATA_TYPE = 'varchar')
 
157
group by DATA_TYPE order by DATA_TYPE, num;
 
158
DATA_TYPE       group_concat(table_schema, '.', table_name)     num
159
159
create table t1(f1 char(1) not null, f2 char(9) not null);
160
160
select CHARACTER_MAXIMUM_LENGTH, CHARACTER_OCTET_LENGTH from
161
161
data_dictionary.columns where table_schema='test' and table_name = 't1';
238
238
t.table_name not like 'falcon%' AND
239
239
t.ENGINE IS NULL AND
240
240
c1.ordinal_position =
241
 
(select isnull(c2.DATATYPE) -
 
241
(select isnull(c2.DATA_TYPE) -
242
242
isnull(group_concat(c2.table_schema, '.', c2.table_name)) +
243
243
count(*) as num
244
244
from data_dictionary.columns c2 where
245
245
c2.table_schema='data_dictionary' and
246
 
(c2.DATATYPE = 'varchar' or c2.DATATYPE = 'varchar')
247
 
group by c2.DATATYPE order by num limit 1)
 
246
(c2.DATA_TYPE = 'varchar' or c2.DATA_TYPE = 'varchar')
 
247
group by c2.DATA_TYPE order by num limit 1)
248
248
group by t.table_name order by num1, t.table_name;
249
249
table_name      group_concat(t.table_schema, '.', t.table_name) num1
250
250
alter database;
283
283
WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db';
284
284
TABLE_COLLATION
285
285
select * from data_dictionary.columns where table_schema = NULL;
286
 
TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATATYPE        CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   COLLATION_NAME  COLUMN_COMMENT
 
286
TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATA_TYPE       CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   COLLATION_NAME  COLUMN_COMMENT
287
287
select * from `data_dictionary`.`COLUMNS` where `TABLE_NAME` = NULL;
288
 
TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATATYPE        CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   COLLATION_NAME  COLUMN_COMMENT
 
288
TABLE_SCHEMA    TABLE_NAME      COLUMN_NAME     ORDINAL_POSITION        COLUMN_DEFAULT  IS_NULLABLE     DATA_TYPE       CHARACTER_MAXIMUM_LENGTH        CHARACTER_OCTET_LENGTH  NUMERIC_PRECISION       NUMERIC_SCALE   COLLATION_NAME  COLUMN_COMMENT
289
289
select * from `data_dictionary`.`INDEXES` where `TABLE_SCHEMA` = NULL;
290
290
TABLE_SCHEMA    TABLE_NAME      INDEX_NAME      IS_PRIMARY      IS_UNIQUE       IS_NULLABLE     KEY_LENGTH      INDEX_TYPE      INDEX_COMMENT
291
291
select * from `data_dictionary`.`INDEXES` where `TABLE_NAME` = NULL;