summaryrefslogtreecommitdiff
path: root/sql/sql_insert.cc
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2023-01-27 13:54:14 +0100
committerOleksandr Byelkin <sanja@mariadb.com>2023-01-27 13:54:14 +0100
commit7fa02f5c0ba4c3060cbff8cf9d1e472d268f3dad (patch)
treeb16c43d92abcb99316b2de31770c567e1c70bfa6 /sql/sql_insert.cc
parent672cdcbb93a7355c715f3e232d4c5852209f30b5 (diff)
parentc8f9bb2718c4ed7b464504c54df961bfeb2cccca (diff)
downloadmariadb-git-7fa02f5c0ba4c3060cbff8cf9d1e472d268f3dad.tar.gz
Merge branch '10.4' into 10.5
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 d9796fb4380..132934773f9 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -3962,7 +3962,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