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:
adustman
2008-10-17 00:15:26 +00:00
parent 34f2239544
commit 48d9ec3527
2 changed files with 10 additions and 3 deletions

View File

@@ -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

View File

@@ -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:
=========================