Imported Upstream version 0.4.6 upstream/0.4.6
authorDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 18 Jul 2022 07:32:54 +0000 (16:32 +0900)
committerDongHun Kwak <dh0128.kwak@samsung.com>
Mon, 18 Jul 2022 07:32:54 +0000 (16:32 +0900)
PKG-INFO
pysqlite3.egg-info/PKG-INFO
setup.py
src/connection.c
src/util.h

index 6724cf6c092d1e9eefdea33d895644dceca60140..1e9366e5e82d5cfadfb5f8f9f76c93b23143a92a 100644 (file)
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pysqlite3
-Version: 0.4.5
+Version: 0.4.6
 Summary: DB-API 2.0 interface for Sqlite 3.x
 Home-page: https://github.com/coleifer/pysqlite3
 Author: Charles Leifer
index 6724cf6c092d1e9eefdea33d895644dceca60140..1e9366e5e82d5cfadfb5f8f9f76c93b23143a92a 100644 (file)
@@ -1,6 +1,6 @@
 Metadata-Version: 1.1
 Name: pysqlite3
-Version: 0.4.5
+Version: 0.4.6
 Summary: DB-API 2.0 interface for Sqlite 3.x
 Home-page: https://github.com/coleifer/pysqlite3
 Author: Charles Leifer
index e882b5be758d6cb9b642c88cd9cda6f2f793e0a9..3e80124293c2b01cb927f6b01bebb6b44cf928c9 100644 (file)
--- a/setup.py
+++ b/setup.py
@@ -12,7 +12,7 @@ from setuptools import Extension
 # If you need to change anything, it should be enough to change setup.cfg.
 
 PACKAGE_NAME = 'pysqlite3'
-VERSION = '0.4.5'
+VERSION = '0.4.6'
 
 # define sqlite sources
 sources = [os.path.join('src', source)
@@ -102,6 +102,9 @@ class AmalgationLibSqliteBuilder(build_ext):
         # Increase the maximum number of "host parameters" which SQLite will accept
         ext.define_macros.append(("SQLITE_MAX_VARIABLE_NUMBER", "250000"))
 
+        # Increase maximum allowed memory-map size to 1TB
+        ext.define_macros.append(("SQLITE_MAX_MMAP_SIZE", str(2**40)))
+
         ext.include_dirs.append(self.amalgamation_root)
         ext.sources.append(os.path.join(self.amalgamation_root, "sqlite3.c"))
 
index 77e7482fb5ac5e4a620677baa7954e94e483e6ad..da092ccb6fb7a9093c048d39905d642541b528a6 100644 (file)
@@ -250,7 +250,7 @@ void pysqlite_connection_dealloc(pysqlite_Connection* self)
 
     /* Clean up if user has not called .close() explicitly. */
     if (self->db) {
-        SQLITE3_CLOSE(self->db);
+        sqlite3_close_v2(self->db);
     }
 
     Py_XDECREF(self->isolation_level);
@@ -424,7 +424,7 @@ PyObject* pysqlite_connection_close(pysqlite_Connection* self, PyObject* args)
     pysqlite_close_all_blobs(self);
 
     if (self->db) {
-        rc = SQLITE3_CLOSE(self->db);
+        rc = sqlite3_close_v2(self->db);
 
         if (rc != SQLITE_OK) {
             _pysqlite_seterror(self->db, NULL);
@@ -1781,33 +1781,7 @@ pysqlite_connection_backup(pysqlite_Connection *self, PyObject *args, PyObject *
         if (rc == SQLITE_NOMEM) {
             (void)PyErr_NoMemory();
         } else {
-#if SQLITE_VERSION_NUMBER > 3007015
             PyErr_SetString(pysqlite_OperationalError, sqlite3_errstr(rc));
-#else
-            switch (rc) {
-                case SQLITE_ERROR:
-                    /* Description of SQLITE_ERROR in SQLite 3.7.14 and older
-                       releases. */
-                    PyErr_SetString(pysqlite_OperationalError,
-                                    "SQL logic error or missing database");
-                    break;
-                case SQLITE_READONLY:
-                    PyErr_SetString(pysqlite_OperationalError,
-                                    "attempt to write a readonly database");
-                    break;
-                case SQLITE_BUSY:
-                    PyErr_SetString(pysqlite_OperationalError, "database is locked");
-                    break;
-                case SQLITE_LOCKED:
-                    PyErr_SetString(pysqlite_OperationalError,
-                                    "database table is locked");
-                    break;
-                default:
-                    PyErr_Format(pysqlite_OperationalError,
-                                 "unrecognized error code: %d", rc);
-                    break;
-            }
-#endif
         }
     }
 
index c5a220e9b0aa7206e4c91a1f15b2a6eafb6260ea..cff31cda9578a068fedd430aaa6ec8f719cadbff 100644 (file)
@@ -39,10 +39,4 @@ int _pysqlite_seterror(sqlite3* db, sqlite3_stmt* st);
 
 sqlite_int64 _pysqlite_long_as_int64(PyObject * value);
 
-#if SQLITE_VERSION_NUMBER >= 3007014
-#define SQLITE3_CLOSE sqlite3_close_v2
-#else
-#define SQLITE3_CLOSE sqlite3_close
-#endif
-
 #endif