summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2005-04-14 21:31:22 +0200
committerunknown <serg@serg.mylan>2005-04-14 21:31:22 +0200
commitc8723e7f95fa716484e0e84e179e2f4deb5fbc2a (patch)
treed216238c0859c374d61a43945a50bc97418ca099 /sql/sql_delete.cc
parent78bdb7d50d259175229195ec37614f84099cd6be (diff)
parent1403fb000b58a171b094a93b35c4f93123c15b19 (diff)
downloadmariadb-git-c8723e7f95fa716484e0e84e179e2f4deb5fbc2a.tar.gz
merged
mysql-test/r/innodb.result: Auto merged mysql-test/t/innodb.test: Auto merged
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index cecdf8d1c62..0752105bcae 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -649,11 +649,14 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
if (!ha_supports_generate(table_type))
{
/* Probably InnoDB table */
+ ulong save_options= thd->options;
table_list->lock_type= TL_WRITE;
+ thd->options&= ~(ulong) (OPTION_BEGIN | OPTION_NOT_AUTOCOMMIT);
ha_enable_transaction(thd, FALSE);
error= mysql_delete(thd, table_list, (COND*) 0, (SQL_LIST*) 0,
HA_POS_ERROR, 0);
ha_enable_transaction(thd, TRUE);
+ thd->options= save_options;
DBUG_RETURN(error);
}
if (lock_and_wait_for_table_name(thd, table_list))