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 should report error when pattern parameter is empty string #53221

Closed
yibin87 opened this issue May 13, 2024 · 4 comments · Fixed by #53230
Closed

Regexp should report error when pattern parameter is empty string #53221

yibin87 opened this issue May 13, 2024 · 4 comments · Fixed by #53230
Assignees
Labels

Comments

@yibin87
Copy link
Contributor

yibin87 commented May 13, 2024

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

mysql> create table t0 (a varchar(10));
mysql> insert into t0 values('');
mysql> select 'hello' regexp a from t0;

2. What did you expect to see? (Required)

Error "Empty pattern is invalid" should be reported

3. What did you see instead (Required)

mysql> select 'hello' regexp a from t0;
+------------------+
| 'hello' regexp a |
+------------------+
|                1 |
+------------------+
1 row in set (0.01 sec)

4. What is your TiDB version? (Required)

---------------------------------------------------------------------------------------+
| Release Version: v8.2.0-alpha-6-g8f138d5113
Edition: Community
Git Commit Hash: 8f138d5
Git Branch: HEAD
UTC Build Time: 2024-04-22 08:00:01
GoVersion: go1.21.6
Race Enabled: false
Check Table Before Drop: false
Store: tikv |

@yibin87 yibin87 added the type/bug This issue is a bug. label May 13, 2024
@yibin87
Copy link
Contributor Author

yibin87 commented May 13, 2024

/sig execution

@ti-chi-bot ti-chi-bot bot added the sig/execution SIG execution label May 13, 2024
@yibin87
Copy link
Contributor Author

yibin87 commented May 13, 2024

/severity minor

@yibin87
Copy link
Contributor Author

yibin87 commented May 13, 2024

/label affects-8.1

@yibin87
Copy link
Contributor Author

yibin87 commented May 13, 2024

/assign @yibin87

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

Successfully merging a pull request may close this issue.

1 participant