• Aleksey Midenkov's avatar
    MDEV-20301 InnoDB's MVCC has O(N^2) behaviors · 2347ffd8
    Aleksey Midenkov authored
    If there're multiple row versions in InnoDB, reading one row from PK
    may have O(N) complexity and reading from secondary keys may have
    O(N^2) complexity.
    
    The problem occurs when there are many pending versions of the same
    row, meaning that the primary key is the same, but a secondary key is
    different.  The slowdown occurs when the secondary index is
    traversed. This patch creates a helper class for the function
    row_sel_get_clust_rec_for_mysql() which can remember and re-use
    cached_clust_rec & cached_old_vers so that rec_get_offsets() does not
    need to be called over and over for the clustered record.
    
    Corrections by Kevin Lewis <kevin.lewis@oracle.com>
    
    MDEV-20341 Unstable innodb.innodb_bug14704286
    
    Removed test that tested the ability of interrupting long query which
    is not long anymore.
    2347ffd8
innodb_bug84958.result 1.77 KB