Mercurial > p > mysql-python > mysqldb-2
changeset 31:10038670b963 MySQLdb
Merge back r553 bug fix #2137599 for VALUES regex
author | kylev |
---|---|
date | Wed, 11 Feb 2009 22:15:41 +0000 |
parents | e3eb10510ddc |
children | 4a5668deee4a |
files | MySQLdb/cursors.py |
diffstat | 1 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/MySQLdb/cursors.py Wed Feb 11 20:10:30 2009 +0000 +++ b/MySQLdb/cursors.py Wed Feb 11 22:15:41 2009 +0000 @@ -11,10 +11,12 @@ __author__ = "$Author$"[9:-2] import re -INSERT_VALUES = re.compile( - r"^(P<start>.+\svalues\s*)(P<values>\(((?<!\\)'.*?\).*(?<!\\)?'|.)+?\))(P<end>.*)$", - re.IGNORECASE) +INSERT_VALUES = re.compile(r"\svalues\s*" + r"(\(((?<!\\)'[^\)]*?\)[^\)]*(?<!\\)?'" + r"|[^\(\)]|" + r"(?:\([^\)]*\))" + r")+\))") class BaseCursor(object):