Don't lose the Python lock before all possible Python code has been executed.
This commit is contained in:
parent
c6603b324d
commit
b32352b54c
2
Cursor.c
2
Cursor.c
@ -1125,7 +1125,6 @@ static int Cursor_InternalPrepare(
|
|||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// prepare statement
|
// prepare statement
|
||||||
Py_BEGIN_ALLOW_THREADS
|
|
||||||
self->isOwned = 0;
|
self->isOwned = 0;
|
||||||
if (StringBuffer_Fill(&statementBuffer, statement) < 0)
|
if (StringBuffer_Fill(&statementBuffer, statement) < 0)
|
||||||
return -1;
|
return -1;
|
||||||
@ -1133,6 +1132,7 @@ static int Cursor_InternalPrepare(
|
|||||||
StringBuffer_Clear(&statementBuffer);
|
StringBuffer_Clear(&statementBuffer);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Py_BEGIN_ALLOW_THREADS
|
||||||
status = OCIStmtPrepare2(self->connection->handle, &self->handle,
|
status = OCIStmtPrepare2(self->connection->handle, &self->handle,
|
||||||
self->environment->errorHandle, (text*) statementBuffer.ptr,
|
self->environment->errorHandle, (text*) statementBuffer.ptr,
|
||||||
statementBuffer.size, (text*) tagBuffer.ptr, tagBuffer.size,
|
statementBuffer.size, (text*) tagBuffer.ptr, tagBuffer.size,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user