Loading mysql-test/r/information_schema.result +4 −0 Original line number Diff line number Diff line Loading @@ -1560,4 +1560,8 @@ SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME ='information_schema'; SCHEMA_NAME information_schema SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db'; TABLE_COLLATION utf8_bin End of 5.1 tests. mysql-test/t/information_schema.test +6 −0 Original line number Diff line number Diff line Loading @@ -1202,4 +1202,10 @@ DROP VIEW v1; SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME ='information_schema'; # # Bug#31381 Error in retrieving Data from INFORMATION_SCHEMA # SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db'; --echo End of 5.1 tests. sql/sql_show.cc +4 −3 Original line number Diff line number Diff line Loading @@ -3487,6 +3487,10 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables, (ptr == option_buff ? 0 : (uint) (ptr-option_buff)-1), cs); tmp_buff= (share->table_charset ? share->table_charset->name : "default"); table->field[17]->store(tmp_buff, strlen(tmp_buff), cs); if (share->comment.str) table->field[20]->store(share->comment.str, share->comment.length, cs); Loading Loading @@ -3564,9 +3568,6 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables, table->field[16]->store_time(&time, MYSQL_TIMESTAMP_DATETIME); table->field[16]->set_notnull(); } tmp_buff= (share->table_charset ? share->table_charset->name : "default"); table->field[17]->store(tmp_buff, strlen(tmp_buff), cs); if (file->ha_table_flags() & (ulong) HA_HAS_CHECKSUM) { table->field[18]->store((longlong) file->checksum(), TRUE); Loading Loading
mysql-test/r/information_schema.result +4 −0 Original line number Diff line number Diff line Loading @@ -1560,4 +1560,8 @@ SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME ='information_schema'; SCHEMA_NAME information_schema SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db'; TABLE_COLLATION utf8_bin End of 5.1 tests.
mysql-test/t/information_schema.test +6 −0 Original line number Diff line number Diff line Loading @@ -1202,4 +1202,10 @@ DROP VIEW v1; SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME ='information_schema'; # # Bug#31381 Error in retrieving Data from INFORMATION_SCHEMA # SELECT TABLE_COLLATION FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_SCHEMA='mysql' and TABLE_NAME= 'db'; --echo End of 5.1 tests.
sql/sql_show.cc +4 −3 Original line number Diff line number Diff line Loading @@ -3487,6 +3487,10 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables, (ptr == option_buff ? 0 : (uint) (ptr-option_buff)-1), cs); tmp_buff= (share->table_charset ? share->table_charset->name : "default"); table->field[17]->store(tmp_buff, strlen(tmp_buff), cs); if (share->comment.str) table->field[20]->store(share->comment.str, share->comment.length, cs); Loading Loading @@ -3564,9 +3568,6 @@ static int get_schema_tables_record(THD *thd, TABLE_LIST *tables, table->field[16]->store_time(&time, MYSQL_TIMESTAMP_DATETIME); table->field[16]->set_notnull(); } tmp_buff= (share->table_charset ? share->table_charset->name : "default"); table->field[17]->store(tmp_buff, strlen(tmp_buff), cs); if (file->ha_table_flags() & (ulong) HA_HAS_CHECKSUM) { table->field[18]->store((longlong) file->checksum(), TRUE); Loading