mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge 10.5 into 10.6
This commit is contained in:
@ -255,10 +255,12 @@ class Sort_keys :public Sql_alloc,
|
||||
{
|
||||
public:
|
||||
Sort_keys(SORT_FIELD* arr, size_t count):
|
||||
Sort_keys_array(arr, count),
|
||||
m_using_packed_sortkeys(false),
|
||||
size_of_packable_fields(0),
|
||||
sort_length(0)
|
||||
Sort_keys_array(arr, count),
|
||||
m_using_packed_sortkeys(false),
|
||||
size_of_packable_fields(0),
|
||||
sort_length_with_original_values(0),
|
||||
sort_length_with_memcmp_values(0),
|
||||
parameters_computed(false)
|
||||
{
|
||||
DBUG_ASSERT(!is_null());
|
||||
}
|
||||
@ -280,14 +282,24 @@ public:
|
||||
return size_of_packable_fields;
|
||||
}
|
||||
|
||||
void set_sort_length(uint len)
|
||||
void set_sort_length_with_original_values(uint len)
|
||||
{
|
||||
sort_length= len;
|
||||
sort_length_with_original_values= len;
|
||||
}
|
||||
|
||||
uint get_sort_length()
|
||||
uint get_sort_length_with_original_values()
|
||||
{
|
||||
return sort_length;
|
||||
return sort_length_with_original_values;
|
||||
}
|
||||
|
||||
void set_sort_length_with_memcmp_values(uint len)
|
||||
{
|
||||
sort_length_with_memcmp_values= len;
|
||||
}
|
||||
|
||||
uint get_sort_length_with_memcmp_values()
|
||||
{
|
||||
return sort_length_with_memcmp_values;
|
||||
}
|
||||
|
||||
static void store_sortkey_length(uchar *p, uint sz)
|
||||
@ -307,9 +319,12 @@ public:
|
||||
|
||||
void increment_original_sort_length(uint len)
|
||||
{
|
||||
sort_length+= len;
|
||||
sort_length_with_original_values+= len;
|
||||
}
|
||||
|
||||
bool is_parameters_computed() { return parameters_computed; }
|
||||
void set_parameters_computed(bool val) { parameters_computed= val; }
|
||||
|
||||
static const uint size_of_length_field= 4;
|
||||
|
||||
private:
|
||||
@ -317,10 +332,21 @@ private:
|
||||
uint size_of_packable_fields; // Total length bytes for packable columns
|
||||
|
||||
/*
|
||||
The length that would be needed if we stored non-packed mem-comparable
|
||||
images of fields?
|
||||
The sort length for all the keyparts storing the original values
|
||||
*/
|
||||
uint sort_length;
|
||||
uint sort_length_with_original_values;
|
||||
|
||||
/*
|
||||
The sort length for all the keyparts storing the mem-comparable images
|
||||
*/
|
||||
uint sort_length_with_memcmp_values;
|
||||
|
||||
/*
|
||||
TRUE parameters(like sort_length_* , size_of_packable_field)
|
||||
are computed
|
||||
FALSE otherwise.
|
||||
*/
|
||||
bool parameters_computed;
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user