diff options
author | Monty <monty@mariadb.org> | 2016-03-22 21:51:59 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2016-03-22 23:44:52 +0200 |
commit | 260dd476b057b759af7973550b560dc2f56e18fd (patch) | |
tree | ef55ede44a6f47171ca9f2a2121f377a6ea15832 /sql/table.h | |
parent | d0a47704c5d4360a3076c0e6b8abec186fac1f39 (diff) | |
download | mariadb-git-260dd476b057b759af7973550b560dc2f56e18fd.tar.gz |
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.
Diffstat (limited to 'sql/table.h')
-rw-r--r-- | sql/table.h | 50 |
1 files changed, 0 insertions, 50 deletions
diff --git a/sql/table.h b/sql/table.h index 5d27d8e97fd..46309d43ad6 100644 --- a/sql/table.h +++ b/sql/table.h @@ -322,55 +322,6 @@ enum enum_vcol_update_mode VCOL_UPDATE_ALL }; -class Filesort_info -{ - /// Buffer for sorting keys. - Filesort_buffer filesort_buffer; - -public: - IO_CACHE *io_cache; /* If sorted through filesort */ - uchar *buffpek; /* Buffer for buffpek structures */ - uint buffpek_len; /* Max number of buffpeks in the buffer */ - uchar *addon_buf; /* Pointer to a buffer if sorted with fields */ - size_t addon_length; /* Length of the buffer */ - struct st_sort_addon_field *addon_field; /* Pointer to the fields info */ - void (*unpack)(struct st_sort_addon_field *, uchar *, uchar *); /* To unpack back */ - uchar *record_pointers; /* If sorted in memory */ - ha_rows found_records; /* How many records in sort */ - - /** Sort filesort_buffer */ - void sort_buffer(Sort_param *param, uint count) - { filesort_buffer.sort_buffer(param, count); } - - /** - Accessors for Filesort_buffer (which @c). - */ - uchar *get_record_buffer(uint idx) - { return filesort_buffer.get_record_buffer(idx); } - - uchar **get_sort_keys() - { return filesort_buffer.get_sort_keys(); } - - uchar **alloc_sort_buffer(uint num_records, uint record_length) - { return filesort_buffer.alloc_sort_buffer(num_records, record_length); } - - bool check_sort_buffer_properties(uint num_records, uint record_length) - { - return filesort_buffer.check_sort_buffer_properties(num_records, - record_length); - } - - void free_sort_buffer() - { filesort_buffer.free_sort_buffer(); } - - void init_record_pointers() - { filesort_buffer.init_record_pointers(); } - - size_t sort_buffer_size() const - { return filesort_buffer.sort_buffer_size(); } -}; - - class Field_blob; class Table_triggers_list; @@ -1246,7 +1197,6 @@ public: REGINFO reginfo; /* field connections */ MEM_ROOT mem_root; GRANT_INFO grant; - Filesort_info sort; /* The arena which the items for expressions from the table definition are associated with. |