diff options
author | Nikita Malyavin <nikitamalyavin@gmail.com> | 2023-01-24 12:24:54 +0300 |
---|---|---|
committer | Nikita Malyavin <nikitamalyavin@gmail.com> | 2023-01-24 12:42:18 +0300 |
commit | ee92b709ee6ada510ff1fcb5b92757c1bccdd0f7 (patch) | |
tree | ea224930a3bb068b5fbd4f0f8d83eb426d829a22 /sql/table.cc | |
parent | 2ba6f3d46a4ee0268d82bf5b19f9d117c77fd4f0 (diff) | |
download | mariadb-git-bb-10.5-MDEV-30415.tar.gz |
MDEV-30415 PERIOD false positive overlap wtih utf8mb4_unicode_nopad_cibb-10.5-MDEV-30415
A wrong UNIQUE violation is caused here by camparing strings
'def' and 'def ' (with space), under utf8mb4_unicode_nopad_ci collation,
which means "don't count in paddings when comparing".
Field::cmp_prefix uses a comparison through collation, so cmp_binary should
be used instead.
Diffstat (limited to 'sql/table.cc')
-rw-r--r-- | sql/table.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/table.cc b/sql/table.cc index 7334f0143e6..118f6ffed8d 100644 --- a/sql/table.cc +++ b/sql/table.cc @@ -9025,7 +9025,7 @@ bool TABLE::check_period_overlaps(const KEY &key, if (f->is_null_in_record(lhs) || f->is_null_in_record(rhs)) return false; uint kp_len= key.key_part[part_nr].length; - if (f->cmp_prefix(f->ptr_in_record(lhs), f->ptr_in_record(rhs), + if (f->cmp_binary(f->ptr_in_record(lhs), f->ptr_in_record(rhs), kp_len) != 0) return false; } |