mirror of
https://github.com/mariadb-corporation/mariadb-connector-python.git
synced 2025-08-02 13:56:54 +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;
|
||||
Py_INCREF(self->configuration);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
||||
@ -444,9 +445,9 @@ MrdbPool_addconnection(MrdbPool *self, PyObject *args)
|
||||
{
|
||||
if (!self->connection[i])
|
||||
{
|
||||
if (!conn &&
|
||||
(!(conn = (MrdbConnection *)MrdbConnection_connect(NULL, args,
|
||||
self->configuration))))
|
||||
if (!conn &&
|
||||
!(conn = (MrdbConnection *)MrdbConnection_connect(NULL, args,
|
||||
self->configuration)))
|
||||
{
|
||||
pthread_mutex_unlock(&self->lock);
|
||||
return NULL;
|
||||
|
Reference in New Issue
Block a user