• Sergey Vojtovich's avatar
    Get rid of trx->read_view pointer juggling · ec32c050
    Sergey Vojtovich authored
    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.
    ec32c050
trx0trx.ic 7.6 KB