mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-30111 InnoDB: Failing assertion: update->n_fields == 0 in row_ins_sec_index_entry_by_modify
Also fixes: MDEV-32190 Index corruption with unique key and nopad collation (without DESC or HASH keys) MDEV-28328 Assertion failures in btr0cur.cc upon INSERT or in row0sel.cc afterwards The code in strings/strcoll.inl when comparing an empty string to a string like 0x0001050001 did not take into account that the leftmost weight in the latter can be zero, while there are some more weights can follow the zero weight. Rewriting the code to treat the shorter string as smaller than a longer string.
This commit is contained in:
@@ -190,12 +190,14 @@ MY_FUNCTION_NAME(strnncoll)(CHARSET_INFO *cs __attribute__((unused)),
|
||||
0 >0 "a" is a prefix of "b", so "a" is smaller.
|
||||
>0 0 "b" is a prefix of "a", check b_is_prefix.
|
||||
>0 >0 Two weights were scanned, check weight difference.
|
||||
|
||||
Note: weights can be zero and positive (never negative).
|
||||
*/
|
||||
if (!a_wlen)
|
||||
return b_wlen ? -b_weight : 0;
|
||||
return b_wlen ? -1 : 0;
|
||||
|
||||
if (!b_wlen)
|
||||
return b_is_prefix ? 0 : a_weight;
|
||||
return b_is_prefix ? 0 : +1;
|
||||
|
||||
if ((res= (a_weight - b_weight)))
|
||||
return res;
|
||||
|
Reference in New Issue
Block a user