diff options
author | unknown <evgen@moonbone.local> | 2005-06-22 21:07:28 +0400 |
---|---|---|
committer | unknown <evgen@moonbone.local> | 2005-06-22 21:07:28 +0400 |
commit | b14043a098473a55fabcb1efcc76db5193721c95 (patch) | |
tree | 80b1de27301fb45eb527dbbc8ffabe6d745eb676 /sql/sql_insert.cc | |
parent | 7ff07e6646dc38c5397c1d82a5ab21db8d852bd5 (diff) | |
parent | e210017d94f6c2cd98bcd86faa3fece7632ee1a9 (diff) | |
download | mariadb-git-b14043a098473a55fabcb1efcc76db5193721c95.tar.gz |
Fix for bug #10886 merge
mysql-test/r/insert_select.result:
Auto merged
mysql-test/t/insert_select.test:
Auto merged
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 9d805184b63..2ce81d8815e 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2119,9 +2119,12 @@ bool select_insert::send_data(List<Item> &values) } if (!(error= write_record(thd, table, &info))) { - if (table->triggers) + if (table->triggers || info.handle_duplicates == DUP_UPDATE) { /* + Restore fields of the record since it is possible that they were + changed by ON DUPLICATE KEY UPDATE clause. + If triggers exist then whey can modify some fields which were not originally touched by INSERT ... SELECT, so we have to restore their original values for the next row. |