mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug #25798.
This bug may manifest itself not only with the queries for which the index-merge access method is chosen. It also may display itself for queries with DISTINCT. The bug was in how the Unique::get method used the merge_buffers function. To compare elements in the the queue employed by merge_buffers() it must use the buffpek_compare function rather than the function for binary comparison.
This commit is contained in:
@ -50,6 +50,12 @@ typedef struct st_buffpek { /* Struktur om sorteringsbuffrarna */
|
||||
ulong max_keys; /* Max keys in buffert */
|
||||
} BUFFPEK;
|
||||
|
||||
struct BUFFPEK_COMPARE_CONTEXT
|
||||
{
|
||||
qsort_cmp2 key_compare;
|
||||
void *key_compare_arg;
|
||||
};
|
||||
|
||||
typedef struct st_sort_param {
|
||||
uint rec_length; /* Length of sorted records */
|
||||
uint sort_length; /* Length of sorted columns */
|
||||
@ -65,6 +71,9 @@ typedef struct st_sort_param {
|
||||
uchar *unique_buff;
|
||||
bool not_killable;
|
||||
char* tmp_buffer;
|
||||
/* The fields below are used only by Unique class */
|
||||
qsort2_cmp compare;
|
||||
BUFFPEK_COMPARE_CONTEXT cmp_context;
|
||||
} SORTPARAM;
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user