summaryrefslogtreecommitdiff
path: root/sql/sql_class.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_class.cc')
-rw-r--r--sql/sql_class.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/sql_class.cc b/sql/sql_class.cc
index 0f629a2c995..2a42de1a11f 100644
--- a/sql/sql_class.cc
+++ b/sql/sql_class.cc
@@ -5575,7 +5575,8 @@ has_write_table_with_auto_increment_and_select(TABLE_LIST *tables)
for(TABLE_LIST *table= tables; table; table= table->next_global)
{
if (!table->placeholder() &&
- (table->lock_type <= TL_READ_NO_INSERT))
+ table->lock_type <= TL_READ_NO_INSERT &&
+ table->prelocking_placeholder != TABLE_LIST::FK)
{
has_select= true;
break;