• Aleksey Midenkov's avatar
    MDEV-17573 Assertion in federatedx on multi-update · f99abb45
    Aleksey Midenkov authored
    Cause: shared federatedx_io cannot store table-specific data.
    
    Fix: move current row reference `federatedx_io_mysql::current` to
    ha_federatedx.
    
    FederatedX connection (represented by federatedx_io) is stored into
    federatedx_txn::txn_list of per-server connections (see
    federatedx_txn::acquire()). federatedx_txn object is stored into THD
    (see ha_federatedx::external_lock()). When multiple handlers acquire
    FederatedX connection they get single federatedx_io instance. Multiple
    handlers do their operation via federatedx_io_mysql::mark_position()
    and federatedx_io_mysql::fetch_row() in arbitrarty manner. They access
    the same federatedx_io_mysql instance and same MYSQL_ROWS *current
    pointer, so one handler disrupts the work of the other.
    
    Related to "MDEV-14551 Can't find record in table on multi-table update
    with ORDER BY".
    f99abb45
federatedx_io_mysql.cc 16.4 KB