From 9681f4a8cd242e3828f211e0bed5235e70ee5f4e Mon Sep 17 00:00:00 2001 From: unknown Date: Sun, 16 Mar 2003 16:28:30 +0200 Subject: 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 --- sql/sql_update.cc | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'sql/sql_update.cc') 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 ¬_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; -- cgit v1.2.1