diff options
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r-- | sql/sql_base.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 32e42daf7c4..0ac7a112161 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -1031,6 +1031,12 @@ retry: if (res->table && (res->table == table->table)) continue; + /* Skip if table is tmp table */ + if (check_flag & CHECK_DUP_SKIP_TEMP_TABLE && + res->table && res->table->s->tmp_table != NO_TMP_TABLE) + { + continue; + } if (check_flag & CHECK_DUP_FOR_CREATE) DBUG_RETURN(res); |