-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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 together with CONCAT(..REPLACE..) might return unexpected result #52758
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
severity/major
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
Comments
ti-chi-bot
bot
added
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
may-affects-6.5
may-affects-7.1
may-affects-7.5
may-affects-8.1
labels
Apr 22, 2024
How about using mysql> select json_overlaps(concat('[', '22', ']'), concat('[', '1,2,3', ']'));
+------------------------------------------------------------------+
| json_overlaps(concat('[', '22', ']'), concat('[', '1,2,3', ']')) |
+------------------------------------------------------------------+
| 0 |
+------------------------------------------------------------------+
1 row in set (0.00 sec)
mysql> select json_overlaps(concat('[', '22', ']'), concat('[', '1,2,3,22', ']'));
+---------------------------------------------------------------------+
| json_overlaps(concat('[', '22', ']'), concat('[', '1,2,3,22', ']')) |
+---------------------------------------------------------------------+
| 1 |
+---------------------------------------------------------------------+
1 row in set (0.00 sec) Let me try! |
13 tasks
YangKeao
added
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
and removed
may-affects-8.1
labels
Apr 25, 2024
YangKeao
removed
may-affects-5.4
This bug maybe affects 5.4.x versions.
may-affects-6.1
labels
Apr 25, 2024
This was referenced May 11, 2024
terry1purcell
pushed a commit
to terry1purcell/tidb
that referenced
this issue
May 17, 2024
RidRisR
pushed a commit
to RidRisR/tidb
that referenced
this issue
May 23, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
affects-6.5
This bug affects the 6.5.x(LTS) versions.
affects-7.1
This bug affects the 7.1.x(LTS) versions.
affects-7.5
This bug affects the 7.5.x(LTS) versions.
affects-8.1
This bug affects the 8.1.x(LTS) versions.
severity/major
sig/sql-infra
SIG: SQL Infra
type/bug
The issue is confirmed as a bug.
Bug Report
Please answer these questions before submitting your issue. Thanks!
1. Minimal reproduce step (Required)
tidb/pkg/session/bootstrap.go
Line 475 in e917aa6
tidb/pkg/ddl/job_table.go
Line 219 in e917aa6
above code uses
REPLACE(comma-separated-id-list, ',', '|')
to generate regex pattern to match whether there are ids inside anothercomma-separated-id-list
expr, but when the expr part contains some number prefix ofcomma-separated-number-list
, it might return unexpected result. suppose expr is22
,comma-separated-number-list
is1,2,3
:2. What did you expect to see? (Required)
3. What did you see instead (Required)
4. What is your TiDB version? (Required)
master
The text was updated successfully, but these errors were encountered: