REGEXP together with CONCAT(..REPLACE..) might return unexpected result #52758
Labels
affects-6.5
affects-7.1
affects-7.5
affects-8.1
severity/major
sig/sql-infra
SIG: SQL Infra
type/bug
This issue is 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: