From 0847c4f90e732378b6e4b37fe819c92bda870067 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 19 Mar 2003 21:43:41 +0200 Subject: Print right hostname or IP in SHOW PROCESSLIST Use SESSION TABLE_HANDLER as default table handler if given table handler doesn't exists Docs/internals.texi: Updated description for how DATE, TIME and TIMESTAMP are stored mysql-test/r/create.result: New tests mysql-test/t/create.test: New tests sql/handler.cc: Use SESSION TABLE_HANDLER as default table handler if given table handler doesn't exists. sql/sql_parse.cc: Fix that we return hostname instead of IP in SHOW PROCESSLIST sql/sql_show.cc: Print right hostname or IP in SHOW PROCESSLIST --- sql/handler.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'sql/handler.cc') diff --git a/sql/handler.cc b/sql/handler.cc index ebae0d5e901..6e3f8486b45 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -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); -- cgit v1.2.1