summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-03-19 21:43:41 +0200
committerunknown <monty@narttu.mysql.fi>2003-03-19 21:43:41 +0200
commit9a81c0ef2f3ac29e77549f629e66f1f0dd0c8828 (patch)
treef73f6b61f529766ab03043b3abb2c0584e9b0643 /sql/handler.cc
parent32594fc6d3a722145b796f01ef16358fd5614e75 (diff)
downloadmariadb-git-9a81c0ef2f3ac29e77549f629e66f1f0dd0c8828.tar.gz
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
Diffstat (limited to 'sql/handler.cc')
-rw-r--r--sql/handler.cc9
1 files changed, 8 insertions, 1 deletions
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);