diff --git a/MySQLdb/cursors.py b/MySQLdb/cursors.py index 9ebf0a14..d5f38285 100644 --- a/MySQLdb/cursors.py +++ b/MySQLdb/cursors.py @@ -28,7 +28,7 @@ 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.*)?)\Z", + r"(\s*(?:ON DUPLICATE.*)?);?\s*\Z", re.IGNORECASE | re.DOTALL)