-
Notifications
You must be signed in to change notification settings - Fork 5.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
REGEXP fails with invalid pattern #48360
Comments
Looks like this doesn't happen with unistore, but only with TiKV. |
This looks like a TiKV pushdown issue.
|
This is where the error originates: https://github.com/tikv/tikv/blob/6a2c9733a8873089561d2b05545fbbb85fb96f5e/components/tidb_query_expr/src/impl_regexp.rs#L70 |
From TiKV logs:
From TiDB logs:
|
This seems caused by the same reason as tikv/tikv#15478 (comment) Might be a duplication as tikv/tikv#15478 |
The escape character mysql> select '[\[,]23[\],]';
+------------+
| [[,]23[],] |
+------------+
| [[,]23[],] |
+------------+
1 row in set (0.00 sec) If we want to keep the mysql> select '[\\[,]23[\\],]';
+--------------+
| [\[,]23[\],] |
+--------------+
| [\[,]23[\],] |
+--------------+
1 row in set (0.00 sec) If we use |
Expanding the test a bit:
TiDB v7.5.0 with default settings:
TiDB v7.5.0, with regexp pushdown disabled:
MySQL 8.2.0
Conclusions:
Looks like TiDB with pushdown disabled should be changed to more strictly validate the regexp and have the same behavior as TiDB with pushdown enabled. |
Bug Report
1. Minimal reproduce step (Required)
2. What did you expect to see? (Required)
MySQL 8.2.0
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
Also reproduced with v7.1.1
The text was updated successfully, but these errors were encountered: