Bug #9517 Condition pushdown to storage engine does not work for update/delete
Submitted: 31 Mar 2005 12:15 Modified: 7 Apr 2005 10:53
Reporter: Martin Skold
Status: Closed
Category:Server: Cluster Severity:S3 (Non-critical)
Version:5.0.3 OS:
Assigned to: Martin Skold Target Version:

[31 Mar 2005 12:15] Martin Skold
Description:
update <table> ... where <cond>
delete from <table> where <cond>
where explain select * from <table> where <cond>
says condition can be pushed are discarded before
scan for delete and update

This is only an optimization and the user will not see anything,
but large deletes and updates will not be as fast as they could be

How to repeat:
set engine_condition_pushdown=on
Do debug trace for and update or delete
with pushable condition

Suggested fix:
The calls to handler::reset() either has to be removed 
if possible or the condition must be pushed after reset call.
[4 Apr 2005 21:38] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23633
[5 Apr 2005 11:08] Martin Skold
Adding cond_push to init_read_record
[5 Apr 2005 15:57] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/23670