Below is the list of changes that have just been committed into a local
5.0 repository of gluh. When gluh does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-03-27 18:48:03+04:00, gluh@stripped +8 -0
Bug#35428 When selecting from INFORMATION_SCHEMA tables, incomplete metadata
added intialization of db name for I_S table fields
added intialization of orig table name for I_S table fields
mysql-test/r/information_schema.result@stripped, 2008-03-27 18:48:01+04:00, gluh@stripped
+5 -5
result fix
mysql-test/r/metadata.result@stripped, 2008-03-27 18:48:01+04:00, gluh@stripped +7 -0
test result
mysql-test/r/show_check.result@stripped, 2008-03-27 18:48:01+04:00, gluh@stripped +172 -172
result fix
mysql-test/t/metadata.test@stripped, 2008-03-27 18:48:01+04:00, gluh@stripped +9 -0
test case
sql/field.cc@stripped, 2008-03-27 18:48:01+04:00, gluh@stripped +6 -1
added intialization of orig table name for I_S table fields
sql/sql_handler.cc@stripped, 2008-03-27 18:48:01+04:00, gluh@stripped +1 -0
updated position in table list
sql/sql_select.cc@stripped, 2008-03-27 18:48:01+04:00, gluh@stripped +5 -1
added intialization of db name for I_S table fields
tests/mysql_client_test.c@stripped, 2008-03-27 18:48:01+04:00, gluh@stripped +7 -7
test fix
diff -Nrup a/mysql-test/r/information_schema.result
b/mysql-test/r/information_schema.result
--- a/mysql-test/r/information_schema.result 2007-10-29 14:45:33 +04:00
+++ b/mysql-test/r/information_schema.result 2008-03-27 18:48:01 +04:00
@@ -368,11 +368,11 @@ show keys from v4;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
select * from information_schema.views where TABLE_NAME like "v%";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
-NULL test v0 /* ALGORITHM=UNDEFINED */ select `schemata`.`SCHEMA_NAME` AS `c` from
`information_schema`.`schemata` NONE NO root@localhost DEFINER
-NULL test v1 /* ALGORITHM=UNDEFINED */ select `tables`.`TABLE_NAME` AS `c` from
`information_schema`.`tables` where (`tables`.`TABLE_NAME` =
_utf8'v1') NONE NO root@localhost DEFINER
-NULL test v2 /* ALGORITHM=UNDEFINED */ select `columns`.`COLUMN_NAME` AS `c` from
`information_schema`.`columns` where (`columns`.`TABLE_NAME` =
_utf8'v2') NONE NO root@localhost DEFINER
-NULL test v3 /* ALGORITHM=UNDEFINED */ select `character_sets`.`CHARACTER_SET_NAME` AS
`c` from `information_schema`.`character_sets` where
(`character_sets`.`CHARACTER_SET_NAME` like
_utf8'latin1%') NONE NO root@localhost DEFINER
-NULL test v4 /* ALGORITHM=UNDEFINED */ select `collations`.`COLLATION_NAME` AS `c` from
`information_schema`.`collations` where (`collations`.`COLLATION_NAME` like
_utf8'latin1%') NONE NO root@localhost DEFINER
+NULL test v0 /* ALGORITHM=UNDEFINED */ select
`information_schema`.`schemata`.`SCHEMA_NAME` AS `c` from
`information_schema`.`schemata` NONE NO root@localhost DEFINER
+NULL test v1 /* ALGORITHM=UNDEFINED */ select `information_schema`.`tables`.`TABLE_NAME`
AS `c` from `information_schema`.`tables` where
(`information_schema`.`tables`.`TABLE_NAME` = _utf8'v1') NONE NO root@localhost DEFINER
+NULL test v2 /* ALGORITHM=UNDEFINED */ select
`information_schema`.`columns`.`COLUMN_NAME` AS `c` from `information_schema`.`columns`
where (`information_schema`.`columns`.`TABLE_NAME` =
_utf8'v2') NONE NO root@localhost DEFINER
+NULL test v3 /* ALGORITHM=UNDEFINED */ select
`information_schema`.`character_sets`.`CHARACTER_SET_NAME` AS `c` from
`information_schema`.`character_sets` where
(`information_schema`.`character_sets`.`CHARACTER_SET_NAME` like
_utf8'latin1%') NONE NO root@localhost DEFINER
+NULL test v4 /* ALGORITHM=UNDEFINED */ select
`information_schema`.`collations`.`COLLATION_NAME` AS `c` from
`information_schema`.`collations` where
(`information_schema`.`collations`.`COLLATION_NAME` like
_utf8'latin1%') NONE NO root@localhost DEFINER
drop view v0, v1, v2, v3, v4;
create table t1 (a int);
grant select,update,insert on t1 to mysqltest_1@localhost;
diff -Nrup a/mysql-test/r/metadata.result b/mysql-test/r/metadata.result
--- a/mysql-test/r/metadata.result 2007-06-20 14:20:41 +05:00
+++ b/mysql-test/r/metadata.result 2008-03-27 18:48:01 +04:00
@@ -181,4 +181,11 @@ c1 c2
3 3
DROP VIEW v1,v2;
DROP TABLE t1,t2;
+select information_schema.tables.table_name from
+information_schema.tables
+where table_name='tables';
+Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
+def information_schema TABLES tables TABLE_NAME table_name 253 64 6 N 1 0 8
+table_name
+TABLES
End of 5.0 tests
diff -Nrup a/mysql-test/r/show_check.result b/mysql-test/r/show_check.result
--- a/mysql-test/r/show_check.result 2007-09-20 13:54:44 +05:00
+++ b/mysql-test/r/show_check.result 2008-03-27 18:48:01 +04:00
@@ -61,18 +61,18 @@ Table Op Msg_type Msg_text
test.t1 check status OK
show index from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def STATISTICS TABLE_NAME Table 253 64 2 N 1 0 8
-def STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63
-def STATISTICS INDEX_NAME Key_name 253 64 7 N 1 0 8
-def STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63
-def STATISTICS COLUMN_NAME Column_name 253 64 1 N 1 0 8
-def STATISTICS COLLATION Collation 253 1 1 Y 0 0 8
-def STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63
-def STATISTICS SUB_PART Sub_part 8 3 0 Y 32768 0 63
-def STATISTICS PACKED Packed 253 10 0 Y 0 0 8
-def STATISTICS NULLABLE Null 253 3 0 N 1 0 8
-def STATISTICS INDEX_TYPE Index_type 253 16 5 N 1 0 8
-def STATISTICS COMMENT Comment 253 16 0 Y 0 0 8
+def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 64 2 N 1 0 8
+def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63
+def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 64 7 N 1 0 8
+def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63
+def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 64 1 N 1 0 8
+def information_schema STATISTICS STATISTICS COLLATION Collation 253 1 1 Y 0 0 8
+def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63
+def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 0 Y 32768 0 63
+def information_schema STATISTICS STATISTICS PACKED Packed 253 10 0 Y 0 0 8
+def information_schema STATISTICS STATISTICS NULLABLE Null 253 3 0 N 1 0 8
+def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 16 5 N 1 0 8
+def information_schema STATISTICS STATISTICS COMMENT Comment 253 16 0 Y 0 0 8
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
t1 1 b 1 b A 1 NULL NULL BTREE
@@ -99,52 +99,52 @@ drop table t1;
-- after Bug#29394 is implemented.
show variables like "wait_timeout%";
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def VARIABLES Variable_name Variable_name 253 80 12 N 1 0 8
-def VARIABLES Value Value 253 512 5 N 1 0 8
+def information_schema VARIABLES VARIABLES Variable_name Variable_name 253 80 12 N 1 0 8
+def information_schema VARIABLES VARIABLES Value Value 253 512 5 N 1 0 8
Variable_name Value
wait_timeout 28800
show variables like "WAIT_timeout%";
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def VARIABLES Variable_name Variable_name 253 80 12 N 1 0 8
-def VARIABLES Value Value 253 512 5 N 1 0 8
+def information_schema VARIABLES VARIABLES Variable_name Variable_name 253 80 12 N 1 0 8
+def information_schema VARIABLES VARIABLES Value Value 253 512 5 N 1 0 8
Variable_name Value
wait_timeout 28800
show variables like "this_doesn't_exists%";
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def VARIABLES Variable_name Variable_name 253 80 0 N 1 0 8
-def VARIABLES Value Value 253 512 0 N 1 0 8
+def information_schema VARIABLES VARIABLES Variable_name Variable_name 253 80 0 N 1 0 8
+def information_schema VARIABLES VARIABLES Value Value 253 512 0 N 1 0 8
Variable_name Value
show table status from test like "this_doesn't_exists%";
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def TABLES TABLE_NAME Name 253 64 0 N 1 0 8
-def TABLES ENGINE Engine 253 64 0 Y 0 0 8
-def TABLES VERSION Version 8 21 0 Y 32768 0 63
-def TABLES ROW_FORMAT Row_format 253 10 0 Y 0 0 8
-def TABLES TABLE_ROWS Rows 8 21 0 Y 32768 0 63
-def TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32768 0 63
-def TABLES DATA_LENGTH Data_length 8 21 0 Y 32768 0 63
-def TABLES MAX_DATA_LENGTH Max_data_length 8 21 0 Y 32768 0 63
-def TABLES INDEX_LENGTH Index_length 8 21 0 Y 32768 0 63
-def TABLES DATA_FREE Data_free 8 21 0 Y 32768 0 63
-def TABLES AUTO_INCREMENT Auto_increment 8 21 0 Y 32768 0 63
-def TABLES CREATE_TIME Create_time 12 19 0 Y 128 0 63
-def TABLES UPDATE_TIME Update_time 12 19 0 Y 128 0 63
-def TABLES CHECK_TIME Check_time 12 19 0 Y 128 0 63
-def TABLES TABLE_COLLATION Collation 253 64 0 Y 0 0 8
-def TABLES CHECKSUM Checksum 8 21 0 Y 32768 0 63
-def TABLES CREATE_OPTIONS Create_options 253 255 0 Y 0 0 8
-def TABLES TABLE_COMMENT Comment 253 80 0 N 1 0 8
+def information_schema TABLES TABLES TABLE_NAME Name 253 64 0 N 1 0 8
+def information_schema TABLES TABLES ENGINE Engine 253 64 0 Y 0 0 8
+def information_schema TABLES TABLES VERSION Version 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES ROW_FORMAT Row_format 253 10 0 Y 0 0 8
+def information_schema TABLES TABLES TABLE_ROWS Rows 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES DATA_LENGTH Data_length 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES MAX_DATA_LENGTH Max_data_length 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES INDEX_LENGTH Index_length 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES DATA_FREE Data_free 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES AUTO_INCREMENT Auto_increment 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES CREATE_TIME Create_time 12 19 0 Y 128 0 63
+def information_schema TABLES TABLES UPDATE_TIME Update_time 12 19 0 Y 128 0 63
+def information_schema TABLES TABLES CHECK_TIME Check_time 12 19 0 Y 128 0 63
+def information_schema TABLES TABLES TABLE_COLLATION Collation 253 64 0 Y 0 0 8
+def information_schema TABLES TABLES CHECKSUM Checksum 8 21 0 Y 32768 0 63
+def information_schema TABLES TABLES CREATE_OPTIONS Create_options 253 255 0 Y 0 0 8
+def information_schema TABLES TABLES TABLE_COMMENT Comment 253 80 0 N 1 0 8
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
show databases;
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def SCHEMATA SCHEMA_NAME Database 253 64 18 N 1 0 8
+def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database 253 64 18 N 1 0 8
Database
information_schema
mysql
test
show databases like "test%";
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def SCHEMATA SCHEMA_NAME Database (test%) 253 64 4 N 1 0 8
+def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database (test%) 253 64 4 N 1 0 8
Database (test%)
test
create table t1 (f1 int not null, f2 int not null, f3 int not null, f4 int not null,
primary key(f1,f2,f3,f4));
@@ -588,18 +588,18 @@ PRIMARY KEY(field1(1000))
);
show index from t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def STATISTICS TABLE_NAME Table 253 64 2 N 1 0 63
-def STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63
-def STATISTICS INDEX_NAME Key_name 253 64 7 N 1 0 63
-def STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63
-def STATISTICS COLUMN_NAME Column_name 253 64 6 N 1 0 63
-def STATISTICS COLLATION Collation 253 1 1 Y 0 0 63
-def STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63
-def STATISTICS SUB_PART Sub_part 8 3 4 Y 32768 0 63
-def STATISTICS PACKED Packed 253 10 0 Y 0 0 63
-def STATISTICS NULLABLE Null 253 3 0 N 1 0 63
-def STATISTICS INDEX_TYPE Index_type 253 16 5 N 1 0 63
-def STATISTICS COMMENT Comment 253 16 0 Y 0 0 63
+def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 64 2 N 1 0 63
+def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63
+def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 64 7 N 1 0 63
+def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63
+def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 64 6 N 1 0 63
+def information_schema STATISTICS STATISTICS COLLATION Collation 253 1 1 Y 0 0 63
+def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63
+def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 4 Y 32768 0 63
+def information_schema STATISTICS STATISTICS PACKED Packed 253 10 0 Y 0 0 63
+def information_schema STATISTICS STATISTICS NULLABLE Null 253 3 0 N 1 0 63
+def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 16 5 N 1 0 63
+def information_schema STATISTICS STATISTICS COMMENT Comment 253 16 0 Y 0 0 63
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 field1 A 0 1000 NULL BTREE
drop table t1;
@@ -768,21 +768,21 @@ set names utf8;
----------------------------------------------------------------
SHOW CHARACTER SET LIKE 'utf8';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def CHARACTER_SETS CHARACTER_SET_NAME Charset 253 192 4 N 1 0 33
-def CHARACTER_SETS DESCRIPTION Description 253 180 13 N 1 0 33
-def CHARACTER_SETS DEFAULT_COLLATE_NAME Default collation 253 192 15 N 1 0 33
-def CHARACTER_SETS MAXLEN Maxlen 8 3 1 N 32769 0 63
+def information_schema CHARACTER_SETS CHARACTER_SETS CHARACTER_SET_NAME Charset 253 192 4 N 1 0 33
+def information_schema CHARACTER_SETS CHARACTER_SETS DESCRIPTION Description 253 180 13 N 1 0 33
+def information_schema CHARACTER_SETS CHARACTER_SETS DEFAULT_COLLATE_NAME Default
collation 253 192 15 N 1 0 33
+def information_schema CHARACTER_SETS CHARACTER_SETS MAXLEN Maxlen 8 3 1 N 32769 0 63
Charset Description Default collation Maxlen
utf8 UTF-8 Unicode utf8_general_ci 3
----------------------------------------------------------------
SHOW COLLATION LIKE 'latin1_bin';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def COLLATIONS COLLATION_NAME Collation 253 192 10 N 1 0 33
-def COLLATIONS CHARACTER_SET_NAME Charset 253 192 6 N 1 0 33
-def COLLATIONS ID Id 8 11 2 N 32769 0 63
-def COLLATIONS IS_DEFAULT Default 253 9 0 N 1 0 33
-def COLLATIONS IS_COMPILED Compiled 253 9 3 N 1 0 33
-def COLLATIONS SORTLEN Sortlen 8 3 1 N 32769 0 63
+def information_schema COLLATIONS COLLATIONS COLLATION_NAME Collation 253 192 10 N 1 0 33
+def information_schema COLLATIONS COLLATIONS CHARACTER_SET_NAME Charset 253 192 6 N 1 0 33
+def information_schema COLLATIONS COLLATIONS ID Id 8 11 2 N 32769 0 63
+def information_schema COLLATIONS COLLATIONS IS_DEFAULT Default 253 9 0 N 1 0 33
+def information_schema COLLATIONS COLLATIONS IS_COMPILED Compiled 253 9 3 N 1 0 33
+def information_schema COLLATIONS COLLATIONS SORTLEN Sortlen 8 3 1 N 32769 0 63
Collation Charset Id Default Compiled Sortlen
latin1_bin latin1 47 Yes 1
----------------------------------------------------------------
@@ -795,7 +795,7 @@ mysqltest1 CREATE DATABASE `mysqltest1`
----------------------------------------------------------------
SHOW DATABASES LIKE 'mysqltest1';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def SCHEMATA SCHEMA_NAME Database (mysqltest1) 253 192 10 N 1 0 33
+def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database
(mysqltest1) 253 192 10 N 1 0 33
Database (mysqltest1)
mysqltest1
----------------------------------------------------------------
@@ -811,18 +811,18 @@ t1 CREATE TABLE `t1` (
----------------------------------------------------------------
SHOW INDEX FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def STATISTICS TABLE_NAME Table 253 192 2 N 1 0 33
-def STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63
-def STATISTICS INDEX_NAME Key_name 253 192 7 N 1 0 33
-def STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63
-def STATISTICS COLUMN_NAME Column_name 253 192 1 N 1 0 33
-def STATISTICS COLLATION Collation 253 3 1 Y 0 0 33
-def STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63
-def STATISTICS SUB_PART Sub_part 8 3 0 Y 32768 0 63
-def STATISTICS PACKED Packed 253 30 0 Y 0 0 33
-def STATISTICS NULLABLE Null 253 9 0 N 1 0 33
-def STATISTICS INDEX_TYPE Index_type 253 48 5 N 1 0 33
-def STATISTICS COMMENT Comment 253 48 0 Y 0 0 33
+def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 192 2 N 1 0 33
+def information_schema STATISTICS STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63
+def information_schema STATISTICS STATISTICS INDEX_NAME Key_name 253 192 7 N 1 0 33
+def information_schema STATISTICS STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63
+def information_schema STATISTICS STATISTICS COLUMN_NAME Column_name 253 192 1 N 1 0 33
+def information_schema STATISTICS STATISTICS COLLATION Collation 253 3 1 Y 0 0 33
+def information_schema STATISTICS STATISTICS CARDINALITY Cardinality 8 21 1 Y 32768 0 63
+def information_schema STATISTICS STATISTICS SUB_PART Sub_part 8 3 0 Y 32768 0 63
+def information_schema STATISTICS STATISTICS PACKED Packed 253 30 0 Y 0 0 33
+def information_schema STATISTICS STATISTICS NULLABLE Null 253 9 0 N 1 0 33
+def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 48 5 N 1 0 33
+def information_schema STATISTICS STATISTICS COMMENT Comment 253 48 0 Y 0 0 33
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t1 0 PRIMARY 1 c A 0 NULL NULL BTREE
----------------------------------------------------------------
@@ -839,15 +839,15 @@ TABLE_COMMENT
FROM INFORMATION_SCHEMA.TABLES
WHERE table_name = 't1';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def TABLES TABLE_CATALOG TABLE_CATALOG 253 1536 0 Y 0 0 33
-def TABLES TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
-def TABLES TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
-def TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 1 0 33
-def TABLES ENGINE ENGINE 253 192 6 Y 0 0 33
-def TABLES ROW_FORMAT ROW_FORMAT 253 30 5 Y 0 0 33
-def TABLES TABLE_COLLATION TABLE_COLLATION 253 192 17 Y 0 0 33
-def TABLES CREATE_OPTIONS CREATE_OPTIONS 253 765 0 Y 0 0 33
-def TABLES TABLE_COMMENT TABLE_COMMENT 253 240 0 N 1 0 33
+def information_schema TABLES TABLES TABLE_CATALOG TABLE_CATALOG 253 1536 0 Y 0 0 33
+def information_schema TABLES TABLES TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
+def information_schema TABLES TABLES TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
+def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 192 10 N 1 0 33
+def information_schema TABLES TABLES ENGINE ENGINE 253 192 6 Y 0 0 33
+def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 30 5 Y 0 0 33
+def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 192 17 Y 0 0 33
+def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253 765 0 Y 0 0 33
+def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 240 0 N 1 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE ENGINE ROW_FORMAT TABLE_COLLATION CREATE_OPTIONS TABLE_COMMENT
NULL test t1 BASE TABLE MyISAM Fixed latin1_swedish_ci
----------------------------------------------------------------
@@ -869,50 +869,50 @@ COLUMN_COMMENT
FROM INFORMATION_SCHEMA.COLUMNS
WHERE table_name = 't1';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def COLUMNS TABLE_CATALOG TABLE_CATALOG 253 1536 0 Y 0 0 33
-def COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
-def COLUMNS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
-def COLUMNS COLUMN_NAME COLUMN_NAME 253 192 1 N 1 0 33
-def COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589815 0 Y 16 0 33
-def COLUMNS IS_NULLABLE IS_NULLABLE 253 9 2 N 1 0 33
-def COLUMNS DATA_TYPE DATA_TYPE 253 192 3 N 1 0 33
-def COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 192 0 Y 0 0 33
-def COLUMNS COLLATION_NAME COLLATION_NAME 253 192 0 Y 0 0 33
-def COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 17 0 33
-def COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 1 0 33
-def COLUMNS EXTRA EXTRA 253 60 0 N 1 0 33
-def COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 1 0 33
-def COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 765 0 N 1 0 33
+def information_schema COLUMNS COLUMNS TABLE_CATALOG TABLE_CATALOG 253 1536 0 Y 0 0 33
+def information_schema COLUMNS COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
+def information_schema COLUMNS COLUMNS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
+def information_schema COLUMNS COLUMNS COLUMN_NAME COLUMN_NAME 253 192 1 N 1 0 33
+def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 589815 0 Y 16 0 33
+def information_schema COLUMNS COLUMNS IS_NULLABLE IS_NULLABLE 253 9 2 N 1 0 33
+def information_schema COLUMNS COLUMNS DATA_TYPE DATA_TYPE 253 192 3 N 1 0 33
+def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 192 0 Y 0 0 33
+def information_schema COLUMNS COLUMNS COLLATION_NAME COLLATION_NAME 253 192 0 Y 0 0 33
+def information_schema COLUMNS COLUMNS COLUMN_TYPE COLUMN_TYPE 252 589815 7 N 17 0 33
+def information_schema COLUMNS COLUMNS COLUMN_KEY COLUMN_KEY 253 9 3 N 1 0 33
+def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 60 0 N 1 0 33
+def information_schema COLUMNS COLUMNS PRIVILEGES PRIVILEGES 253 240 31 N 1 0 33
+def information_schema COLUMNS COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 765 0 N 1 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL test t1 c NULL NO int NULL NULL int(11) PRI select,insert,update,references
----------------------------------------------------------------
SHOW TABLES LIKE 't1';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def TABLE_NAMES TABLE_NAME Tables_in_test (t1) 253 192 2 N 1 0 33
+def information_schema TABLE_NAMES TABLE_NAMES TABLE_NAME Tables_in_test
(t1) 253 192 2 N 1 0 33
Tables_in_test (t1)
t1
----------------------------------------------------------------
SHOW COLUMNS FROM t1;
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def COLUMNS COLUMN_NAME Field 253 192 1 N 1 0 33
-def COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33
-def COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33
-def COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
-def COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
-def COLUMNS EXTRA Extra 253 60 0 N 1 0 33
+def information_schema COLUMNS COLUMNS COLUMN_NAME Field 253 192 1 N 1 0 33
+def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 589815 7 N 17 0 33
+def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 9 2 N 1 0 33
+def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 9 3 N 1 0 33
+def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 589815 0 Y 16 0 33
+def information_schema COLUMNS COLUMNS EXTRA Extra 253 60 0 N 1 0 33
Field Type Null Key Default Extra
c int(11) NO PRI NULL
----------------------------------------------------------------
SHOW TRIGGERS LIKE 't1';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def TRIGGERS TRIGGER_NAME Trigger 253 192 5 N 1 0 33
-def TRIGGERS EVENT_MANIPULATION Event 253 18 6 N 1 0 33
-def TRIGGERS EVENT_OBJECT_TABLE Table 253 192 2 N 1 0 33
-def TRIGGERS ACTION_STATEMENT Statement 252 589815 10 N 17 0 33
-def TRIGGERS ACTION_TIMING Timing 253 18 6 N 1 0 33
-def TRIGGERS CREATED Created 12 19 0 Y 128 0 63
-def TRIGGERS SQL_MODE sql_mode 252 589815 0 N 17 0 33
-def TRIGGERS DEFINER Definer 252 589815 14 N 17 0 33
+def information_schema TRIGGERS TRIGGERS TRIGGER_NAME Trigger 253 192 5 N 1 0 33
+def information_schema TRIGGERS TRIGGERS EVENT_MANIPULATION Event 253 18 6 N 1 0 33
+def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE Table 253 192 2 N 1 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT Statement 252 589815 10 N 17 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_TIMING Timing 253 18 6 N 1 0 33
+def information_schema TRIGGERS TRIGGERS CREATED Created 12 19 0 Y 128 0 63
+def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 252 589815 0 N 17 0 33
+def information_schema TRIGGERS TRIGGERS DEFINER Definer 252 589815 14 N 17 0 33
Trigger Event Table Statement Timing Created sql_mode Definer
t1_bi INSERT t1 SET @a = 1 BEFORE NULL root@localhost
----------------------------------------------------------------
@@ -937,23 +937,23 @@ DEFINER
FROM INFORMATION_SCHEMA.TRIGGERS
WHERE trigger_name = 't1_bi';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def TRIGGERS TRIGGER_CATALOG TRIGGER_CATALOG 253 1536 0 Y 0 0 33
-def TRIGGERS TRIGGER_SCHEMA TRIGGER_SCHEMA 253 192 4 N 1 0 33
-def TRIGGERS TRIGGER_NAME TRIGGER_NAME 253 192 5 N 1 0 33
-def TRIGGERS EVENT_MANIPULATION EVENT_MANIPULATION 253 18 6 N 1 0 33
-def TRIGGERS EVENT_OBJECT_CATALOG EVENT_OBJECT_CATALOG 253 1536 0 Y 0 0 33
-def TRIGGERS EVENT_OBJECT_SCHEMA EVENT_OBJECT_SCHEMA 253 192 4 N 1 0 33
-def TRIGGERS EVENT_OBJECT_TABLE EVENT_OBJECT_TABLE 253 192 2 N 1 0 33
-def TRIGGERS ACTION_CONDITION ACTION_CONDITION 252 589815 0 Y 16 0 33
-def TRIGGERS ACTION_STATEMENT ACTION_STATEMENT 252 589815 10 N 17 0 33
-def TRIGGERS ACTION_ORIENTATION ACTION_ORIENTATION 253 27 3 N 1 0 33
-def TRIGGERS ACTION_TIMING ACTION_TIMING 253 18 6 N 1 0 33
-def TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_OLD_TABLE 253 192 0 Y 0 0 33
-def TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 192 0 Y 0 0 33
-def TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 1 0 33
-def TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 1 0 33
-def TRIGGERS SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
-def TRIGGERS DEFINER DEFINER 252 589815 14 N 17 0 33
+def information_schema TRIGGERS TRIGGERS TRIGGER_CATALOG TRIGGER_CATALOG 253 1536 0 Y 0 0 33
+def information_schema TRIGGERS TRIGGERS TRIGGER_SCHEMA TRIGGER_SCHEMA 253 192 4 N 1 0 33
+def information_schema TRIGGERS TRIGGERS TRIGGER_NAME TRIGGER_NAME 253 192 5 N 1 0 33
+def information_schema TRIGGERS TRIGGERS EVENT_MANIPULATION EVENT_MANIPULATION 253 18 6 N 1 0 33
+def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_CATALOG EVENT_OBJECT_CATALOG 253 1536 0 Y 0 0 33
+def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_SCHEMA EVENT_OBJECT_SCHEMA 253 192 4 N 1 0 33
+def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE EVENT_OBJECT_TABLE 253 192 2 N 1 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_CONDITION ACTION_CONDITION 252 589815 0 Y 16 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT ACTION_STATEMENT 252 589815 10 N 17 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_ORIENTATION ACTION_ORIENTATION 253 27 3 N 1 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_TIMING ACTION_TIMING 253 18 6 N 1 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_OLD_TABLE 253 192 0 Y 0 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 192 0 Y 0 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 9 3 N 1 0 33
+def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 9 3 N 1 0 33
+def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
+def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 252 589815 14 N 17 0 33
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW SQL_MODE DEFINER
NULL test t1_bi INSERT NULL test t1 NULL SET @a =
1 ROW BEFORE NULL NULL OLD NEW root@localhost
----------------------------------------------------------------
@@ -968,14 +968,14 @@ SELECT *
FROM INFORMATION_SCHEMA.VIEWS
WHERE table_name = 'v1';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def VIEWS TABLE_CATALOG TABLE_CATALOG 253 1536 0 Y 0 0 33
-def VIEWS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
-def VIEWS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
-def VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 41 N 17 0 33
-def VIEWS CHECK_OPTION CHECK_OPTION 253 24 4 N 1 0 33
-def VIEWS IS_UPDATABLE IS_UPDATABLE 253 9 2 N 1 0 33
-def VIEWS DEFINER DEFINER 253 231 14 N 1 0 33
-def VIEWS SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
+def information_schema VIEWS VIEWS TABLE_CATALOG TABLE_CATALOG 253 1536 0 Y 0 0 33
+def information_schema VIEWS VIEWS TABLE_SCHEMA TABLE_SCHEMA 253 192 4 N 1 0 33
+def information_schema VIEWS VIEWS TABLE_NAME TABLE_NAME 253 192 2 N 1 0 33
+def information_schema VIEWS VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 589815 41 N 17 0 33
+def information_schema VIEWS VIEWS CHECK_OPTION CHECK_OPTION 253 24 4 N 1 0 33
+def information_schema VIEWS VIEWS IS_UPDATABLE IS_UPDATABLE 253 9 2 N 1 0 33
+def information_schema VIEWS VIEWS DEFINER DEFINER 253 231 14 N 1 0 33
+def information_schema VIEWS VIEWS SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE
NULL test v1 /* ALGORITHM=UNDEFINED */ select 1 AS `1` NONE NO root@localhost DEFINER
----------------------------------------------------------------
@@ -1010,24 +1010,24 @@ DEFINER
FROM INFORMATION_SCHEMA.ROUTINES
WHERE routine_name = 'p1';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 1 0 33
-def ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 0 Y 0 0 33
-def ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 1 0 33
-def ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 1 0 33
-def ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 27 9 N 1 0 33
-def ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 253 192 0 Y 0 0 33
-def ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 1 0 33
-def ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 16 0 33
-def ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 0 0 33
-def ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 0 0 33
-def ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 1 0 33
-def ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 1 0 33
-def ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33
-def ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
-def ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
-def ROUTINES SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
-def ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 192 0 N 1 0 33
-def ROUTINES DEFINER DEFINER 253 231 14 N 1 0 33
+def information_schema ROUTINES ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 1 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 1 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 1 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 27 9 N 1 0 33
+def information_schema ROUTINES ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 253 192 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 1 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 16 0 33
+def information_schema ROUTINES ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 1 0 33
+def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 1 0 33
+def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33
+def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
+def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 192 0 N 1 0 33
+def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 231 14 N 1 0 33
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER
p1 NULL test p1 PROCEDURE NULL SQL SELECT 1 NULL NULL SQL NO CONTAINS
SQL NULL DEFINER root@localhost
----------------------------------------------------------------
@@ -1062,24 +1062,24 @@ DEFINER
FROM INFORMATION_SCHEMA.ROUTINES
WHERE routine_name = 'f1';
Catalog Database Table Table_alias Column Column_alias Type Length Max
length Is_null Flags Decimals Charsetnr
-def ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 1 0 33
-def ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 0 Y 0 0 33
-def ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 1 0 33
-def ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 1 0 33
-def ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 27 8 N 1 0 33
-def ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 253 192 7 Y 0 0 33
-def ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 1 0 33
-def ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 16 0 33
-def ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 0 0 33
-def ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 0 0 33
-def ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 1 0 33
-def ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 1 0 33
-def ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33
-def ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
-def ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
-def ROUTINES SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
-def ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 192 0 N 1 0 33
-def ROUTINES DEFINER DEFINER 253 231 14 N 1 0 33
+def information_schema ROUTINES ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 192 2 N 1 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 1536 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 192 4 N 1 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_NAME ROUTINE_NAME 253 192 2 N 1 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 27 8 N 1 0 33
+def information_schema ROUTINES ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 253 192 7 Y 0 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_BODY ROUTINE_BODY 253 24 3 N 1 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 589815 8 Y 16 0 33
+def information_schema ROUTINES ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 192 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 192 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 24 3 N 1 0 33
+def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 9 2 N 1 0 33
+def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 192 12 N 1 0 33
+def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 192 0 Y 0 0 33
+def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 21 7 N 1 0 33
+def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 252 589815 0 N 17 0 33
+def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 192 0 N 1 0 33
+def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 231 14 N 1 0 33
SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE SQL_MODE ROUTINE_COMMENT DEFINER
f1 NULL test f1 FUNCTION int(11) SQL RETURN 1 NULL NULL SQL NO CONTAINS
SQL NULL DEFINER root@localhost
----------------------------------------------------------------
diff -Nrup a/mysql-test/t/metadata.test b/mysql-test/t/metadata.test
--- a/mysql-test/t/metadata.test 2007-06-20 14:19:48 +05:00
+++ b/mysql-test/t/metadata.test 2008-03-27 18:48:01 +04:00
@@ -112,4 +112,13 @@ SELECT v1.c1, v2.c2 FROM v1 JOIN v2 ON c
DROP VIEW v1,v2;
DROP TABLE t1,t2;
+#
+# Bug#35428 When selecting from INFORMATION_SCHEMA tables, incomplete metadata
+#
+--enable_metadata
+select information_schema.tables.table_name from
+information_schema.tables
+where table_name='tables';
+--disable_metadata
+
--echo End of 5.0 tests
diff -Nrup a/sql/field.cc b/sql/field.cc
--- a/sql/field.cc 2008-02-08 16:03:48 +04:00
+++ b/sql/field.cc 2008-03-27 18:48:01 +04:00
@@ -1360,7 +1360,12 @@ void Field::make_field(Send_field *field
if (orig_table && orig_table->s->table_cache_key &&
*(orig_table->s->table_cache_key))
{
- field->org_table_name= orig_table->s->table_name;
+ if (orig_table->pos_in_table_list &&
+ orig_table->pos_in_table_list->schema_table)
+ field->org_table_name= (orig_table->pos_in_table_list->
+ schema_table->table_name);
+ else
+ field->org_table_name= orig_table->s->table_name;
field->db_name= orig_table->s->table_cache_key;
}
else
diff -Nrup a/sql/sql_handler.cc b/sql/sql_handler.cc
--- a/sql/sql_handler.cc 2007-10-12 18:55:44 +05:00
+++ b/sql/sql_handler.cc 2008-03-27 18:48:01 +04:00
@@ -445,6 +445,7 @@ retry:
goto err0;
}
tables->table=table;
+ table->pos_in_table_list= tables;
/* save open_tables state */
backup_open_tables= thd->open_tables;
diff -Nrup a/sql/sql_select.cc b/sql/sql_select.cc
--- a/sql/sql_select.cc 2008-03-03 21:35:38 +04:00
+++ b/sql/sql_select.cc 2008-03-27 18:48:01 +04:00
@@ -9398,7 +9398,11 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA
table->s->keys_for_keyread.init();
table->s->keys_in_use.init();
/* For easier error reporting */
- table->s->table_cache_key= (char*) (table->s->db= "");
+ if (param->schema_table)
+ table->s->table_cache_key=
+ (char*) (table->s->db= INFORMATION_SCHEMA_NAME.str);
+ else
+ table->s->table_cache_key= (char*) (table->s->db= "");
/* Calculate which type of fields we will store in the temporary table */
diff -Nrup a/tests/mysql_client_test.c b/tests/mysql_client_test.c
--- a/tests/mysql_client_test.c 2008-03-13 13:14:13 +04:00
+++ b/tests/mysql_client_test.c 2008-03-27 18:48:01 +04:00
@@ -7495,26 +7495,26 @@ static void test_explain_bug()
verify_prepare_field(result, 0, "Field", "COLUMN_NAME",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
- 0, 0, "", 64, 0);
+ 0, 0, "information_schema", 64, 0);
verify_prepare_field(result, 1, "Type", "COLUMN_TYPE", MYSQL_TYPE_BLOB,
- 0, 0, "", 0, 0);
+ 0, 0, "information_schema", 0, 0);
verify_prepare_field(result, 2, "Null", "IS_NULLABLE",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
- 0, 0, "", 3, 0);
+ 0, 0, "information_schema", 3, 0);
verify_prepare_field(result, 3, "Key", "COLUMN_KEY",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
- 0, 0, "", 3, 0);
+ 0, 0, "information_schema", 3, 0);
if ( mysql_get_server_version(mysql) >= 50027 )
{
/* The patch for bug#23037 changes column type of DEAULT to blob */
verify_prepare_field(result, 4, "Default", "COLUMN_DEFAULT",
- MYSQL_TYPE_BLOB, 0, 0, "", 0, 0);
+ MYSQL_TYPE_BLOB, 0, 0, "information_schema", 0, 0);
}
else
{
@@ -7523,14 +7523,14 @@ static void test_explain_bug()
MYSQL_TYPE_BLOB :
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
- 0, 0, "",
+ 0, 0, "information_schema",
mysql_get_server_version(mysql) >= 50027 ? 0 :64, 0);
}
verify_prepare_field(result, 5, "Extra", "EXTRA",
mysql_get_server_version(mysql) <= 50000 ?
MYSQL_TYPE_STRING : MYSQL_TYPE_VAR_STRING,
- 0, 0, "", 20, 0);
+ 0, 0, "information_schema", 20, 0);
mysql_free_result(result);
mysql_stmt_close(stmt);