diff options
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 108a0c59665..0383984c036 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1,6 +1,6 @@ /* Copyright (c) 2000, 2016, Oracle and/or its affiliates. - Copyright (c) 2010, 2021, MariaDB Corporation + Copyright (c) 2010, 2022, MariaDB Corporation This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -991,7 +991,12 @@ bool mysql_insert(THD *thd, TABLE_LIST *table_list, goto values_loop_end; THD_STAGE_INFO(thd, stage_update); - thd->decide_logging_format_low(table); + + if (duplic == DUP_UPDATE) + { + restore_record(table,s->default_values); // Get empty record + thd->reconsider_logging_format_for_iodup(table); + } do { DBUG_PRINT("info", ("iteration %llu", iteration)); |