Skip to content

Commit 2b6123e

Browse files
gylimethane
authored andcommitted
Allow semicolon at the end of bulk insert query
1 parent 948def4 commit 2b6123e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MySQLdb/cursors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
RE_INSERT_VALUES = re.compile(
2929
r"\s*((?:INSERT|REPLACE)\s.+\sVALUES?\s+)" +
3030
r"(\(\s*(?:%s|%\(.+\)s)\s*(?:,\s*(?:%s|%\(.+\)s)\s*)*\))" +
31-
r"(\s*(?:ON DUPLICATE.*)?)\Z",
31+
r"(\s*(?:ON DUPLICATE.*)?);?\s*\Z",
3232
re.IGNORECASE | re.DOTALL)
3333

3434

0 commit comments

Comments
 (0)