diff options
Diffstat (limited to 'storage/xtradb/row/row0vers.c')
-rw-r--r-- | storage/xtradb/row/row0vers.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/storage/xtradb/row/row0vers.c b/storage/xtradb/row/row0vers.c index b6d35363f08..d4fde0b939b 100644 --- a/storage/xtradb/row/row0vers.c +++ b/storage/xtradb/row/row0vers.c @@ -669,11 +669,15 @@ row_vers_build_for_semi_consistent_read( mutex_enter(&kernel_mutex); version_trx = trx_get_on_id(version_trx_id); + if (version_trx + && (version_trx->conc_state == TRX_COMMITTED_IN_MEMORY + || version_trx->conc_state == TRX_NOT_STARTED)) { + + version_trx = NULL; + } mutex_exit(&kernel_mutex); - if (!version_trx - || version_trx->conc_state == TRX_NOT_STARTED - || version_trx->conc_state == TRX_COMMITTED_IN_MEMORY) { + if (!version_trx) { /* We found a version that belongs to a committed transaction: return it. */ |