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

mysql decoder doesn't recognise negative ints #36

Open
mrmonkington opened this issue Feb 3, 2023 · 0 comments · May be fixed by #37
Open

mysql decoder doesn't recognise negative ints #36

mrmonkington opened this issue Feb 3, 2023 · 0 comments · May be fixed by #37

Comments

@mrmonkington
Copy link

I had a dump fail on an int field with -1 in it. I'm afraid I haven't put together an MRE, but it's very obvious that in https://github.com/andersinno/python-database-sanitizer/blob/master/database_sanitizer/utils/mysql.py#L67 MIN_INT_PATTERN doesn't cover negative numbers.

MYSQL_FLOAT_PATTERN = re.compile(r"^[+-]?\d*\.\d+([eE][+-]?\d+)?$")
MYSQL_INT_PATTERN = re.compile(r"^\d+$")
@mrmonkington mrmonkington linked a pull request Feb 3, 2023 that will close this issue
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

Successfully merging a pull request may close this issue.

1 participant