• Marko Mäkelä's avatar
    Fix regression from Bug#12845774 OPTIMISTIC INSERT/UPDATE USES WRONG · 3f249921
    Marko Mäkelä authored
    HEURISTICS FOR COMPRESSED PAGE SIZE
    
    The fix of Bug#12845774 was supposed to skip known-to-fail
    btr_cur_optimistic_insert() calls. There was only one such call, in
    btr_cur_pessimistic_update(). All other callers of
    btr_cur_pessimistic_insert() would release and reacquire the B-tree
    page latch before attempting the pessimistic insert. This would allow
    other threads to restructure the B-tree, allowing (and requiring) the
    insert to succeed as an optimistic (single-page) operation.
    
    Failure to attempt an optimistic insert before a pessimistic one would
    trigger an attempt to split an empty page.
    
    rb:1234 approved by Sunny Bains
    3f249921
ibuf0ibuf.c 99 KB