python-2.5.1-sqlite
authorAnas Nashif <anas.nashif@intel.com>
Wed, 7 Nov 2012 15:29:36 +0000 (07:29 -0800)
committerChanho Park <chanho61.park@samsung.com>
Tue, 19 Aug 2014 10:37:01 +0000 (19:37 +0900)
Modules/_sqlite/cursor.c

index 3b84484b35dbba060a6b9a0260583c1c91677e6f..a0ea38d0b297ea2c52f8b2b98d920ac910b65a14 100644 (file)
@@ -835,6 +835,9 @@ PyObject* pysqlite_cursor_executescript(pysqlite_Cursor* self, PyObject* args)
             goto error;
         }
 
+        if (! statement)
+            break;
+
         /* execute statement, and ignore results of SELECT statements */
         rc = SQLITE_ROW;
         while (rc == SQLITE_ROW) {