[Informixdb-cvs] informixdb/ext _informixdb.ec,1.89,1.90
Brought to you by:
chaese,
f-apolloner
From: Carsten H. <ch...@us...> - 2007-06-11 00:44:40
|
Update of /cvsroot/informixdb/informixdb/ext In directory sc8-pr-cvs2.sourceforge.net:/tmp/cvs-serv28857 Modified Files: _informixdb.ec Log Message: reprepare insert statement when switching from insert cursor to single execution Index: _informixdb.ec =================================================================== RCS file: /cvsroot/informixdb/informixdb/ext/_informixdb.ec,v retrieving revision 1.89 retrieving revision 1.90 diff -C2 -d -r1.89 -r1.90 *** _informixdb.ec 2 Jun 2007 14:50:39 -0000 1.89 --- _informixdb.ec 11 Jun 2007 00:44:36 -0000 1.90 *************** *** 2005,2008 **** --- 2005,2016 ---- if (setConnection(self->conn)) return NULL; + /* If an insert statement was used by an insert cursor, it must be + reprepared for single execution */ + if (self->op==op && self->stype==SQ_INSERT && self->state > 1) { + Py_DECREF(self->op); + self->op = Py_None; + Py_INCREF(Py_None); + } + if (!do_prepare(self, op)) { return NULL; |