mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
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
This commit is contained in:
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user