Comment 2 for bug 1095510

Revision history for this message
Cody Baker (jcodybaker) wrote :

Err. This time patched in the right direction.

--- cursor.pyx.orig 2013-01-02 18:56:23.000000000 -0800
+++ cursor.pyx 2013-01-02 18:56:10.000000000 -0800
@@ -96,6 +96,7 @@
         """
         self._check_closed()
         self._do_autoping()
+ self._statements.clear()
         # This, on the other hand, is just plain stupid.
         if plain_query:
             if params:
@@ -130,6 +131,7 @@
         """
         self._check_closed()
         self._do_autoping()
+ self._statements.clear()
         # No plain queries because they can't be parameterized anyway.
         stmt = self._new_statement()
         stmt.prepare(query)