Wrong regexp in executemany() function.
MySQL database connector for Python programming
Brought to you by:
adustman
executemany() function don't work when your have a
table whose names ends with 'values'.
In particular, the following statement wouldn't work:
c.execute("create table avalues(a int, b int)")
c.executemany("insert into avalues(a,b) values('%s','%
s')", [(1,2),(3,4)])
assuming c is an existing cursor.
Suggestion:
change line 9 in cursors.py
from
insert_values = re.compile(r'values\s*((.+))',
re.IGNORECASE)
to
insert_values = re.compile(r'\svalues\s*((.+))',
re.IGNORECASE)
Logged In: YES
user_id=71372
fixed in cvs (post 0.9.2a2)