1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-27042 UCA: Resetting contractions to ignorable does not work well

The weight scanner routine scanner_next() did not properly handle the cases
when a contraction produces no weights (is ignorable).

Adding a helper routine my_uca_scanner_set_weight() and using
it in all cases:

- A single ASCII character
- A contraction starting with an ASCII character
- A multi-byte character
- A contraction starting with a multi-byte character

Also adding two other helper routines:

- my_uca_scanner_next_expansion_weight()
- my_uca_scanner_set_weight_outside_maxchar()

to avoid using scanner->wbeg directly inside scanner_next().
This reduces the probability of similar future bugs.
This commit is contained in:
Alexander Barkov
2021-11-14 07:09:08 +04:00
parent 0a3d1d106a
commit f9ad8072cd
5 changed files with 114 additions and 36 deletions

View File

@ -9,6 +9,9 @@
<i>\u0029</i> <!-- right parenthesis -->
<i>\u002B</i> <!-- plus -->
<i>\u002D</i> <!-- hyphen -->
<i>tel.</i>
<i>tél.</i>
<i>ťel.</i>
</rules>
</collation>
<collation name="utf8mb3_test_ci" id="353">