summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-05-18 15:04:50 +0200
committerSergei Golubchik <serg@mariadb.org>2022-05-19 14:07:55 +0200
commitbf2bdd1a1a112c3bbdf53da7a663a59fafa62c7d (patch)
tree615e56754c44190551cea0381494b675108b6ae9 /sql/sql_insert.cc
parent5dba54bfef31d91c082362065cd091086e20ee9a (diff)
parentb7ffccf49b5563d3078359bddf438c9d20674513 (diff)
downloadmariadb-git-bf2bdd1a1a112c3bbdf53da7a663a59fafa62c7d.tar.gz
Merge branch '10.8' into 10.9mariadb-10.9.1
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc9
1 files changed, 7 insertions, 2 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index e498daca83c..d9d22dbe514 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
+ 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
@@ -995,7 +995,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);
+ }
fix_rownum_pointers(thd, thd->lex->current_select, &info.accepted_rows);
if (returning)
fix_rownum_pointers(thd, thd->lex->returning(), &info.accepted_rows);