mirror of
https://github.com/MariaDB/server.git
synced 2025-12-05 20:05:44 +01:00
open_temporary_table[s] defaulted to searching only local temporary tables (Tmp_table_kind::TMP). When in function, a temporary table was "carefully re-opened": it was closed and then opened again, with open_temporary_table. This resulted in "table not found". The correct key in most cases is Tmp_table_kind::ANY. In some cases it should be Tmp_table_kind::TMP: * When operation is not supported for GTT (ANALYZE/REPAIR) * When a global handle should be opened (CREATE VIEW) * If it's a re-open Apart from this bug, it caused a global temporary table to be always opened through open_tables, meaning that tdc was queried first. This means that the earlier code never relied on pre-opening temporary tables. This means that all the commands that follow the default open_temporary_tables path in mysql_execute_command (the standard temporary tables pre-opening) should be able to handle child GTT share. This wasn't so for TRUNCATE, hence the changes in sql_truncate.cc. Also, this broke the lookup order: first a local temporary table should be looked up. If it doesn't exist, only then a global temporary table should be looked up. To fix the latter -- push back global temporary tables' local shares and push front local temporary tables. To support push_front, All_tmp_tables_list declaration is changed. It should use I_P_List_fast_push_back adapter, which adds T **m_last to the list body. |
||
|---|---|---|
| .. | ||
| extension | ||
| include | ||
| r | ||
| t | ||
| disabled.def | ||
| my.cnf | ||
| README | ||
| rpl_1slave_base.cnf | ||
How to run. =========== ./mysql-test-run.pl --suite=rpl --mysqld=--binlog-format=mixed