summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2023-02-15 16:30:53 +0100
committerSergei Golubchik <serg@mariadb.org>2023-02-15 16:30:53 +0100
commitb45ed284a69cdbffac61bdcf74bf86fa7b7391a4 (patch)
treede26ce8e0a5aa40889e889d758e3a3a98b9f71a8 /sql/sql_insert.cc
parentcc182aca9352fb7efde0deb0a83844e1d5f0c64c (diff)
parentcafba8761af55ae16cc69c9b53a341340a845b36 (diff)
downloadmariadb-git-bb-11.0-all-builders.tar.gz
Merge branch '10.11' into 11.0bb-11.0-all-builders
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r--sql/sql_insert.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 5d713d2176e..6e042d25805 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -4038,7 +4038,8 @@ select_insert::prepare(List<Item> &values, SELECT_LEX_UNIT *u)
lex->current_select->join->select_options|= OPTION_BUFFER_RESULT;
}
else if (!(lex->current_select->options & OPTION_BUFFER_RESULT) &&
- thd->locked_tables_mode <= LTM_LOCK_TABLES)
+ thd->locked_tables_mode <= LTM_LOCK_TABLES &&
+ !table->s->long_unique_table)
{
/*
We must not yet prepare the result table if it is the same as one of the