matrixorigin / matrixorigin/matrixone
[Bug]: utf8mb4_0900_ai_ci string comparison and REGEXP are case-sensitive
- Dominant language
- Go
- Stars
- 1.9k
- Forks
- 311
- Avg merge
- 1d 3h
- Merged PRs (30d)
- 768
Description
### Environment
- Branch: latest `main`
- Commit: `33e96877604ad4b847ea7d5c55eb09429de1a5b6`
- MySQL oracle: 8.0.45
- MO: `8.0.30-MatrixOne-v1.3.0`
### Steps to Reproduce
```sql
set names utf8mb4 collate utf8mb4_0900_ai_ci;
select @@character_set_connection as cs, @@collation_connection as coll;
select 'a' = 'A' as eq_case,
'a ' = 'a' as eq_trailing,
'abc' regexp 'A' as regexp_case;
```
### MySQL Result
```text
cs coll
utf8mb4 utf8mb4_0900_ai_ci
eq_case eq_trailing regexp_case
1 0 1
```
### MatrixOne Result
```text
cs coll
utf8mb4 default
eq_case eq_trailing regexp_case
0 0 0
```
### Expected Behavior
For a case-insensitive collation such as `utf8mb4_0900_ai_ci`, string equality and REGEXP matching should follow MySQL's case-insensitive comparison semantics. The trailing-space equality result `0` is already aligned for this collation.
Contributor guide
Assessment
This issue has not been assessed yet.