diff options
author | unknown <gluh@eagle.(none)> | 2007-02-02 10:25:45 +0400 |
---|---|---|
committer | unknown <gluh@eagle.(none)> | 2007-02-02 10:25:45 +0400 |
commit | ed0e4a968a4dfba3788bc270c73620f3e498dca5 (patch) | |
tree | a499a38ce070d521a711fde73af6cb95e3713dc3 /sql/sql_delete.cc | |
parent | 4ebef0520629873253ed5007aba1a01c91d7f8fd (diff) | |
parent | a30830460794651c0e9fc5ec4779cf77680514ee (diff) | |
download | mariadb-git-ed0e4a968a4dfba3788bc270c73620f3e498dca5.tar.gz |
Merge mysql.com:/home/gluh/MySQL/Merge/5.0-opt
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
mysql-test/r/distinct.result:
Auto merged
mysql-test/r/join_nested.result:
Auto merged
mysql-test/r/null_key.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/subselect3.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_sum.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/func_time.result:
manual merge
mysql-test/r/information_schema.result:
manual merge
mysql-test/t/func_time.test:
manual merge
mysql-test/t/information_schema.test:
manual merge
sql/opt_range.cc:
manual merge
sql/sql_delete.cc:
manual merge
sql/sql_lex.h:
manual merge
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index e3405d9c9d9..7daf3be1578 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -69,14 +69,14 @@ bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, Test if the user wants to delete all rows and deletion doesn't have any side-effects (because of triggers), so we can use optimized handler::delete_all_rows() method. - - If row-based replication is used, we also delete the table row by - row. + We implement fast TRUNCATE for InnoDB even if triggers are present. + TRUNCATE ignores triggers. */ if (!using_limit && const_cond && (!conds || conds->val_int()) && !(specialflag & (SPECIAL_NO_NEW_FUNC | SPECIAL_SAFE_MODE)) && - !(table->triggers && table->triggers->has_delete_triggers()) && - !thd->current_stmt_binlog_row_based) + (thd->lex->sql_command == SQLCOM_TRUNCATE || + !(table->triggers && table->triggers->has_delete_triggers())) + ) { /* Update the table->file->stats.records number */ table->file->info(HA_STATUS_VARIABLE | HA_STATUS_NO_LOCK); |