txm: fix a bug with wrong space:count() result
Internally space's indexes can containt dirty tuples that are invisible for user. That's why there's special adjustment in space:count() that substracts number of invisible tuple in the space. By a mistake that check thought that all prepared statements are visible, which is wrong for autocommit reads, like standalone space:count() without explicit transaction. Fix it by using common for all reads practice: ignore prepared statements if current transaction is NULL. Closes #6421 NO_DOC=bugfix
Showing
- changelogs/unreleased/gh-6421-wrong-count.md 3 additions, 0 deletionschangelogs/unreleased/gh-6421-wrong-count.md
- src/box/memtx_tx.c 2 additions, 1 deletionsrc/box/memtx_tx.c
- test/box-luatest/gh_6421_mvcc_wrong_index_count_test.lua 81 additions, 0 deletionstest/box-luatest/gh_6421_mvcc_wrong_index_count_test.lua
Loading
Please register or sign in to comment