summaryrefslogtreecommitdiffstats
path: root/Modules/_sqlite/connection.c
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-06-12 11:10:24 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-06-12 11:10:24 (GMT)
commit0f355c0022946412ee6b7ba37ffbeb6aa8bc02a2 (patch)
tree109f696b96b493355851344a019dd742681ca106 /Modules/_sqlite/connection.c
parent96471105f4b4911961527ed616fd58056f24c685 (diff)
parent7bea2347c7e8af2c6b59e541c4039c34c7a8f6b2 (diff)
downloadcpython-0f355c0022946412ee6b7ba37ffbeb6aa8bc02a2.zip
cpython-0f355c0022946412ee6b7ba37ffbeb6aa8bc02a2.tar.gz
cpython-0f355c0022946412ee6b7ba37ffbeb6aa8bc02a2.tar.bz2
Issue #27190: Merge from 3.5
Diffstat (limited to 'Modules/_sqlite/connection.c')
-rw-r--r--Modules/_sqlite/connection.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/_sqlite/connection.c b/Modules/_sqlite/connection.c
index 4beed78..5349299 100644
--- a/Modules/_sqlite/connection.c
+++ b/Modules/_sqlite/connection.c
@@ -164,6 +164,10 @@ int pysqlite_connection_init(pysqlite_Connection* self, PyObject* args, PyObject
#ifdef WITH_THREAD
self->thread_ident = PyThread_get_thread_ident();
#endif
+ if (!check_same_thread && sqlite3_libversion_number() < 3003001) {
+ PyErr_SetString(pysqlite_NotSupportedError, "shared connections not available");
+ return -1;
+ }
self->check_same_thread = check_same_thread;
self->function_pinboard = PyDict_New();