Get rid of trx->read_view pointer juggling
trx->read_view|= 1 was done in a silly attempt to fix race condition where trx->read_view was closed without trx_sys.mutex lock by read-only trasnactions. This just made the problem less likely to happen. In fact there was race condition in const version of trx_get_read_view(): pointer may change to garbage any moment after MVCC::is_view_active(trx->read_view) check and before this function returns. This patch doesn't fix this race condition, but rather makes it's consequences less destructive.
Showing
Please register or sign in to comment