summaryrefslogtreecommitdiff
path: root/sql/handler.cc
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-03-19 22:25:44 +0200
committerunknown <monty@narttu.mysql.fi>2003-03-19 22:25:44 +0200
commit161942e3cefd8923633e0a7b3b7a9860a95f6fbc (patch)
treeabbee7d78d1399086c301a5bd02f3ba4a9e1ea38 /sql/handler.cc
parentd7bedeb998c911c921d7b67dc07049955481d9b7 (diff)
parent7517a59a6dac4580b1f7b5cf87abf6d75b096bbc (diff)
downloadmariadb-git-161942e3cefd8923633e0a7b3b7a9860a95f6fbc.tar.gz
Merge with 4.0.12
Docs/internals.texi: Auto merged include/my_global.h: Auto merged include/mysql_com.h: Auto merged innobase/row/row0mysql.c: Auto merged innobase/row/row0sel.c: Auto merged libmysql/Makefile.am: Auto merged libmysqld/Makefile.am: Auto merged libmysqld/lib_vio.c: Auto merged mysql-test/r/heap.result: Auto merged mysql-test/r/innodb.result: Auto merged mysql-test/t/heap.test: Auto merged sql/ha_innodb.h: Auto merged sql/ha_myisam.cc: Auto merged BitKeeper/deleted/.del-password.c~76f30876e68eddb4: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item_func.cc: Auto merged sql/key.cc: Auto merged sql/lex.h: Auto merged sql/log.cc: Auto merged sql/mysqld.cc: Auto merged sql/slave.cc: Auto merged sql/slave.h: Auto merged sql/sql_class.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_yacc.yy: Auto merged sql/table.cc: Auto merged strings/strto.c: Auto merged
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 d7ae960382c..5353e78cd11 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);