MDEV-10092: Server crashes in in ha_heap::rnd_pos / Table_read_cursor::get_next
The bug was caused by several issues. 2 problems in seek_io_cache. Due to wrong offsets used, we would end up seeking way too much (first change), or over the intended seek point (second change). Fixing it requires correctly detecting available data in buffer (first change), and not using "IO_SIZE alligned" reads. The second is needed because _my_b_cache_read adjusts the pos_in_file itself based on read_pos and read_end. Pretending buffer is empty when we want to force a read will aleviate this problem. Secondly, the big-table cursors didn't repect the interface definitions of always returning the rownumber that Table_read_cursor::fetch() would activate. At the same time, next(), prev() and move_to() should not perform any row activation.
Showing
This diff is collapsed.
This diff is collapsed.
Please register or sign in to comment