MDEV-13982 Server crashes in in ha_partition::engine_name

table might be NULL in ha_partition::engine_name()
(test case pushed into 5.5)
This commit is contained in:
Sergei Golubchik 2018-02-14 19:15:05 +01:00
parent ce0e2c82af
commit 5f6b3f9c07

View File

@ -558,8 +558,7 @@ public:
virtual THR_LOCK_DATA **store_lock(THD * thd, THR_LOCK_DATA ** to,
enum thr_lock_type lock_type);
virtual int external_lock(THD * thd, int lock_type);
LEX_CSTRING *engine_name()
{ return hton_name(table->part_info->default_engine_type); }
LEX_CSTRING *engine_name() { return hton_name(partition_ht()); }
/*
When table is locked a statement is started by calling start_stmt
instead of external_lock