#At file:///home/gluh/MySQL/mysql-6.0-bugteam/ based on revid:sergey.glukhov@stripped
2823 Sergey Glukhov 2008-12-18
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
modified:
mysql-test/r/information_schema.result
mysql-test/r/show_check.result
sql/field.cc
sql/sql_base.cc
sql/sql_select.cc
tests/mysql_client_test.c
per-file messages:
mysql-test/r/information_schema.result
result fix
mysql-test/r/show_check.result
result fix
sql/field.cc
added intialization of orig table name for I_S table fields
sql/sql_base.cc
use case insensitive db comparison for I_S tables
sql/sql_select.cc
added intialization of db name for I_S table fields
tests/mysql_client_test.c
test fix
=== modified file 'mysql-test/r/information_schema.result'
--- a/mysql-test/r/information_schema.result 2008-12-18 10:04:05 +0000
+++ b/mysql-test/r/information_schema.result 2008-12-18 16:51:32 +0000
@@ -397,11 +397,11 @@ show keys from v4;
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_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 CHARACTER_SET_CLIENT COLLATION_CONNECTION
-NULL test v0 select `schemata`.`SCHEMA_NAME` AS `c` from `information_schema`.`schemata` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL test v1 select `tables`.`TABLE_NAME` AS `c` from `information_schema`.`tables` where (`tables`.`TABLE_NAME` = 'v1') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL test v2 select `columns`.`COLUMN_NAME` AS `c` from `information_schema`.`columns` where (`columns`.`TABLE_NAME` = 'v2') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL test v3 select `character_sets`.`CHARACTER_SET_NAME` AS `c` from `information_schema`.`character_sets` where (`character_sets`.`CHARACTER_SET_NAME` like 'latin1%') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
-NULL test v4 select `collations`.`COLLATION_NAME` AS `c` from `information_schema`.`collations` where (`collations`.`COLLATION_NAME` like 'latin1%') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v0 select `information_schema`.`schemata`.`SCHEMA_NAME` AS `c` from `information_schema`.`schemata` NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v1 select `information_schema`.`tables`.`TABLE_NAME` AS `c` from `information_schema`.`tables` where (`information_schema`.`tables`.`TABLE_NAME` = 'v1') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v2 select `information_schema`.`columns`.`COLUMN_NAME` AS `c` from `information_schema`.`columns` where (`information_schema`.`columns`.`TABLE_NAME` = 'v2') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v3 select `information_schema`.`character_sets`.`CHARACTER_SET_NAME` AS `c` from `information_schema`.`character_sets` where (`information_schema`.`character_sets`.`CHARACTER_SET_NAME` like 'latin1%') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
+NULL test v4 select `information_schema`.`collations`.`COLLATION_NAME` AS `c` from `information_schema`.`collations` where (`information_schema`.`collations`.`COLLATION_NAME` like 'latin1%') NONE NO root@localhost DEFINER latin1 latin1_swedish_ci
drop view v0, v1, v2, v3, v4;
create table t1 (a int);
grant select,update,insert on t1 to mysqltest_1@localhost;
@@ -1499,7 +1499,7 @@ AS SELECT *
FROM information_schema.tables;
SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS where TABLE_NAME = 'v1';
VIEW_DEFINITION
-select `tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`tables`.`TABLE_NAME` AS `TABLE_NAME`,`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`tables`.`ENGINE` AS `ENGINE`,`tables`.`VERSION` AS `VERSION`,`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`tables`.`DATA_FREE` AS `DATA_FREE`,`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`tables`.`CREATE_TIME` AS `CREATE_TIME`,`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`tables`.`CHECK_TIME` AS `CHECK_TIME`,`tables`.`TABLE_COLLATION` AS `TABLE_COLLATION`,`tables`.`CHECKSUM` AS `CHECKSUM`,`tables`.`CREATE_OPTIONS` AS `CREATE_OPTIONS`,`tables`.`TABLE_COMMENT` AS `TABLE_COMMENT`,`tables`.`TABLESPACE_NAME` AS `TABLESPACE_NAME` from `information_schema`.`tables`
+select `information_schema`.`tables`.`TABLE_CATALOG` AS `TABLE_CATALOG`,`information_schema`.`tables`.`TABLE_SCHEMA` AS `TABLE_SCHEMA`,`information_schema`.`tables`.`TABLE_NAME` AS `TABLE_NAME`,`information_schema`.`tables`.`TABLE_TYPE` AS `TABLE_TYPE`,`information_schema`.`tables`.`ENGINE` AS `ENGINE`,`information_schema`.`tables`.`VERSION` AS `VERSION`,`information_schema`.`tables`.`ROW_FORMAT` AS `ROW_FORMAT`,`information_schema`.`tables`.`TABLE_ROWS` AS `TABLE_ROWS`,`information_schema`.`tables`.`AVG_ROW_LENGTH` AS `AVG_ROW_LENGTH`,`information_schema`.`tables`.`DATA_LENGTH` AS `DATA_LENGTH`,`information_schema`.`tables`.`MAX_DATA_LENGTH` AS `MAX_DATA_LENGTH`,`information_schema`.`tables`.`INDEX_LENGTH` AS `INDEX_LENGTH`,`information_schema`.`tables`.`DATA_FREE` AS `DATA_FREE`,`information_schema`.`tables`.`AUTO_INCREMENT` AS `AUTO_INCREMENT`,`information_schema`.`tables`.`CREATE_TIME` AS `CREATE_TIME`,`information_schema`.`tables`.`UPDATE_TIME` AS `UPDATE_TIME`,`inform!
ation_sch
DROP VIEW v1;
SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA
WHERE SCHEMA_NAME ='information_schema';
=== modified file 'mysql-test/r/show_check.result'
--- a/mysql-test/r/show_check.result 2008-11-13 12:53:16 +0000
+++ b/mysql-test/r/show_check.result 2008-12-18 16:51:32 +0000
@@ -61,19 +61,19 @@ 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 STATISTICS INDEX_COMMENT Index_Comment 253 1024 0 N 1 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
+def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_Comment 253 1024 0 N 1 0 8
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
t1 0 PRIMARY 1 a A 5 NULL NULL BTREE
t1 1 b 1 b A 1 NULL NULL BTREE
@@ -100,52 +100,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 64 12 N 1 0 8
-def VARIABLES VARIABLE_VALUE Value 253 1024 5 Y 0 0 8
+def information_schema VARIABLES VARIABLES VARIABLE_NAME Variable_name 253 64 12 N 1 0 8
+def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 1024 5 Y 0 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 64 12 N 1 0 8
-def VARIABLES VARIABLE_VALUE Value 253 1024 5 Y 0 0 8
+def information_schema VARIABLES VARIABLES VARIABLE_NAME Variable_name 253 64 12 N 1 0 8
+def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 1024 5 Y 0 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 64 0 N 1 0 8
-def VARIABLES VARIABLE_VALUE Value 253 1024 0 Y 0 0 8
+def information_schema VARIABLES VARIABLES VARIABLE_NAME Variable_name 253 64 0 N 1 0 8
+def information_schema VARIABLES VARIABLES VARIABLE_VALUE Value 253 1024 0 Y 0 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 32800 0 63
-def TABLES ROW_FORMAT Row_format 253 10 0 Y 0 0 8
-def TABLES TABLE_ROWS Rows 8 21 0 Y 32800 0 63
-def TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32800 0 63
-def TABLES DATA_LENGTH Data_length 8 21 0 Y 32800 0 63
-def TABLES MAX_DATA_LENGTH Max_data_length 8 21 0 Y 32800 0 63
-def TABLES INDEX_LENGTH Index_length 8 21 0 Y 32800 0 63
-def TABLES DATA_FREE Data_free 8 21 0 Y 32800 0 63
-def TABLES AUTO_INCREMENT Auto_increment 8 21 0 Y 32800 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 32 0 Y 0 0 8
-def TABLES CHECKSUM Checksum 8 21 0 Y 32800 0 63
-def TABLES CREATE_OPTIONS Create_options 253 255 0 Y 0 0 8
-def TABLES TABLE_COMMENT Comment 253 2048 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 32800 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 32800 0 63
+def information_schema TABLES TABLES AVG_ROW_LENGTH Avg_row_length 8 21 0 Y 32800 0 63
+def information_schema TABLES TABLES DATA_LENGTH Data_length 8 21 0 Y 32800 0 63
+def information_schema TABLES TABLES MAX_DATA_LENGTH Max_data_length 8 21 0 Y 32800 0 63
+def information_schema TABLES TABLES INDEX_LENGTH Index_length 8 21 0 Y 32800 0 63
+def information_schema TABLES TABLES DATA_FREE Data_free 8 21 0 Y 32800 0 63
+def information_schema TABLES TABLES AUTO_INCREMENT Auto_increment 8 21 0 Y 32800 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 32 0 Y 0 0 8
+def information_schema TABLES TABLES CHECKSUM Checksum 8 21 0 Y 32800 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 2048 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));
@@ -626,19 +626,19 @@ 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 STATISTICS INDEX_COMMENT Index_Comment 253 1024 0 N 1 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
+def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_Comment 253 1024 0 N 1 0 63
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
t1 0 PRIMARY 1 field1 A 0 1000 NULL BTREE
drop table t1;
@@ -849,21 +849,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 128 4 N 1 0 45
-def CHARACTER_SETS DESCRIPTION Description 253 240 13 N 1 0 45
-def CHARACTER_SETS DEFAULT_COLLATE_NAME Default collation 253 128 15 N 1 0 45
-def CHARACTER_SETS MAXLEN Maxlen 8 3 1 N 32769 0 63
+def information_schema CHARACTER_SETS CHARACTER_SETS CHARACTER_SET_NAME Charset 253 128 4 N 1 0 45
+def information_schema CHARACTER_SETS CHARACTER_SETS DESCRIPTION Description 253 240 13 N 1 0 45
+def information_schema CHARACTER_SETS CHARACTER_SETS DEFAULT_COLLATE_NAME Default collation 253 128 15 N 1 0 45
+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 4
----------------------------------------------------------------
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 128 10 N 1 0 45
-def COLLATIONS CHARACTER_SET_NAME Charset 253 128 6 N 1 0 45
-def COLLATIONS ID Id 8 11 2 N 32769 0 63
-def COLLATIONS IS_DEFAULT Default 253 12 0 N 1 0 45
-def COLLATIONS IS_COMPILED Compiled 253 12 3 N 1 0 45
-def COLLATIONS SORTLEN Sortlen 8 3 1 N 32769 0 63
+def information_schema COLLATIONS COLLATIONS COLLATION_NAME Collation 253 128 10 N 1 0 45
+def information_schema COLLATIONS COLLATIONS CHARACTER_SET_NAME Charset 253 128 6 N 1 0 45
+def information_schema COLLATIONS COLLATIONS ID Id 8 11 2 N 32769 0 63
+def information_schema COLLATIONS COLLATIONS IS_DEFAULT Default 253 12 0 N 1 0 45
+def information_schema COLLATIONS COLLATIONS IS_COMPILED Compiled 253 12 3 N 1 0 45
+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
----------------------------------------------------------------
@@ -876,7 +876,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 256 10 N 1 0 45
+def information_schema SCHEMATA SCHEMATA SCHEMA_NAME Database (mysqltest1) 253 256 10 N 1 0 45
Database (mysqltest1)
mysqltest1
----------------------------------------------------------------
@@ -892,19 +892,19 @@ 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 256 2 N 1 0 45
-def STATISTICS NON_UNIQUE Non_unique 8 1 1 N 32769 0 63
-def STATISTICS INDEX_NAME Key_name 253 256 7 N 1 0 45
-def STATISTICS SEQ_IN_INDEX Seq_in_index 8 2 1 N 32769 0 63
-def STATISTICS COLUMN_NAME Column_name 253 256 1 N 1 0 45
-def STATISTICS COLLATION Collation 253 4 1 Y 0 0 45
-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 40 0 Y 0 0 45
-def STATISTICS NULLABLE Null 253 12 0 N 1 0 45
-def STATISTICS INDEX_TYPE Index_type 253 64 5 N 1 0 45
-def STATISTICS COMMENT Comment 253 64 0 Y 0 0 45
-def STATISTICS INDEX_COMMENT Index_Comment 253 4096 0 N 1 0 45
+def information_schema STATISTICS STATISTICS TABLE_NAME Table 253 256 2 N 1 0 45
+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 256 7 N 1 0 45
+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 256 1 N 1 0 45
+def information_schema STATISTICS STATISTICS COLLATION Collation 253 4 1 Y 0 0 45
+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 40 0 Y 0 0 45
+def information_schema STATISTICS STATISTICS NULLABLE Null 253 12 0 N 1 0 45
+def information_schema STATISTICS STATISTICS INDEX_TYPE Index_type 253 64 5 N 1 0 45
+def information_schema STATISTICS STATISTICS COMMENT Comment 253 64 0 Y 0 0 45
+def information_schema STATISTICS STATISTICS INDEX_COMMENT Index_Comment 253 4096 0 N 1 0 45
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment Index_Comment
t1 0 PRIMARY 1 c A 0 NULL NULL BTREE
----------------------------------------------------------------
@@ -921,15 +921,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 2048 0 Y 0 0 45
-def TABLES TABLE_SCHEMA TABLE_SCHEMA 253 256 4 N 1 0 45
-def TABLES TABLE_NAME TABLE_NAME 253 256 2 N 1 0 45
-def TABLES TABLE_TYPE TABLE_TYPE 253 256 10 N 1 0 45
-def TABLES ENGINE ENGINE 253 256 6 Y 0 0 45
-def TABLES ROW_FORMAT ROW_FORMAT 253 40 5 Y 0 0 45
-def TABLES TABLE_COLLATION TABLE_COLLATION 253 128 17 Y 0 0 45
-def TABLES CREATE_OPTIONS CREATE_OPTIONS 253 1020 0 Y 0 0 45
-def TABLES TABLE_COMMENT TABLE_COMMENT 253 8192 0 N 1 0 45
+def information_schema TABLES TABLES TABLE_CATALOG TABLE_CATALOG 253 2048 0 Y 0 0 45
+def information_schema TABLES TABLES TABLE_SCHEMA TABLE_SCHEMA 253 256 4 N 1 0 45
+def information_schema TABLES TABLES TABLE_NAME TABLE_NAME 253 256 2 N 1 0 45
+def information_schema TABLES TABLES TABLE_TYPE TABLE_TYPE 253 256 10 N 1 0 45
+def information_schema TABLES TABLES ENGINE ENGINE 253 256 6 Y 0 0 45
+def information_schema TABLES TABLES ROW_FORMAT ROW_FORMAT 253 40 5 Y 0 0 45
+def information_schema TABLES TABLES TABLE_COLLATION TABLE_COLLATION 253 128 17 Y 0 0 45
+def information_schema TABLES TABLES CREATE_OPTIONS CREATE_OPTIONS 253 1020 0 Y 0 0 45
+def information_schema TABLES TABLES TABLE_COMMENT TABLE_COMMENT 253 8192 0 N 1 0 45
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
----------------------------------------------------------------
@@ -951,53 +951,53 @@ 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 2048 0 Y 0 0 45
-def COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 256 4 N 1 0 45
-def COLUMNS TABLE_NAME TABLE_NAME 253 256 2 N 1 0 45
-def COLUMNS COLUMN_NAME COLUMN_NAME 253 256 1 N 1 0 45
-def COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 1048560 0 Y 16 0 45
-def COLUMNS IS_NULLABLE IS_NULLABLE 253 12 2 N 1 0 45
-def COLUMNS DATA_TYPE DATA_TYPE 253 256 3 N 1 0 45
-def COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 128 0 Y 0 0 45
-def COLUMNS COLLATION_NAME COLLATION_NAME 253 128 0 Y 0 0 45
-def COLUMNS COLUMN_TYPE COLUMN_TYPE 252 1048560 7 N 17 0 45
-def COLUMNS COLUMN_KEY COLUMN_KEY 253 12 3 N 1 0 45
-def COLUMNS EXTRA EXTRA 253 108 0 N 1 0 45
-def COLUMNS PRIVILEGES PRIVILEGES 253 320 31 N 1 0 45
-def COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 4096 0 N 1 0 45
+def information_schema COLUMNS COLUMNS TABLE_CATALOG TABLE_CATALOG 253 2048 0 Y 0 0 45
+def information_schema COLUMNS COLUMNS TABLE_SCHEMA TABLE_SCHEMA 253 256 4 N 1 0 45
+def information_schema COLUMNS COLUMNS TABLE_NAME TABLE_NAME 253 256 2 N 1 0 45
+def information_schema COLUMNS COLUMNS COLUMN_NAME COLUMN_NAME 253 256 1 N 1 0 45
+def information_schema COLUMNS COLUMNS COLUMN_DEFAULT COLUMN_DEFAULT 252 1048560 0 Y 16 0 45
+def information_schema COLUMNS COLUMNS IS_NULLABLE IS_NULLABLE 253 12 2 N 1 0 45
+def information_schema COLUMNS COLUMNS DATA_TYPE DATA_TYPE 253 256 3 N 1 0 45
+def information_schema COLUMNS COLUMNS CHARACTER_SET_NAME CHARACTER_SET_NAME 253 128 0 Y 0 0 45
+def information_schema COLUMNS COLUMNS COLLATION_NAME COLLATION_NAME 253 128 0 Y 0 0 45
+def information_schema COLUMNS COLUMNS COLUMN_TYPE COLUMN_TYPE 252 1048560 7 N 17 0 45
+def information_schema COLUMNS COLUMNS COLUMN_KEY COLUMN_KEY 253 12 3 N 1 0 45
+def information_schema COLUMNS COLUMNS EXTRA EXTRA 253 108 0 N 1 0 45
+def information_schema COLUMNS COLUMNS PRIVILEGES PRIVILEGES 253 320 31 N 1 0 45
+def information_schema COLUMNS COLUMNS COLUMN_COMMENT COLUMN_COMMENT 253 4096 0 N 1 0 45
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 256 2 N 1 0 45
+def information_schema TABLE_NAMES TABLE_NAMES TABLE_NAME Tables_in_test (t1) 253 256 2 N 1 0 45
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 256 1 N 1 0 45
-def COLUMNS COLUMN_TYPE Type 252 1048560 7 N 17 0 45
-def COLUMNS IS_NULLABLE Null 253 12 2 N 1 0 45
-def COLUMNS COLUMN_KEY Key 253 12 3 N 1 0 45
-def COLUMNS COLUMN_DEFAULT Default 252 1048560 0 Y 16 0 45
-def COLUMNS EXTRA Extra 253 108 0 N 1 0 45
+def information_schema COLUMNS COLUMNS COLUMN_NAME Field 253 256 1 N 1 0 45
+def information_schema COLUMNS COLUMNS COLUMN_TYPE Type 252 1048560 7 N 17 0 45
+def information_schema COLUMNS COLUMNS IS_NULLABLE Null 253 12 2 N 1 0 45
+def information_schema COLUMNS COLUMNS COLUMN_KEY Key 253 12 3 N 1 0 45
+def information_schema COLUMNS COLUMNS COLUMN_DEFAULT Default 252 1048560 0 Y 16 0 45
+def information_schema COLUMNS COLUMNS EXTRA Extra 253 108 0 N 1 0 45
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 256 5 N 1 0 45
-def TRIGGERS EVENT_MANIPULATION Event 253 24 6 N 1 0 45
-def TRIGGERS EVENT_OBJECT_TABLE Table 253 256 2 N 1 0 45
-def TRIGGERS ACTION_STATEMENT Statement 252 1048560 10 N 17 0 45
-def TRIGGERS ACTION_TIMING Timing 253 24 6 N 1 0 45
-def TRIGGERS CREATED Created 12 19 0 Y 128 0 63
-def TRIGGERS SQL_MODE sql_mode 253 32768 0 N 1 0 45
-def TRIGGERS DEFINER Definer 253 308 14 N 1 0 45
-def TRIGGERS CHARACTER_SET_CLIENT character_set_client 253 128 6 N 1 0 45
-def TRIGGERS COLLATION_CONNECTION collation_connection 253 128 6 N 1 0 45
-def TRIGGERS DATABASE_COLLATION Database Collation 253 128 17 N 1 0 45
+def information_schema TRIGGERS TRIGGERS TRIGGER_NAME Trigger 253 256 5 N 1 0 45
+def information_schema TRIGGERS TRIGGERS EVENT_MANIPULATION Event 253 24 6 N 1 0 45
+def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE Table 253 256 2 N 1 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT Statement 252 1048560 10 N 17 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_TIMING Timing 253 24 6 N 1 0 45
+def information_schema TRIGGERS TRIGGERS CREATED Created 12 19 0 Y 128 0 63
+def information_schema TRIGGERS TRIGGERS SQL_MODE sql_mode 253 32768 0 N 1 0 45
+def information_schema TRIGGERS TRIGGERS DEFINER Definer 253 308 14 N 1 0 45
+def information_schema TRIGGERS TRIGGERS CHARACTER_SET_CLIENT character_set_client 253 128 6 N 1 0 45
+def information_schema TRIGGERS TRIGGERS COLLATION_CONNECTION collation_connection 253 128 6 N 1 0 45
+def information_schema TRIGGERS TRIGGERS DATABASE_COLLATION Database Collation 253 128 17 N 1 0 45
Trigger Event Table Statement Timing Created sql_mode Definer character_set_client collation_connection Database Collation
t1_bi INSERT t1 SET @a = 1 BEFORE NULL root@localhost binary binary latin1_swedish_ci
----------------------------------------------------------------
@@ -1022,23 +1022,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 2048 0 Y 0 0 45
-def TRIGGERS TRIGGER_SCHEMA TRIGGER_SCHEMA 253 256 4 N 1 0 45
-def TRIGGERS TRIGGER_NAME TRIGGER_NAME 253 256 5 N 1 0 45
-def TRIGGERS EVENT_MANIPULATION EVENT_MANIPULATION 253 24 6 N 1 0 45
-def TRIGGERS EVENT_OBJECT_CATALOG EVENT_OBJECT_CATALOG 253 2048 0 Y 0 0 45
-def TRIGGERS EVENT_OBJECT_SCHEMA EVENT_OBJECT_SCHEMA 253 256 4 N 1 0 45
-def TRIGGERS EVENT_OBJECT_TABLE EVENT_OBJECT_TABLE 253 256 2 N 1 0 45
-def TRIGGERS ACTION_CONDITION ACTION_CONDITION 252 1048560 0 Y 16 0 45
-def TRIGGERS ACTION_STATEMENT ACTION_STATEMENT 252 1048560 10 N 17 0 45
-def TRIGGERS ACTION_ORIENTATION ACTION_ORIENTATION 253 36 3 N 1 0 45
-def TRIGGERS ACTION_TIMING ACTION_TIMING 253 24 6 N 1 0 45
-def TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_OLD_TABLE 253 256 0 Y 0 0 45
-def TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 256 0 Y 0 0 45
-def TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 12 3 N 1 0 45
-def TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 12 3 N 1 0 45
-def TRIGGERS SQL_MODE SQL_MODE 253 32768 0 N 1 0 45
-def TRIGGERS DEFINER DEFINER 253 308 14 N 1 0 45
+def information_schema TRIGGERS TRIGGERS TRIGGER_CATALOG TRIGGER_CATALOG 253 2048 0 Y 0 0 45
+def information_schema TRIGGERS TRIGGERS TRIGGER_SCHEMA TRIGGER_SCHEMA 253 256 4 N 1 0 45
+def information_schema TRIGGERS TRIGGERS TRIGGER_NAME TRIGGER_NAME 253 256 5 N 1 0 45
+def information_schema TRIGGERS TRIGGERS EVENT_MANIPULATION EVENT_MANIPULATION 253 24 6 N 1 0 45
+def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_CATALOG EVENT_OBJECT_CATALOG 253 2048 0 Y 0 0 45
+def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_SCHEMA EVENT_OBJECT_SCHEMA 253 256 4 N 1 0 45
+def information_schema TRIGGERS TRIGGERS EVENT_OBJECT_TABLE EVENT_OBJECT_TABLE 253 256 2 N 1 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_CONDITION ACTION_CONDITION 252 1048560 0 Y 16 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_STATEMENT ACTION_STATEMENT 252 1048560 10 N 17 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_ORIENTATION ACTION_ORIENTATION 253 36 3 N 1 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_TIMING ACTION_TIMING 253 24 6 N 1 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_OLD_TABLE 253 256 0 Y 0 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_NEW_TABLE 253 256 0 Y 0 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_OLD_ROW 253 12 3 N 1 0 45
+def information_schema TRIGGERS TRIGGERS ACTION_REFERENCE_NEW_ROW ACTION_REFERENCE_NEW_ROW 253 12 3 N 1 0 45
+def information_schema TRIGGERS TRIGGERS SQL_MODE SQL_MODE 253 32768 0 N 1 0 45
+def information_schema TRIGGERS TRIGGERS DEFINER DEFINER 253 308 14 N 1 0 45
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
----------------------------------------------------------------
@@ -1055,16 +1055,16 @@ 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 2048 0 Y 0 0 45
-def VIEWS TABLE_SCHEMA TABLE_SCHEMA 253 256 4 N 1 0 45
-def VIEWS TABLE_NAME TABLE_NAME 253 256 2 N 1 0 45
-def VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 1048560 15 N 17 0 45
-def VIEWS CHECK_OPTION CHECK_OPTION 253 32 4 N 1 0 45
-def VIEWS IS_UPDATABLE IS_UPDATABLE 253 12 2 N 1 0 45
-def VIEWS DEFINER DEFINER 253 308 14 N 1 0 45
-def VIEWS SECURITY_TYPE SECURITY_TYPE 253 28 7 N 1 0 45
-def VIEWS CHARACTER_SET_CLIENT CHARACTER_SET_CLIENT 253 128 6 N 1 0 45
-def VIEWS COLLATION_CONNECTION COLLATION_CONNECTION 253 128 6 N 1 0 45
+def information_schema VIEWS VIEWS TABLE_CATALOG TABLE_CATALOG 253 2048 0 Y 0 0 45
+def information_schema VIEWS VIEWS TABLE_SCHEMA TABLE_SCHEMA 253 256 4 N 1 0 45
+def information_schema VIEWS VIEWS TABLE_NAME TABLE_NAME 253 256 2 N 1 0 45
+def information_schema VIEWS VIEWS VIEW_DEFINITION VIEW_DEFINITION 252 1048560 15 N 17 0 45
+def information_schema VIEWS VIEWS CHECK_OPTION CHECK_OPTION 253 32 4 N 1 0 45
+def information_schema VIEWS VIEWS IS_UPDATABLE IS_UPDATABLE 253 12 2 N 1 0 45
+def information_schema VIEWS VIEWS DEFINER DEFINER 253 308 14 N 1 0 45
+def information_schema VIEWS VIEWS SECURITY_TYPE SECURITY_TYPE 253 28 7 N 1 0 45
+def information_schema VIEWS VIEWS CHARACTER_SET_CLIENT CHARACTER_SET_CLIENT 253 128 6 N 1 0 45
+def information_schema VIEWS VIEWS COLLATION_CONNECTION COLLATION_CONNECTION 253 128 6 N 1 0 45
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION
NULL test v1 select 1 AS `1` NONE NO root@localhost DEFINER binary binary
----------------------------------------------------------------
@@ -1102,24 +1102,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 256 2 N 1 0 45
-def ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 2048 0 Y 0 0 45
-def ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 256 4 N 1 0 45
-def ROUTINES ROUTINE_NAME ROUTINE_NAME 253 256 2 N 1 0 45
-def ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 36 9 N 1 0 45
-def ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 252 1048560 0 Y 16 0 45
-def ROUTINES ROUTINE_BODY ROUTINE_BODY 253 32 3 N 1 0 45
-def ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 1048560 8 Y 16 0 45
-def ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 256 0 Y 0 0 45
-def ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 256 0 Y 0 0 45
-def ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 32 3 N 1 0 45
-def ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 12 2 N 1 0 45
-def ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 256 12 N 1 0 45
-def ROUTINES SQL_PATH SQL_PATH 253 256 0 Y 0 0 45
-def ROUTINES SECURITY_TYPE SECURITY_TYPE 253 28 7 N 1 0 45
-def ROUTINES SQL_MODE SQL_MODE 253 32768 0 N 1 0 45
-def ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 256 0 N 1 0 45
-def ROUTINES DEFINER DEFINER 253 308 14 N 1 0 45
+def information_schema ROUTINES ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 256 2 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 2048 0 Y 0 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 256 4 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_NAME ROUTINE_NAME 253 256 2 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 36 9 N 1 0 45
+def information_schema ROUTINES ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 252 1048560 0 Y 16 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_BODY ROUTINE_BODY 253 32 3 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 1048560 8 Y 16 0 45
+def information_schema ROUTINES ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 256 0 Y 0 0 45
+def information_schema ROUTINES ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 256 0 Y 0 0 45
+def information_schema ROUTINES ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 32 3 N 1 0 45
+def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 12 2 N 1 0 45
+def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 256 12 N 1 0 45
+def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 256 0 Y 0 0 45
+def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 28 7 N 1 0 45
+def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 32768 0 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 256 0 N 1 0 45
+def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 308 14 N 1 0 45
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
----------------------------------------------------------------
@@ -1157,24 +1157,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 256 2 N 1 0 45
-def ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 2048 0 Y 0 0 45
-def ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 256 4 N 1 0 45
-def ROUTINES ROUTINE_NAME ROUTINE_NAME 253 256 2 N 1 0 45
-def ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 36 8 N 1 0 45
-def ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 252 1048560 7 Y 16 0 45
-def ROUTINES ROUTINE_BODY ROUTINE_BODY 253 32 3 N 1 0 45
-def ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 1048560 8 Y 16 0 45
-def ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 256 0 Y 0 0 45
-def ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 256 0 Y 0 0 45
-def ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 32 3 N 1 0 45
-def ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 12 2 N 1 0 45
-def ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 256 12 N 1 0 45
-def ROUTINES SQL_PATH SQL_PATH 253 256 0 Y 0 0 45
-def ROUTINES SECURITY_TYPE SECURITY_TYPE 253 28 7 N 1 0 45
-def ROUTINES SQL_MODE SQL_MODE 253 32768 0 N 1 0 45
-def ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 256 0 N 1 0 45
-def ROUTINES DEFINER DEFINER 253 308 14 N 1 0 45
+def information_schema ROUTINES ROUTINES SPECIFIC_NAME SPECIFIC_NAME 253 256 2 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_CATALOG ROUTINE_CATALOG 253 2048 0 Y 0 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_SCHEMA ROUTINE_SCHEMA 253 256 4 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_NAME ROUTINE_NAME 253 256 2 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_TYPE ROUTINE_TYPE 253 36 8 N 1 0 45
+def information_schema ROUTINES ROUTINES DTD_IDENTIFIER DTD_IDENTIFIER 252 1048560 7 Y 16 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_BODY ROUTINE_BODY 253 32 3 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_DEFINITION ROUTINE_DEFINITION 252 1048560 8 Y 16 0 45
+def information_schema ROUTINES ROUTINES EXTERNAL_NAME EXTERNAL_NAME 253 256 0 Y 0 0 45
+def information_schema ROUTINES ROUTINES EXTERNAL_LANGUAGE EXTERNAL_LANGUAGE 253 256 0 Y 0 0 45
+def information_schema ROUTINES ROUTINES PARAMETER_STYLE PARAMETER_STYLE 253 32 3 N 1 0 45
+def information_schema ROUTINES ROUTINES IS_DETERMINISTIC IS_DETERMINISTIC 253 12 2 N 1 0 45
+def information_schema ROUTINES ROUTINES SQL_DATA_ACCESS SQL_DATA_ACCESS 253 256 12 N 1 0 45
+def information_schema ROUTINES ROUTINES SQL_PATH SQL_PATH 253 256 0 Y 0 0 45
+def information_schema ROUTINES ROUTINES SECURITY_TYPE SECURITY_TYPE 253 28 7 N 1 0 45
+def information_schema ROUTINES ROUTINES SQL_MODE SQL_MODE 253 32768 0 N 1 0 45
+def information_schema ROUTINES ROUTINES ROUTINE_COMMENT ROUTINE_COMMENT 253 256 0 N 1 0 45
+def information_schema ROUTINES ROUTINES DEFINER DEFINER 253 308 14 N 1 0 45
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
----------------------------------------------------------------
=== modified file 'sql/field.cc'
--- a/sql/field.cc 2008-12-09 12:25:17 +0000
+++ b/sql/field.cc 2008-12-18 16:51:32 +0000
@@ -1530,7 +1530,12 @@ void Field::make_field(Send_field *field
if (orig_table && orig_table->s->db.str && *orig_table->s->db.str)
{
field->db_name= orig_table->s->db.str;
- field->org_table_name= orig_table->s->table_name.str;
+ 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.str;
}
else
field->org_table_name= field->db_name= "";
=== modified file 'sql/sql_base.cc'
--- a/sql/sql_base.cc 2008-11-27 15:14:29 +0000
+++ b/sql/sql_base.cc 2008-12-18 16:51:32 +0000
@@ -5144,7 +5144,9 @@ find_field_in_table_ref(THD *thd, TABLE_
table_name && table_name[0] &&
(my_strcasecmp(table_alias_charset, table_list->alias, table_name) ||
(db_name && db_name[0] && table_list->db && table_list->db[0] &&
- strcmp(db_name, table_list->db))))
+ (table_list->schema_table ?
+ my_strcasecmp(system_charset_info, db_name, table_list->db) :
+ strcmp(db_name, table_list->db)))))
DBUG_RETURN(0);
*actual_table= NULL;
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2008-12-15 23:58:15 +0000
+++ b/sql/sql_select.cc 2008-12-18 16:51:32 +0000
@@ -11865,6 +11865,8 @@ create_tmp_table(THD *thd,TMP_TABLE_PARA
share->primary_key= MAX_KEY; // Indicate no primary key
share->keys_for_keyread.init();
share->keys_in_use.init();
+ if (param->schema_table)
+ share->db= INFORMATION_SCHEMA_NAME;
/* Calculate which type of fields we will store in the temporary table */
=== modified file 'tests/mysql_client_test.c'
--- a/tests/mysql_client_test.c 2008-12-11 10:52:29 +0000
+++ b/tests/mysql_client_test.c 2008-12-18 16:51:32 +0000
@@ -8282,26 +8282,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
{
@@ -8310,14 +8310,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, "", 27, 0);
+ 0, 0, "information_schema", 27, 0);
mysql_free_result(result);
mysql_stmt_close(stmt);
| Thread |
|---|
| • bzr commit into mysql-6.0-bugteam branch (Sergey.Glukhov:2823)Bug#35428 | Sergey Glukhov | 18 Dec |