1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-19055 Failures with temporary tables and Aria

There was two separate problems:
- Aria pagecache didn't properly handle re-reading of blocks
  that have given errors before (this triggered an assert)
- temporary tables that where opened several times where
  not properly closed in ALTER, REPAIR or OPTIMIZE table

Other things
- Added a couple of asserts that will make it easier to
  find problems like this in the future.
This commit is contained in:
Michael Widenius
2019-06-17 17:50:08 +03:00
parent 2b660fb4c2
commit c8b5fa4afc
7 changed files with 101 additions and 14 deletions

View File

@ -9536,6 +9536,8 @@ do_continue:;
DEBUG_SYNC(thd, "alter_table_copy_after_lock_upgrade");
}
else
thd->close_unused_temporary_table_instances(table_list);
// It's now safe to take the table level lock.
if (lock_tables(thd, table_list, alter_ctx.tables_opened, 0))