Commit 59bbe873 authored by Sergei Golubchik's avatar Sergei Golubchik

Revert "MDEV-24033: SIGSEGV in __memcmp_avx2_movbe from queue_insert | SIGSEGV...

Revert "MDEV-24033: SIGSEGV in __memcmp_avx2_movbe from queue_insert | SIGSEGV in __memcmp_avx2_movbe from native_compare"

This reverts commit 5a0c34e4.
but keeps the test case
parent f99abb45
...@@ -1339,8 +1339,6 @@ class Field: public Value_source ...@@ -1339,8 +1339,6 @@ class Field: public Value_source
virtual uint max_packed_col_length(uint max_length) virtual uint max_packed_col_length(uint max_length)
{ return max_length;} { return max_length;}
virtual bool is_packable() const { return false; }
uint offset(uchar *record) const uint offset(uchar *record) const
{ {
return (uint) (ptr - record); return (uint) (ptr - record);
...@@ -1829,7 +1827,6 @@ class Field_longstr :public Field_str ...@@ -1829,7 +1827,6 @@ class Field_longstr :public Field_str
bool can_optimize_range(const Item_bool_func *cond, bool can_optimize_range(const Item_bool_func *cond,
const Item *item, const Item *item,
bool is_eq_func) const; bool is_eq_func) const;
bool is_packable() const { return true; }
}; };
/* base class for float and double and decimal (old one) */ /* base class for float and double and decimal (old one) */
......
...@@ -1971,14 +1971,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length, ...@@ -1971,14 +1971,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
if (sortorder->field) if (sortorder->field)
{ {
CHARSET_INFO *cs= sortorder->field->sort_charset(); CHARSET_INFO *cs= sortorder->field->sort_charset();
sortorder->type= sortorder->field->is_packable() ?
SORT_FIELD_ATTR::VARIABLE_SIZE :
SORT_FIELD_ATTR::FIXED_SIZE;
sortorder->length= sortorder->field->sort_length(); sortorder->length= sortorder->field->sort_length();
if (sortorder->is_variable_sized())
set_if_smaller(sortorder->length, thd->variables.max_sort_length);
if (use_strnxfrm((cs=sortorder->field->sort_charset()))) if (use_strnxfrm((cs=sortorder->field->sort_charset())))
{ {
*multi_byte_charset= true; *multi_byte_charset= true;
...@@ -1989,10 +1982,6 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length, ...@@ -1989,10 +1982,6 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
} }
else else
{ {
sortorder->type= sortorder->item->type_handler()->is_packable() ?
SORT_FIELD_ATTR::VARIABLE_SIZE :
SORT_FIELD_ATTR::FIXED_SIZE;
sortorder->item->sortlength(thd, sortorder->item, sortorder); sortorder->item->sortlength(thd, sortorder->item, sortorder);
if (use_strnxfrm(sortorder->item->collation.collation)) if (use_strnxfrm(sortorder->item->collation.collation))
{ {
...@@ -2001,8 +1990,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length, ...@@ -2001,8 +1990,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length,
if (sortorder->item->maybe_null) if (sortorder->item->maybe_null)
length++; // Place for NULL marker length++; // Place for NULL marker
} }
if (sortorder->is_variable_sized()) set_if_smaller(sortorder->length, thd->variables.max_sort_length);
set_if_smaller(sortorder->length, thd->variables.max_sort_length);
length+=sortorder->length; length+=sortorder->length;
} }
sortorder->field= (Field*) 0; // end marker sortorder->field= (Field*) 0; // end marker
......
...@@ -5456,8 +5456,6 @@ struct SORT_FIELD_ATTR ...@@ -5456,8 +5456,6 @@ struct SORT_FIELD_ATTR
{ {
uint length; /* Length of sort field */ uint length; /* Length of sort field */
uint suffix_length; /* Length suffix (0-4) */ uint suffix_length; /* Length suffix (0-4) */
enum Type { FIXED_SIZE, VARIABLE_SIZE } type;
bool is_variable_sized() { return type == VARIABLE_SIZE; }
}; };
......
...@@ -92,7 +92,6 @@ class Type_handler ...@@ -92,7 +92,6 @@ class Type_handler
virtual void sortlength(THD *thd, virtual void sortlength(THD *thd,
const Type_std_attributes *item, const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const= 0; SORT_FIELD_ATTR *attr) const= 0;
virtual bool is_packable() const { return false; }
}; };
...@@ -170,7 +169,6 @@ class Type_handler_string_result: public Type_handler ...@@ -170,7 +169,6 @@ class Type_handler_string_result: public Type_handler
void sortlength(THD *thd, void sortlength(THD *thd,
const Type_std_attributes *item, const Type_std_attributes *item,
SORT_FIELD_ATTR *attr) const; SORT_FIELD_ATTR *attr) const;
bool is_packable()const { return true; }
}; };
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment