mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-22715: SIGSEGV in radixsort_for_str_ptr and in native_compare/my_qsort2 (optimized builds)
For DECIMAL[(M[,D])] datatype max_sort_length was not being honoured which was leading to buffer overflow while making the sort key. The fix to this problem would be to create sort keys for decimals with atmost max_sort_key bytes Important: The minimum value of max_sort_length has been raised to 8 (previously was 4), so fixed size datatypes like DOUBLE and BIGINIT are not truncated for lower values of max_sort_length.
This commit is contained in:
@@ -1576,7 +1576,7 @@ drop table t1;
|
||||
--echo #
|
||||
--echo # Check strnxfrm() with odd length
|
||||
--echo #
|
||||
set max_sort_length=5;
|
||||
set max_sort_length=9;
|
||||
select @@max_sort_length;
|
||||
eval create table t1 (a varchar(128) character set utf8mb4 collate utf8mb4_general_ci) engine $engine;
|
||||
insert into t1 values ('a'),('b'),('c');
|
||||
|
Reference in New Issue
Block a user