mirror of
https://github.com/PyMySQL/mysqlclient.git
synced 2026-03-13 08:00:02 +08:00
Fix bug #2137599: Better regex for parsing INPUT statements. Passes unit
tests but has not been thoroughly tested. Bump version to 1.2.3b1.
This commit is contained in:
@@ -6,7 +6,14 @@ default, MySQLdb uses the Cursor class.
|
||||
"""
|
||||
|
||||
import re
|
||||
insert_values = re.compile(r"\svalues\s*(\(((?<!\\)'.*?\).*(?<!\\)?'|.)+?\))", re.IGNORECASE)
|
||||
|
||||
restr = (r"\svalues\s*"
|
||||
r"(\(((?<!\\)'[^\)]*?\)[^\)]*(?<!\\)?'"
|
||||
r"|[^\(\)]|"
|
||||
r"(?:\([^\)]*\))"
|
||||
r")+\))")
|
||||
|
||||
insert_values= re.compile(restr)
|
||||
from _mysql_exceptions import Warning, Error, InterfaceError, DataError, \
|
||||
DatabaseError, OperationalError, IntegrityError, InternalError, \
|
||||
NotSupportedError, ProgrammingError
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
[metadata]
|
||||
version: 1.2.2
|
||||
version_info: (1,2,2,'final',0)
|
||||
version: 1.2.3
|
||||
version_info: (1,2,3,'beta',1)
|
||||
description: Python interface to MySQL
|
||||
long_description:
|
||||
=========================
|
||||
|
||||
Reference in New Issue
Block a user