diff options
author | unknown <acurtis@xiphis.org> | 2005-12-21 10:26:39 -0800 |
---|---|---|
committer | unknown <acurtis@xiphis.org> | 2005-12-21 10:26:39 -0800 |
commit | 5459c9709e047e3424001504f6cb99265ea650ff (patch) | |
tree | f13afe1a04c3cdd5a7aa52065913ee888f3eccb2 /sql/sql_delete.cc | |
parent | ec6121fb40519f75e5a6e5b2a77025db6f7b14c9 (diff) | |
parent | 613dd50a33ac3e64073abdbdae66ce3a93e69e30 (diff) | |
download | mariadb-git-5459c9709e047e3424001504f6cb99265ea650ff.tar.gz |
Merge xiphis.org:/home/antony/work2/mysql-5.1
into xiphis.org:/home/antony/work3/mysql-5.1-plugable-2
configure.in:
Auto merged
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/t/bdb.test:
Auto merged
sql/Makefile.am:
Auto merged
sql/ha_archive.cc:
Auto merged
sql/ha_berkeley.cc:
Auto merged
sql/ha_federated.cc:
Auto merged
sql/ha_innodb.cc:
Auto merged
sql/ha_myisam.cc:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/ha_partition.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/handler.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/log.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/set_var.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_cache.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_partition.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
sql/sql_table.cc:
SCCS merged
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index ffb9b1df18a..a9c3504250e 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -822,7 +822,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) /* If it is a temporary table, close and regenerate it */ if (!dont_send_ok && (table= find_temporary_table(thd, table_list))) { - db_type table_type= table->s->db_type; + handlerton *table_type= table->s->db_type; TABLE_SHARE *share= table->s; if (!ha_check_storage_engine_flag(table_type, HTON_CAN_RECREATE)) goto trunc_by_del; @@ -852,7 +852,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) if (!dont_send_ok) { - db_type table_type; + enum legacy_db_type table_type; mysql_frm_type(thd, path, &table_type); if (table_type == DB_TYPE_UNKNOWN) { @@ -860,7 +860,8 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok) table_list->db, table_list->table_name); DBUG_RETURN(TRUE); } - if (!ha_check_storage_engine_flag(table_type, HTON_CAN_RECREATE) + if (!ha_check_storage_engine_flag(ha_resolve_by_legacy_type(thd, table_type), + HTON_CAN_RECREATE) || thd->lex->sphead) goto trunc_by_del; if (lock_and_wait_for_table_name(thd, table_list)) |