Commit graph

3 commits

Author SHA1 Message Date
Monty
ec38c7e60b MDEV-10219 rpl.rpl_parallel_temptable failed in buildbot: Assertion `!table || !table->in_use || table->in_use == _current_thd()' failed
Problem was that table->in_use was not properly set when dropping a temporary for the slave.
2016-06-22 22:04:55 +03:00
Nirbhay Choubey
e2087c6e8d MDEV-5535: Cannot reopen temporary table
Temporary table being created by outer statement
should not be visible to inner statement. And if
inner statement creates a table with same name.
The whole statement should fail with
ER_TABLE_EXISTS_ERROR.

Implemented by temporarily de-linking the TABLE_SHARE
being created by outer statement so that it remains
hidden to the inner statement.
2016-06-10 18:39:43 -04:00
Nirbhay Choubey
7305be2f7e MDEV-5535: Cannot reopen temporary table
mysqld maintains a list of TABLE objects for all temporary
tables created within a session in THD. Here each table is
represented by a TABLE object.

A query referencing a particular temporary table for more
than once, however, failed with ER_CANT_REOPEN_TABLE error
because a TABLE_SHARE was allocate together with the TABLE,
so temporary tables always had only one TABLE per TABLE_SHARE.

This patch lift this restriction by separating TABLE and
TABLE_SHARE objects and storing TABLE_SHAREs for temporary
tables in a list in THD, and TABLEs in a list within their
respective TABLE_SHAREs.
2016-06-10 18:39:43 -04:00