diff options
author | Sergei Golubchik <serg@mariadb.org> | 2020-11-03 19:07:16 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2020-12-10 08:45:20 +0100 |
commit | 59bbe873d48b13eb3b8a912c2187ea94ee165ae9 (patch) | |
tree | de7a50c05e3f55bb3ba399e15f5c8bf7e4972d7c | |
parent | f99abb45c586e618fbbf573e1990209ab7f26968 (diff) | |
download | mariadb-git-59bbe873d48b13eb3b8a912c2187ea94ee165ae9.tar.gz |
Revert "MDEV-24033: SIGSEGV in __memcmp_avx2_movbe from queue_insert | SIGSEGV in __memcmp_avx2_movbe from native_compare"
This reverts commit 5a0c34e4c2fd951119efb432eedcaa65a1d36606.
but keeps the test case
-rw-r--r-- | sql/field.h | 3 | ||||
-rw-r--r-- | sql/filesort.cc | 14 | ||||
-rw-r--r-- | sql/sql_class.h | 2 | ||||
-rw-r--r-- | sql/sql_type.h | 2 |
4 files changed, 1 insertions, 20 deletions
diff --git a/sql/field.h b/sql/field.h index fea40251587..18e44f1d9d4 100644 --- a/sql/field.h +++ b/sql/field.h @@ -1339,8 +1339,6 @@ public: virtual uint max_packed_col_length(uint max_length) { return max_length;} - virtual bool is_packable() const { return false; } - uint offset(uchar *record) const { return (uint) (ptr - record); @@ -1829,7 +1827,6 @@ public: bool can_optimize_range(const Item_bool_func *cond, const Item *item, bool is_eq_func) const; - bool is_packable() const { return true; } }; /* base class for float and double and decimal (old one) */ diff --git a/sql/filesort.cc b/sql/filesort.cc index 96f9aa874da..d76c39c3bd4 100644 --- a/sql/filesort.cc +++ b/sql/filesort.cc @@ -1971,14 +1971,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length, if (sortorder->field) { 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(); - if (sortorder->is_variable_sized()) - set_if_smaller(sortorder->length, thd->variables.max_sort_length); - if (use_strnxfrm((cs=sortorder->field->sort_charset()))) { *multi_byte_charset= true; @@ -1989,10 +1982,6 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length, } 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); if (use_strnxfrm(sortorder->item->collation.collation)) { @@ -2001,8 +1990,7 @@ sortlength(THD *thd, SORT_FIELD *sortorder, uint s_length, if (sortorder->item->maybe_null) 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; } sortorder->field= (Field*) 0; // end marker diff --git a/sql/sql_class.h b/sql/sql_class.h index 84f188b7803..d2b0b40846b 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -5456,8 +5456,6 @@ struct SORT_FIELD_ATTR { uint length; /* Length of sort field */ uint suffix_length; /* Length suffix (0-4) */ - enum Type { FIXED_SIZE, VARIABLE_SIZE } type; - bool is_variable_sized() { return type == VARIABLE_SIZE; } }; diff --git a/sql/sql_type.h b/sql/sql_type.h index 046b42e4a83..42090037ead 100644 --- a/sql/sql_type.h +++ b/sql/sql_type.h @@ -92,7 +92,6 @@ public: virtual void sortlength(THD *thd, const Type_std_attributes *item, SORT_FIELD_ATTR *attr) const= 0; - virtual bool is_packable() const { return false; } }; @@ -170,7 +169,6 @@ public: void sortlength(THD *thd, const Type_std_attributes *item, SORT_FIELD_ATTR *attr) const; - bool is_packable()const { return true; } }; |