Commit 245a6f84 authored by venu@myvenu.com's avatar venu@myvenu.com

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
parent dd7ecee5
...@@ -531,8 +531,9 @@ int mysqld_extend_show_tables(THD *thd,const char *db,const char *wild) ...@@ -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); my_casedn_str(files_charset_info, file_name);
if (!(table = open_ltable(thd, &table_list, TL_READ))) 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(); protocol->store_null();
// Send error to Comment field
protocol->store(thd->net.last_error); protocol->store(thd->net.last_error);
thd->net.last_error[0]=0; 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