1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Removed TABLE->sort to make it possible to have multiple active calls to

filesort and init_read_record() for the same table.
This will simplify code for WINDOW FUNCTIONS (MDEV-6115)

- Filesort_info renamed to SORT_INFO and moved to filesort.h
- filesort now returns SORT_INFO
- init_read_record() now takes a SORT_INFO parameter.
- unique declaration is moved to uniques.h
- subselect caching of buffers is now more explicit than before
- filesort_buffer is now reusable even if rec_length has changed.
- filsort_free_buffers() and free_io_cache() calls are removed
- Remove one malloc() when using get_addon_fields()

Other things:
- Added --debug-assert-on-not-freed-memory option to make it easier to
  debug some not-freed-memory issues.
This commit is contained in:
Monty
2016-03-22 21:51:59 +02:00
parent d0a47704c5
commit 260dd476b0
40 changed files with 665 additions and 584 deletions

View File

@ -1706,8 +1706,9 @@ THD::~THD()
if (status_var.local_memory_used != 0)
{
DBUG_PRINT("error", ("memory_used: %lld", status_var.local_memory_used));
SAFEMALLOC_REPORT_MEMORY(my_thread_dbug_id());
DBUG_ASSERT(status_var.local_memory_used == 0);
SAFEMALLOC_REPORT_MEMORY(thread_id);
DBUG_ASSERT(status_var.local_memory_used == 0 ||
!debug_assert_on_not_freed_memory);
}
set_current_thd(orig_thd == this ? 0 : orig_thd);