Improve default error message for optimize/repair table

parent dce31760
......@@ -2388,12 +2388,17 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables,
}
default: // Probably HA_ADMIN_INTERNAL_ERROR
{
char buf[ERRMSGSIZE+20];
uint length=my_snprintf(buf, ERRMSGSIZE,
"Unknown - internal error %d during operation",
result_code);
protocol->store("error", 5, system_charset_info);
protocol->store("Unknown - internal error during operation", 41
, system_charset_info);
protocol->store(buf, length, system_charset_info);
fatal_error=1;
break;
}
}
if (fatal_error)
table->table->s->version=0; // Force close of table
else if (open_for_modify)
......
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