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 '^[-]?[0-9]+$' fails on int64 column. #1055

Closed
joel-rieke opened this issue Jun 10, 2022 · 4 comments
Closed

REGEXP '^[-]?[0-9]+$' fails on int64 column. #1055

joel-rieke opened this issue Jun 10, 2022 · 4 comments

Comments

@joel-rieke
Copy link

I know this sounds crazy to run a regex on a BIGINT column, however, when I do so in mysql, it works fine. Notice this regex will match every number in a BIGINT, so kind of pointless. However, running this regex against a BIGINT in go-mysql-server returns no matches.

Another regex that works in mysql to return a result:
'^[-]?2[0-9]+$'

But on go-mysql-server, no results for the same dataset.

In the interest of compatibility with mysql, perhaps it would be nice to support REGEX on int64 columns?

@timsehn
Copy link
Contributor

timsehn commented Jun 10, 2022

Goal is 100% MySQL compatibility. Thanks for the bug report. We'll get on it.

@bpf120
Copy link
Contributor

bpf120 commented Jun 10, 2022

Hi @joel-rieke, thanks for the report. We'd love to learn about your use case too. Feel free to share here, email me(brianf@dolthub.com), or come by our Discord.

https://discord.com/invite/RFwfYpu

@fulghum
Copy link
Contributor

fulghum commented Jun 13, 2022

Thanks for reporting this one @joel-rieke ! The fix was merged in on Friday and released in Dolt 0.40.9. Please let us know if you find any other issues.

@fulghum fulghum closed this as completed Jun 13, 2022
@joel-rieke
Copy link
Author

Tested the change in our project and it fixes the problem we were having. Thanks for looking into this!

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

No branches or pull requests

4 participants