Ok, I've verified the bug. Here is a very simple test case:
use test;
drop table if exists foo;
create table foo ( word char(25) binary not null primary key)
delay_key_write = 1;
load data infile '/usr/dict/words' into table foo;
select word from foo where word = 'a' or word = 'b';
delete from foo where word < 'l';
check table foo;
Monty and I will have a race on who can produce a patch faster. He knows the
code better, but I am going to have a head start :-)
--
Sasha Pachev
+------------------------------------------------------------------+
| /*/\*\/\*\ /*/ \*\ /*/ \*\ |*| Sasha Pachev |
| /*/ /*/ /*/ \*\_ |*| |*||*| mailto:sasha@stripped |
| /*/ /*/ /*/\*\/*/ \*\|*| |*||*| Provo, Utah, USA |
| /*/ /*/ /*/\*\_/*/ \*\_/*/ |*|____ |
| ^^^^^^^^^^^^/*/^^^^^^^^^^^\*\^^^^^^^^^^^ |
| /*/ \*\ Developers Team |
+------------------------------------------------------------------+