Skip to content

Commit 5228417

Browse files
BUG#22216779: 5.6 CRASHES ON A 5.7 DATADIR
ANALYSIS: ========= Server startup on 5.6 with the 5.7 data directory results in server crash. This is basically an attempt to downgrade, which is unsupported. The system table 'plugin' uses the InnoDB storage engine in 5.7 whereas it uses MyISAM in 5.6. So during 5.6 server startup, the 'plugin' table cannot be opened which results in the 'hton' pointer set to NULL. Access to this pointer results in the server crash. FIX: ==== A check has been introduced to verify if the 'hton' pointer contains a non NULL value. If not, safe server shutdown is ensured.
1 parent ad5235c commit 5228417

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

sql/handler.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ plugin_ref ha_resolve_by_name(THD *thd, const LEX_STRING *name,
337337
if ((plugin= my_plugin_lock_by_name(thd, name, MYSQL_STORAGE_ENGINE_PLUGIN)))
338338
{
339339
handlerton *hton= plugin_data(plugin, handlerton *);
340-
if (!(hton->flags & HTON_NOT_USER_SELECTABLE))
340+
if (hton && !(hton->flags & HTON_NOT_USER_SELECTABLE))
341341
return plugin;
342342

343343
/*

0 commit comments

Comments
 (0)