mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-08-14 08:56:00 +00:00
Fixed bug in pooling:
Due to missing reference count incrementation the default configuration was removed/overwritten.
This commit is contained in:
@ -409,6 +409,7 @@ static PyObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
self->configuration= kwargs;
|
self->configuration= kwargs;
|
||||||
|
Py_INCREF(self->configuration);
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -445,8 +446,8 @@ MrdbPool_addconnection(MrdbPool *self, PyObject *args)
|
|||||||
if (!self->connection[i])
|
if (!self->connection[i])
|
||||||
{
|
{
|
||||||
if (!conn &&
|
if (!conn &&
|
||||||
(!(conn = (MrdbConnection *)MrdbConnection_connect(NULL, args,
|
!(conn = (MrdbConnection *)MrdbConnection_connect(NULL, args,
|
||||||
self->configuration))))
|
self->configuration)))
|
||||||
{
|
{
|
||||||
pthread_mutex_unlock(&self->lock);
|
pthread_mutex_unlock(&self->lock);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Reference in New Issue
Block a user