diff options
author | unknown <monty@mashka.mysql.fi> | 2003-03-16 16:28:30 +0200 |
---|---|---|
committer | unknown <monty@mashka.mysql.fi> | 2003-03-16 16:28:30 +0200 |
commit | 9681f4a8cd242e3828f211e0bed5235e70ee5f4e (patch) | |
tree | c05688514a8bfc597bdeb7bbae3718151a59fd89 /sql/sql_update.cc | |
parent | 11117565a3682ea800d1b988775cd05ef78b4fb8 (diff) | |
download | mariadb-git-9681f4a8cd242e3828f211e0bed5235e70ee5f4e.tar.gz |
Write binlog before commit when doing INSERT ... SELECT
mysql-test/r/create.result:
After merge fix
sql/sql_insert.cc:
Write binlog before commit
sql/sql_update.cc:
Added comment
Diffstat (limited to 'sql/sql_update.cc')
-rw-r--r-- | sql/sql_update.cc | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/sql/sql_update.cc b/sql/sql_update.cc index adb60adb7d6..d8842855093 100644 --- a/sql/sql_update.cc +++ b/sql/sql_update.cc @@ -618,7 +618,18 @@ bool multi_update::send_data(List<Item> ¬_used_values) for (cur_table= update_tables; cur_table ; cur_table= cur_table->next) { TABLE *table= cur_table->table; - /* Check if we are using outer join and we didn't find the row */ + /* + Check if we are using outer join and we didn't find the row + or if we have already updated this row in the previous call to this + function. + + The same row may be presented here several times in a join of type + UPDATE t1 FROM t1,t2 SET t1.a=t2.a + + In this case we will do the update for the first found row combination. + The join algorithm guarantees that we will not find the a row in + t1 several times. + */ if (table->status & (STATUS_NULL_ROW | STATUS_UPDATED)) continue; |