~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to plugin/embedded_innodb/test-suite-dir/embedded_innodb/tests/r/datadict_tables.result

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
USE data_dictionary;
 
2
SHOW TABLES LIKE 'innodb%';
 
3
Tables_in_data_dictionary (innodb%)
 
4
INNODB_CONFIGURATION
 
5
INNODB_STATUS
 
6
INNODB_SYS_COLUMNS
 
7
INNODB_SYS_FIELDS
 
8
INNODB_SYS_FOREIGN
 
9
INNODB_SYS_FOREIGN_COLS
 
10
INNODB_SYS_INDEXES
 
11
INNODB_SYS_TABLES
 
12
innodb_table_definitions
 
13
show create table data_dictionary.innodb_sys_tables;
 
14
Table   Create Table
 
15
innodb_sys_tables       CREATE TABLE `innodb_sys_tables` (
 
16
  `NAME` VARBINARY(192),
 
17
  `ID` BIGINT,
 
18
  `N_COLS` INT,
 
19
  `TYPE` INT,
 
20
  `MIX_ID` VARBINARY(192),
 
21
  `MIX_LEN` INT,
 
22
  `CLUSTER_NAME` VARBINARY(192),
 
23
  `SPACE` INT,
 
24
  PRIMARY KEY (`NAME`) USING BTREE
 
25
) ENGINE=InnoDB COLLATE = binary
 
26
show create table data_dictionary.innodb_sys_columns;
 
27
Table   Create Table
 
28
innodb_sys_columns      CREATE TABLE `innodb_sys_columns` (
 
29
  `TABLE_ID` BIGINT,
 
30
  `POS` INT,
 
31
  `NAME` VARBINARY(192),
 
32
  `MTYPE` INT,
 
33
  `PRTYPE` INT,
 
34
  `LEN` INT,
 
35
  `PREC` INT,
 
36
  PRIMARY KEY (`TABLE_ID`,`POS`) USING BTREE
 
37
) ENGINE=InnoDB COLLATE = binary
 
38
show create table data_dictionary.innodb_sys_indexes;
 
39
Table   Create Table
 
40
innodb_sys_indexes      CREATE TABLE `innodb_sys_indexes` (
 
41
  `TABLE_ID` BIGINT,
 
42
  `ID` BIGINT,
 
43
  `NAME` VARBINARY(192),
 
44
  `N_FIELDS` INT,
 
45
  `TYPE` INT,
 
46
  `SPACE` INT,
 
47
  `PAGE_NO` INT,
 
48
  PRIMARY KEY (`TABLE_ID`,`ID`) USING BTREE
 
49
) ENGINE=InnoDB COLLATE = binary
 
50
show create table data_dictionary.innodb_sys_fields;
 
51
Table   Create Table
 
52
innodb_sys_fields       CREATE TABLE `innodb_sys_fields` (
 
53
  `INDEX_ID` BIGINT,
 
54
  `POS` INT,
 
55
  `COL_NAME` VARBINARY(192),
 
56
  PRIMARY KEY (`INDEX_ID`,`POS`) USING BTREE
 
57
) ENGINE=InnoDB COLLATE = binary
 
58
show create table data_dictionary.innodb_sys_foreign;
 
59
Table   Create Table
 
60
innodb_sys_foreign      CREATE TABLE `innodb_sys_foreign` (
 
61
  `ID` BIGINT,
 
62
  `FOR_NAME` VARBINARY(192),
 
63
  `REF_NAME` VARBINARY(192),
 
64
  `N_COLS` INT,
 
65
  PRIMARY KEY (`ID`) USING BTREE,
 
66
  KEY `FOR_IND` (`FOR_NAME`) USING BTREE,
 
67
  KEY `REF_IND` (`REF_NAME`) USING BTREE
 
68
) ENGINE=InnoDB COLLATE = binary
 
69
show create table data_dictionary.innodb_sys_foreign_cols;
 
70
Table   Create Table
 
71
innodb_sys_foreign_cols CREATE TABLE `innodb_sys_foreign_cols` (
 
72
  `ID` BIGINT,
 
73
  `POS` INT,
 
74
  `FOR_COL_NAME` VARBINARY(192),
 
75
  `REF_COL_NAME` VARBINARY(192),
 
76
  PRIMARY KEY (`ID`,`POS`) USING BTREE
 
77
) ENGINE=InnoDB COLLATE = binary
 
78
select name from data_dictionary.innodb_sys_tables;
 
79
name
 
80
SYS_FOREIGN
 
81
SYS_FOREIGN_COLS
 
82
data_dictionary/innodb_table_definitions
 
83
explain select name from data_dictionary.innodb_sys_tables where name="SYS_FOREIGN";
 
84
id      select_type     table   type    possible_keys   key     key_len ref     rows    Extra
 
85
1       SIMPLE  innodb_sys_tables       const   PRIMARY PRIMARY 195     const   1       Using index
 
86
select name from data_dictionary.innodb_sys_tables where name="SYS_FOREIGN";
 
87
name
 
88
SYS_FOREIGN
 
89
select t.name t,c.name c from data_dictionary.innodb_sys_tables as t, data_dictionary.innodb_sys_columns as c where t.id=c.table_id;
 
90
t       c
 
91
SYS_FOREIGN     ID
 
92
SYS_FOREIGN     FOR_NAME
 
93
SYS_FOREIGN     REF_NAME
 
94
SYS_FOREIGN     N_COLS
 
95
SYS_FOREIGN_COLS        ID
 
96
SYS_FOREIGN_COLS        POS
 
97
SYS_FOREIGN_COLS        FOR_COL_NAME
 
98
SYS_FOREIGN_COLS        REF_COL_NAME
 
99
data_dictionary/innodb_table_definitions        table_name
 
100
data_dictionary/innodb_table_definitions        message
 
101
select t.name as table_name,c.name as column_name from data_dictionary.innodb_sys_tables t,data_dictionary.innodb_sys_columns c where t.id=c.table_id order by table_name,column_name;
 
102
table_name      column_name
 
103
SYS_FOREIGN     FOR_NAME
 
104
SYS_FOREIGN     ID
 
105
SYS_FOREIGN     N_COLS
 
106
SYS_FOREIGN     REF_NAME
 
107
SYS_FOREIGN_COLS        FOR_COL_NAME
 
108
SYS_FOREIGN_COLS        ID
 
109
SYS_FOREIGN_COLS        POS
 
110
SYS_FOREIGN_COLS        REF_COL_NAME
 
111
data_dictionary/innodb_table_definitions        message
 
112
data_dictionary/innodb_table_definitions        table_name
 
113
create table test.t1 (a int primary key, b int, c int, index(b), index(c), index(b,c));
 
114
select name,n_fields from data_dictionary.innodb_sys_indexes i where i.table_id=(select id from data_dictionary.innodb_sys_tables where name="test/t1");
 
115
name    n_fields
 
116
PRIMARY 1
 
117
b       1
 
118
c       1
 
119
b_2     2
 
120
select f.col_name from data_dictionary.innodb_sys_fields f where f.index_id in (select id from data_dictionary.innodb_sys_indexes i where i.table_id=(select id from data_dictionary.innodb_sys_tables where name="test/t1"));
 
121
col_name
 
122
a
 
123
b
 
124
c
 
125
b
 
126
c
 
127
drop table test.t1;