Description:
after running the testcase for bug #28477 a few times,
subsequent "drop table if exists t1_test;" causes a repeatable crash if t1_test has some
partitions.
The server crashes in this code:
/** @brief
Print error that we got from handler function
NOTE
In case of delete table it's only safe to use the following parts of
the 'table' structure:
table->s->path
table->alias
*/
void handler::print_error(int error, myf errflag)
{
<cut>
my_error(textno, errflag, table_share->table_name.str, error);
DBUG_VOID_RETURN;
}
The my_error is crashing. This table is partitioned, and likely some parts are missing
due to other bugs.
table_share->table_name is NULL, so how can .str work ?
How to repeat:
read the source code, or use testcase in bug #28477 until you get this crash:
mysqld.exe!handler::print_error
mysqld.exe!ha_partition::print_error
mysqld.exe!ha_delete_table
mysqld.exe!mysql_rm_table_part2
mysqld.exe!mysql_rm_table
mysqld.exe!mysql_execute_command
mysqld.exe!strmake_root
mysqld.exe!st_select_lex::add_table_to_list
mysqld.exe!MYSQLparse
mysqld.exe!dispatch_command
mysqld.exe!do_command
mysqld.exe!handle_one_connection
mysqld.exe!pthread_start
mysqld.exe!_callthreadstart
mysqld.exe!_threadstart
kernel32.dll!FlsSetValue
This isn't windows specific, - you can repeat it on linux too.
Suggested fix:
up to you.