@@ -35,8 +35,6 @@ class _sqlite3.Cursor "pysqlite_Cursor *" "clinic_state()->CursorType"
3535[clinic start generated code]*/
3636/*[clinic end generated code: output=da39a3ee5e6b4b0d input=3c5b8115c5cf30f1]*/
3737
38- static const char errmsg_fetch_across_rollback [] = "Cursor needed to be reset because of commit/rollback and can no longer be fetched from." ;
39-
4038/*[clinic input]
4139_sqlite3.Cursor.__init__ as pysqlite_cursor_init
4240
@@ -63,8 +61,6 @@ pysqlite_cursor_init_impl(pysqlite_Cursor *self,
6361
6462 self -> arraysize = 1 ;
6563 self -> closed = 0 ;
66- self -> reset = 0 ;
67-
6864 self -> rowcount = -1L ;
6965
7066 Py_INCREF (Py_None );
@@ -273,12 +269,6 @@ _pysqlite_fetch_one_row(pysqlite_Cursor* self)
273269 const char * colname ;
274270 PyObject * error_msg ;
275271
276- if (self -> reset ) {
277- PyObject * exc = self -> connection -> InterfaceError ;
278- PyErr_SetString (exc , errmsg_fetch_across_rollback );
279- return NULL ;
280- }
281-
282272 Py_BEGIN_ALLOW_THREADS
283273 numcols = sqlite3_data_count (self -> statement -> st );
284274 Py_END_ALLOW_THREADS
@@ -482,7 +472,6 @@ _pysqlite_query_execute(pysqlite_Cursor* self, int multiple, PyObject* operation
482472 }
483473
484474 self -> locked = 1 ;
485- self -> reset = 0 ;
486475
487476 if (multiple ) {
488477 if (PyIter_Check (second_argument )) {
@@ -731,8 +720,6 @@ pysqlite_cursor_executescript_impl(pysqlite_Cursor *self,
731720 return NULL ;
732721 }
733722
734- self -> reset = 0 ;
735-
736723 size_t sql_len = strlen (sql_script );
737724 int max_length = sqlite3_limit (self -> connection -> db ,
738725 SQLITE_LIMIT_SQL_LENGTH , -1 );
@@ -797,12 +784,6 @@ pysqlite_cursor_iternext(pysqlite_Cursor *self)
797784 return NULL ;
798785 }
799786
800- if (self -> reset ) {
801- PyObject * exc = self -> connection -> InterfaceError ;
802- PyErr_SetString (exc , errmsg_fetch_across_rollback );
803- return NULL ;
804- }
805-
806787 if (self -> statement == NULL ) {
807788 return NULL ;
808789 }
0 commit comments