Commit cf00101b authored by unknown's avatar unknown

1. Fix for the crash in debug mode when the .frm is corrupted and SHOW TABLE...

1. Fix for the crash in debug mode when the .frm is corrupted and SHOW TABLE STATUS is executed.This also fixes to return the error message to comment field in SHOW TABLE STATUS when the .frm is corrupted
2. Test for corrupted .frm and the SHOW TABLE STATUS


sql/sql_show.cc:
  Fix for the crash in debug mode when the .frm is corrupted and SHOW TABLE STATUS is executed
  This also fixes to return the error message to comment field in SHOW TABLE STATUS when the .frm is corrupted
tests/client_test.c:
  test for corrupted .frm and the SHOW TABLE STATUS
parent 2842e601
......@@ -531,8 +531,9 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild)
my_casedn_str(files_charset_info, file_name);
if (!(table = open_ltable(thd, &table_list, TL_READ)))
{
for (uint i=0 ; i < field_list.elements ; i++)
for (uint i=1 ; i < field_list.elements-1 ; i++)
protocol->store_null();
// Send error to Comment field
protocol->store(thd->net.last_error);
thd->net.last_error[0]=0;
}
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment