summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <eric@mysql.com>2005-09-30 16:26:48 -0700
committerunknown <eric@mysql.com>2005-09-30 16:26:48 -0700
commit967c4e63d3943914e45f68975da99e997dfcefdf (patch)
treec1894e3d927782633ebebf8b571ef7b84d2689fe /sql/sql_delete.cc
parent3cb5e1fb5d228c3ce9ca0d3988c1912dd3dbd12c (diff)
downloadmariadb-git-967c4e63d3943914e45f68975da99e997dfcefdf.tar.gz
Move handler specific options into handlerton flag check
BUG#13108 mysql-test/r/federated.result: added test results for federated alter table mysql-test/t/federated.test: added test for federated alter table sql/examples/ha_example.cc: supports table re-creation sql/examples/ha_tina.cc: supports table re-creation sql/ha_blackhole.cc: supports table re-creation sql/ha_federated.cc: added flag for not supporting alter sql/ha_heap.cc: supports table recreation sql/ha_myisam.cc: supports table recreation sql/ha_myisammrg.cc: supports table re-creation sql/handler.cc: implemented flag check function sql/handler.h: added additional handlerton flags created a function to test flags replace ha_supports_generate macro with call to flag check sql/sql_delete.cc: replaced ha_supports_generate with handlerton flag check sql/sql_table.cc: added check for handlerton check for alter support
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index 4001a51f459..d9734b7cae8 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -787,7 +787,7 @@ bool mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
TABLE *table= *table_ptr;
table->file->info(HA_STATUS_AUTO | HA_STATUS_NO_LOCK);
db_type table_type= table->s->db_type;
- if (!ha_supports_generate(table_type))
+ if (!ha_check_storage_engine_flag(table_type, HTON_CAN_RECREATE))
goto trunc_by_del;
strmov(path, table->s->path);
*table_ptr= table->next; // Unlink table from list
@@ -818,7 +818,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_supports_generate(table_type) || thd->lex->sphead)
+ if (!ha_check_storage_engine_flag(table_type, HTON_CAN_RECREATE)
+ || thd->lex->sphead)
goto trunc_by_del;
if (lock_and_wait_for_table_name(thd, table_list))
DBUG_RETURN(TRUE);