diff options
author | Sergei Golubchik <serg@mariadb.org> | 2016-11-16 19:26:55 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2016-12-12 20:27:37 +0100 |
commit | b8f51c04d31e15570c53dc2e61258304ee49047a (patch) | |
tree | 87a4542733e885208c2297468232a479bd6d97d7 /sql/sql_insert.cc | |
parent | 54ab7db733d91b27ca2aec316cea4a3c2afa86a5 (diff) | |
download | mariadb-git-b8f51c04d31e15570c53dc2e61258304ee49047a.tar.gz |
bugfix: update-behind-insert
sql_insert.cc calls handler->ha_update_row() for
REPLACE and INSERT... ON DUPLICATE KEY UPDATE
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index aa5b5ac756b..955a66958fe 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1696,6 +1696,12 @@ int write_record(THD *thd, TABLE *table,COPY_INFO *info) HA_READ_KEY_EXACT)))) goto err; } + if (table->vfield) + { + table->move_fields(table->field, table->record[1], table->record[0]); + table->update_virtual_fields(VCOL_UPDATE_INDEXED); + table->move_fields(table->field, table->record[0], table->record[1]); + } if (info->handle_duplicates == DUP_UPDATE) { int res= 0; |