diff options
author | serg@serg.mylan <> | 2005-04-14 21:31:22 +0200 |
---|---|---|
committer | serg@serg.mylan <> | 2005-04-14 21:31:22 +0200 |
commit | 47578036626bbb271d339439682a2a6fd350dbfc (patch) | |
tree | d216238c0859c374d61a43945a50bc97418ca099 /sql/sql_delete.cc | |
parent | 3dbbb2fc471acefb0d194960d08d1d4eb6da779d (diff) | |
parent | 533e0551f20afb356936c2ecd966721c911d688e (diff) | |
download | mariadb-git-47578036626bbb271d339439682a2a6fd350dbfc.tar.gz |
merged
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 3 |
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)) |