10000 Regular Expression in executemany can not match insert into table values(%s,%s) · Issue #600 · PyMySQL/PyMySQL · GitHub
[go: up one dir, main page]

Skip to content

Regular Expression in executemany can not match insert into table values(%s,%s) #600

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

Closed
sizeoftank opened this issue Sep 15, 2017 · 2 comments

Comments

@sizeoftank
Copy link
sizeoftank commented Sep 15, 2017
RE_INSERT_VALUES`` = re.compile(
    r"\s*((?:INSERT|REPLACE)\s.+\sVALUES?\s+)" +
    r"(\(\s*(?:%s|%\(.+\)s)\s*(?:,\s*(?:%s|%\(.+\)s)\s*)*\))" +
    r"(\s*(?:ON DUPLICATE.*)?);?\s*\Z",
    re.IGNORECASE | re.DOTALL)
In [14]: print RE_INSERT_VALUES.match('insert into table values(%s,%s)')
None
In [15]: print RE_INSERT_VALUES.match('insert into table values (%s,%s)')
<_sre.SRE_Match object at 0x7f9ee7f9aa48>
@methane
Copy link
Member
methane commented Sep 15, 2017

See #597

@sizeoftank
Copy link
Author
sizeoftank commented Sep 20, 2017

OK, This issue is repeated, close.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 3, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0