You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Address review feedback on two counts.
Registering the collation let GetCollationByName accept it, so DDL could create
columns whose sort key TiKV and TiFlash cannot reproduce, and nothing stops an
expression carrying that collation from being pushed down. Drop the
newCollatorMap and newCollatorIDMap entries so the collation is rejected exactly
as before this branch. The collator and its weight table stay, and the unit tests
exercise the type directly.
That also removes the second problem. IsCICollation gates fast paths in
pkg/expression that case-fold with strings.ToLower, which assumes UTF-8: every
latin1 byte >= 0x80 becomes U+FFFD, so distinct characters fold together and
LOCATE reports matches that do not exist, while the 1-to-3 byte inflation breaks
the surrounding rune-offset arithmetic. Folding for a byte-oriented collation has
to go through the collator, as locateStringWithCollation already does. Revert the
IsCICollation change rather than half-fix it; it belongs with the work that turns
the collation on.
The collator doc comment now lists what enabling it requires, so the next reader
does not have to rediscover it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TgAxo4cK4qCpuLrhroHWy1
0 commit comments