1
0
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:
monty@narttu.mysql.fi
2003-03-19 21:43:41 +02:00
parent 056e88fe24
commit 68ca84dbd1
6 changed files with 64 additions and 11 deletions

View File

@@ -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);