Loading mysql-test/r/information_schema.result +8 −0 Original line number Diff line number Diff line Loading @@ -1048,3 +1048,11 @@ blob 65535 65535 text 65535 65535 text 65535 32767 drop table t1; create table t1 (f1 int(11)); create view v1 as select * from t1; drop table t1; select table_type from information_schema.tables where table_name="v1"; table_type VIEW drop view v1; mysql-test/t/information_schema.test +10 −0 Original line number Diff line number Diff line Loading @@ -738,3 +738,13 @@ create table t1(a blob, b text charset utf8, c text charset ucs2); select data_type, character_octet_length, character_maximum_length from information_schema.columns where table_name='t1'; drop table t1; # # Bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value # create table t1 (f1 int(11)); create view v1 as select * from t1; drop table t1; select table_type from information_schema.tables where table_name="v1"; drop view v1; sql/sql_show.cc +6 −0 Original line number Diff line number Diff line Loading @@ -2362,6 +2362,12 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables, there was errors during opening tables */ const char *error= thd->net.last_error; if (tables->view) table->field[3]->store(STRING_WITH_LEN("VIEW"), cs); else if (tables->schema_table) table->field[3]->store(STRING_WITH_LEN("SYSTEM VIEW"), cs); else table->field[3]->store(STRING_WITH_LEN("BASE TABLE"), cs); table->field[20]->store(error, strlen(error), cs); thd->clear_error(); } Loading Loading
mysql-test/r/information_schema.result +8 −0 Original line number Diff line number Diff line Loading @@ -1048,3 +1048,11 @@ blob 65535 65535 text 65535 65535 text 65535 32767 drop table t1; create table t1 (f1 int(11)); create view v1 as select * from t1; drop table t1; select table_type from information_schema.tables where table_name="v1"; table_type VIEW drop view v1;
mysql-test/t/information_schema.test +10 −0 Original line number Diff line number Diff line Loading @@ -738,3 +738,13 @@ create table t1(a blob, b text charset utf8, c text charset ucs2); select data_type, character_octet_length, character_maximum_length from information_schema.columns where table_name='t1'; drop table t1; # # Bug#14476 `information_schema`.`TABLES`.`TABLE_TYPE` with empty value # create table t1 (f1 int(11)); create view v1 as select * from t1; drop table t1; select table_type from information_schema.tables where table_name="v1"; drop view v1;
sql/sql_show.cc +6 −0 Original line number Diff line number Diff line Loading @@ -2362,6 +2362,12 @@ static int get_schema_tables_record(THD *thd, struct st_table_list *tables, there was errors during opening tables */ const char *error= thd->net.last_error; if (tables->view) table->field[3]->store(STRING_WITH_LEN("VIEW"), cs); else if (tables->schema_table) table->field[3]->store(STRING_WITH_LEN("SYSTEM VIEW"), cs); else table->field[3]->store(STRING_WITH_LEN("BASE TABLE"), cs); table->field[20]->store(error, strlen(error), cs); thd->clear_error(); } Loading