bugfix: multi-UPDATE, vcols, const tables
multi-update was setting up read_set/vcol_set in multi_update::initialize_tables() that is invoked after the optimizer (JOIN::optimize_inner()). But some rows - if they're from const tables - will be read already in the optimizer, and these rows will not have all necessary column/vcol values. * multi_update::initialize_tables() uses results from the optimizer and cannot be moved to be called earlier. * multi_update::prepare() is called before the optimizer, but it cannot set up read_set/vcol_set, because the optimizer might reset them (see SELECT_LEX::update_used_tables()). As a fix I've added a new method, select_result::prepare_to_read_rows(), it's called from inside the optimizer just before make_join_statistics().
Showing
Please register or sign in to comment