Skip to content
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 lib] TiKV's regexp is inconsistent with that of Tidb #15478

Closed
knull-cn opened this issue Aug 30, 2023 · 11 comments
Closed

[regexp lib] TiKV's regexp is inconsistent with that of Tidb #15478

knull-cn opened this issue Aug 30, 2023 · 11 comments

Comments

@knull-cn
Copy link

Bug Report

What version of TiKV are you using?

v6.5.x, v7.1.x

What operating system and CPU are you using?

1tikv (72c/385g)

Steps to reproduce

create table TT (str varchar(1000));
insert into TT (str) values('^/home/ap/ncbs/file/output/fa/xbrl/\d{4}([0]{1}[1-9]{1}|[1]{1}[012]{1})([0]{1}[1-9]{1}|[12]{1}\d{1}|[3]{1}[01]{1})/IVSR_HOLD_FNDLOT_PERCN_\d{2}\_\d{8}\.txt$');
select 1 from TT where 'abc' regexp str;

What did you expect?

no error

What did happened?

image

@knull-cn knull-cn added the type/bug Type: Issue - Confirmed a bug label Aug 30, 2023
@knull-cn
Copy link
Author

same query run on tidb v6.1.1 was correct
because the regexp was run on tidb-server at v6.1.1;and pushdown to tikv v6.5.x
means , regexp was different between on golang and rust

@seiya-annie
Copy link

/found gs

@ti-chi-bot ti-chi-bot bot added the found/gs label Sep 20, 2023
@jebter
Copy link
Collaborator

jebter commented Sep 21, 2023

/label affects-6.5
/label affects-7.1

@gengliqi
Copy link
Member

gengliqi commented Oct 12, 2023

The escape \ for \_ is useless.
So the reason is as rust-lang/regex#497 said,

Inconsequential escapes are not allowed.

If you delete this \, no error will be reported.

Most of the behavior between the regexp library of Go and Rust is the same, but a few behaviors like this one are different. Only when we unify the three compute engines(tidb,tikv,tiflash) can all behaviors be truly consistent.

@zanmato1984
Copy link

This seems a duplicate of pingcap/tidb#48360

Let's close this one and track the issue in the other.

@zanmato1984
Copy link

/close

Copy link
Contributor

ti-chi-bot bot commented Nov 8, 2023

@zanmato1984: You can't close an active issue/PR unless you authored it or you are a collaborator.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@jebter
Copy link
Collaborator

jebter commented Nov 8, 2023

/close

Copy link
Contributor

ti-chi-bot bot commented Nov 8, 2023

@jebter: Closing this issue.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@ti-chi-bot ti-chi-bot bot closed this as completed Nov 8, 2023
@kennedy8312
Copy link

/type regression

Copy link
Contributor

ti-chi-bot bot commented Jan 4, 2024

@kennedy8312: The label(s) type/regression cannot be applied, because the repository doesn't have them.

In response to this:

/type regression

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants