mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
6ca4be9c03
INDEX_READ_MAP HAD NO MATCH If index_read_map is called for exact search and no matching records exists it will position the cursor on the next record, but still having the relative position to BTR_PCUR_ON. This will make a call for index_next to read yet another next record, instead of returning the record the cursor points to. Fixed by setting pcur->rel_pos = BTR_PCUR_BEFORE if an exact [prefix] search is done, but failed. Also avoids optimistic restoration if rel_pos != BTR_PCUR_ON, since btr_cur may be different than old_rec. rb#3324, approved by Marko and Jimmy
10 lines
303 B
Text
10 lines
303 B
Text
CREATE TABLE bug13510739 (c INTEGER NOT NULL, PRIMARY KEY (c)) ENGINE=INNODB;
|
|
INSERT INTO bug13510739 VALUES (1), (2), (3), (4);
|
|
DELETE FROM bug13510739 WHERE c=2;
|
|
HANDLER bug13510739 OPEN;
|
|
HANDLER bug13510739 READ `primary` = (2);
|
|
c
|
|
HANDLER bug13510739 READ `primary` NEXT;
|
|
c
|
|
3
|
|
DROP TABLE bug13510739;
|