mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Print right hostname or IP in SHOW PROCESSLIST
Use SESSION TABLE_HANDLER as default table handler if given table handler doesn't exists
This commit is contained in:
@@ -121,8 +121,15 @@ handler *get_new_handler(TABLE *table, enum db_type db_type)
|
||||
#endif
|
||||
case DB_TYPE_HEAP:
|
||||
return new ha_heap(table);
|
||||
case DB_TYPE_MYISAM:
|
||||
default: // should never happen
|
||||
{
|
||||
enum db_type def=(enum db_type) current_thd->variables.table_type;
|
||||
/* Try first with 'default table type' */
|
||||
if (db_type != def)
|
||||
return get_new_handler(table, def);
|
||||
}
|
||||
/* Fall back to MyISAM */
|
||||
case DB_TYPE_MYISAM:
|
||||
return new ha_myisam(table);
|
||||
case DB_TYPE_MRG_MYISAM:
|
||||
return new ha_myisammrg(table);
|
||||
|
||||
Reference in New Issue
Block a user