• Marko Mäkelä's avatar
    MDEV-17545 Predicate lock for SPATIAL INDEX should lock non-matching record · 7e9728a9
    Marko Mäkelä authored
    rtr_pcur_getnext_from_path(): Remove a bogus condition.
    The predicate lock should be acquired also on no match,
    to ensure that the locking read will be repeatable.
    
    This is based on the following fix in MySQL 5.7.24:
    
    commit 365111c590082984dbae42e1d1da28ac3f7fb5bd
    Author: Jimmy Yang <jimmy.yang@oracle.com>
    Date:   Wed Jun 6 16:23:00 2018 -0700
    
        Fix Bug 27577612 - CONCURRENT SERIALIZABLE TRANSACTIONS CAN INSERT INTO
        AN AREA SELECTED FOR UPDATE
        Backport fix to mysql-5.7
    Reviewed-by: default avatarAllen Lai <allen.lai@oracle.com>
    
    No test case is added, because the MySQL 5.7 test case would pass
    even when the fix is not present. We would need a test case that
    only causes a locking conflict on the spatial index.
    7e9728a9
gis0sea.cc 54 KB