• Thirunarayanan Balathandayuthapani's avatar
    MDEV-16087 Inconsistent SELECT results when query cache is enabled · eb77f8cf
    Thirunarayanan Balathandayuthapani authored
    The following conditions will decide the query cache retrieval or
    storing inside innodb:
    
        (1) There should not be any locks on the table.
        (2) Some other trx shouldn't invalidated the cache before the
        transaction started.
        (3) Read view shouldn't exist. If exists then the view
        low_limit_id should be greater than or equal to the transaction that
        invalidates the cache for the particular table.
    
     For read-only transaction: should satisfy  the above (1) and (3)
     For read-write transaction: should satisfy the above (1), (2), (3).
    
     - Changed the variable from query_cache_inv_id to query_cache_inv_trx_id.
    
     - Moved the function row_search_check_if_query_cache_permitted from
        row0sel.h and made it as static function in ha_innodb.cc
    eb77f8cf
innodb_query_cache.test 1.01 KB