diff options
author | unknown <cmiller@zippy.cornsilk.net> | 2006-11-02 17:27:42 -0500 |
---|---|---|
committer | unknown <cmiller@zippy.cornsilk.net> | 2006-11-02 17:27:42 -0500 |
commit | e1a722b2d3a428c650bf08527b8c9ed9bdbd3e08 (patch) | |
tree | 891a17ee42daa1b5e18cf363d182b94fef6aedf3 /sql/sql_delete.cc | |
parent | 24232ff032786d730d022950c4ccb40d422c7ce9 (diff) | |
parent | 2772d9e182a4c6832ed903cb143d25861292e786 (diff) | |
download | mariadb-git-e1a722b2d3a428c650bf08527b8c9ed9bdbd3e08.tar.gz |
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into zippy.cornsilk.net:/home/cmiller/work/mysql/mysql-4.1-maint
configure.in:
Auto merged
mysql-test/t/ps.test:
Auto merged
sql/handler.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/table.cc:
Auto merged
tests/mysql_client_test.c:
Auto merged
myisam/sort.c:
Manual merge.
mysql-test/r/innodb_mysql.result:
Manual merge.
mysql-test/t/innodb_mysql.test:
Manual merge.
mysys/mf_iocache.c:
Manual merge.
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r-- | sql/sql_delete.cc | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc index 1a20b9b7d91..1b00539ed71 100644 --- a/sql/sql_delete.cc +++ b/sql/sql_delete.cc @@ -84,6 +84,14 @@ int mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds, /* Handler didn't support fast delete; Delete rows one by one */ } + if (conds) + { + Item::cond_result result; + conds= remove_eq_conds(thd, conds, &result); + if (result == Item::COND_FALSE) // Impossible where + limit= 0; + } + table->used_keys.clear_all(); table->quick_keys.clear_all(); // Can't use 'only index' select=make_select(table,0,0,conds,&error); |