mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-22303: Incorrect ordering with REGEXP_REPLACE and OFFSET/LIMIT
For character sets and collation where character to weight mapping > 1, there we need to make sure while creating a sort key, a temporary buffer is created to store the value of the item by val_str function and then copy that value back to the sort buffer. In this case when using a priority queue Sort_param::tmp_buffer was not allocated. Minor refactoring: Changed Sort_param::tmp_buffer from char* to String
This commit is contained in:
@ -536,7 +536,7 @@ public:
|
||||
|
||||
uchar *unique_buff;
|
||||
bool not_killable;
|
||||
char* tmp_buffer;
|
||||
String tmp_buffer;
|
||||
// The fields below are used only by Unique class.
|
||||
qsort2_cmp compare;
|
||||
BUFFPEK_COMPARE_CONTEXT cmp_context;
|
||||
@ -544,6 +544,7 @@ public:
|
||||
Sort_param()
|
||||
{
|
||||
memset(reinterpret_cast<void*>(this), 0, sizeof(*this));
|
||||
tmp_buffer.set_thread_specific();
|
||||
}
|
||||
void init_for_filesort(uint sortlen, TABLE *table,
|
||||
ha_rows maxrows, bool sort_positions);
|
||||
|
Reference in New Issue
Block a user