diff options
author | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2018-06-18 14:26:37 +0530 |
---|---|---|
committer | Thirunarayanan Balathandayuthapani <thiru@mariadb.com> | 2018-06-18 14:26:37 +0530 |
commit | eb77f8cf8de44ecaa7155afa7f55ece73b2b0497 (patch) | |
tree | 677da21929a2cef16addce6e39703248b741d188 /storage/innobase/lock | |
parent | 352c7e0dfaa0f121c5b35e1d9fafb9ec8897e768 (diff) | |
download | mariadb-git-eb77f8cf8de44ecaa7155afa7f55ece73b2b0497.tar.gz |
MDEV-16087 Inconsistent SELECT results when query cache is enabled
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
Diffstat (limited to 'storage/innobase/lock')
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 240510ffa59..ee0dc5a9000 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -4456,7 +4456,7 @@ lock_release( block the use of the MySQL query cache for all currently active transactions. */ - table->query_cache_inv_id = max_trx_id; + table->query_cache_inv_trx_id = max_trx_id; } lock_table_dequeue(lock); |