# HG changeset patch # User Leonardo Soto # Date 1212611545 14400 # Branch doj # Node ID 214bdbdf480cbbaddb2d9059afa2d2a437763269 # Parent 3f1c8264f7bf04bbdfc4a35502da585eed4478c9 zxJDBC: As cursor.executemany(sql, []) is going to be a no-op, PyCursor.executemany() now returns immediately if such is the case. Before, it called execute() which would create a useless PreparedStatement diff -r 3f1c8264f7bf -r 214bdbdf480c jython/src/com/ziclix/python/sql/PyCursor.java --- a/jython/src/com/ziclix/python/sql/PyCursor.java Tue Jun 03 14:55:28 2008 -0400 +++ b/jython/src/com/ziclix/python/sql/PyCursor.java Wed Jun 04 16:32:25 2008 -0400 @@ -506,7 +506,11 @@ public class PyCursor extends PyObject i * @param maxRows */ public void executemany(PyObject sql, PyObject params, PyObject bindings, PyObject maxRows) { - execute(sql, params, bindings, maxRows); + if (isSeq(params) && params.__len__() == 0) { + //executemany with an empty params tuple is a no-op + return; + } + execute(sql, params, bindings, maxRows); } /**