summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2022-05-07 11:48:15 +0200
committerSergei Golubchik <serg@mariadb.org>2022-05-07 11:48:15 +0200
commit6f741eb6e4b88d17c48e43a48faf8e18ed5f33d8 (patch)
tree96ad1c019a99ed271f588471b710887aca42d297 /sql/sql_insert.cc
parent0db27eff27dba9a2bf12653a20e503e029397b9a (diff)
parenta5dc12eefd4bea1c3f77d02c55d0d459b4ae0566 (diff)
downloadmariadb-git-6f741eb6e4b88d17c48e43a48faf8e18ed5f33d8.tar.gz
Merge branch '10.2' into 10.3
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 a9f5c01ed41..38551867902 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, 2019, 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
@@ -945,6 +945,12 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
}
THD_STAGE_INFO(thd, stage_update);
+
+ 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));
@@ -1057,7 +1063,6 @@ bool mysql_insert(THD *thd,TABLE_LIST *table_list,
break;
}
- thd->decide_logging_format_low(table);
#ifndef EMBEDDED_LIBRARY
if (lock_type == TL_WRITE_DELAYED)
{