diff options
author | Martin Hansson <mhansson@mysql.com> | 2009-05-05 11:38:19 +0200 |
---|---|---|
committer | Martin Hansson <mhansson@mysql.com> | 2009-05-05 11:38:19 +0200 |
commit | 2afccc1b31a0b254d95dd382f0b31d56a8c41093 (patch) | |
tree | 432a1d7e25b477fe9f283a886845c37bd86cfeb5 /sql/sql_base.cc | |
parent | c27566aec5529beacd7ee27be4433827d8fa1755 (diff) | |
download | mariadb-git-2afccc1b31a0b254d95dd382f0b31d56a8c41093.tar.gz |
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.
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 0dc29f7e3c2..d4d813d0fbd 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -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) |