summaryrefslogtreecommitdiff
path: root/sql/temporary_tables.cc
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2018-12-16 18:32:05 +0100
committerSergei Golubchik <serg@mariadb.org>2018-12-20 08:06:55 +0100
commit2027841d5bc7e22ebb24a5a7538d0fd057dd8352 (patch)
treee235abdcbc3390142f8326a337942b7057808c38 /sql/temporary_tables.cc
parentd13302ff6013acee9ac5fb6946d0c91e2f303224 (diff)
downloadmariadb-git-2027841d5bc7e22ebb24a5a7538d0fd057dd8352.tar.gz
MDEV-16110 ALTER with ALGORITHM=INPLACE breaks temporary table with virtual columns
Part two, temporary tables. Make temporary tables respect TABLE::m_needs_reopen. See also 77cd754229b
Diffstat (limited to 'sql/temporary_tables.cc')
-rw-r--r--sql/temporary_tables.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/temporary_tables.cc b/sql/temporary_tables.cc
index a4ece127f96..29c9910f332 100644
--- a/sql/temporary_tables.cc
+++ b/sql/temporary_tables.cc
@@ -1042,6 +1042,13 @@ TABLE *THD::find_temporary_table(const char *key, uint key_length,
case TMP_TABLE_ANY: found= true; break;
}
}
+ if (table && unlikely(table->m_needs_reopen))
+ {
+ share->all_tmp_tables.remove(table);
+ free_temporary_table(table);
+ it.rewind();
+ continue;
+ }
result= table;
break;
}