1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Bug#43580: Issue with Innodb on multi-table update

Certain multi-updates gave different results on InnoDB from
to MyISAM, due to on-the-fly updates being used on the former and
the update order matters.
Fixed by turning off on-the-fly updates when update order 
dependencies are present.
This commit is contained in:
Martin Hansson
2009-05-05 11:38:19 +02:00
parent c27566aec5
commit 2afccc1b31
5 changed files with 104 additions and 8 deletions

View File

@ -5585,6 +5585,13 @@ static void update_field_dependencies(THD *thd, Field *field, TABLE *table)
other_bitmap= table->read_set;
}
/*
The test-and-set mechanism in the bitmap is not reliable during
multi-UPDATE statements under MARK_COLUMNS_READ mode
(thd->mark_used_columns == MARK_COLUMNS_READ), as this bitmap contains
only those columns that are used in the SET clause. I.e they are being
set here. See multi_update::prepare()
*/
if (bitmap_fast_test_and_set(current_bitmap, field->field_index))
{
if (thd->mark_used_columns == MARK_COLUMNS_WRITE)