-
Notifications
You must be signed in to change notification settings - Fork 82
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dpiSubscr_prepareStmt doesn't increment openChildCount. #27
Comments
I made a test code about this issue. dpiConn_close at line 64 got the error "DPI-1054: connection cannot be closed when open statements or LOBs exist". However the statement created by dpiSubscr_prepareStmt was closed and no LOBs were created. Here is debug outout: $ DPI_DEBUG_LEVEL=6 ./subscr-test
ODPI: fn dpiContext_initCommonCreateParams(0x19bac20)
ODPI: fn dpiConn_create(0x19bac20)
ODPI: ref 0x19bac40 (dpiConn) -> 1 [NEW]
ODPI: fn dpiContext_initSubscrCreateParams(0x19bac20)
ODPI: fn dpiConn_newSubscription(0x19bac40)
ODPI: ref 0x1a4d100 (dpiSubscr) -> 1 [NEW]
ODPI: ref 0x19bac40 (dpiConn) -> 2
The next 4 bytes of subscrId.id were overwritten with 0x00000000.
ODPI: fn dpiSubscr_prepareStmt(0x1a4d100)
ODPI: ref 0x1a6e3c0 (dpiStmt) -> 1 [NEW]
ODPI: ref 0x19bac40 (dpiConn) -> 3
ODPI: fn dpiStmt_close(0x1a6e3c0)
ODPI: open child on conn 0x19bac40 -> -1
ODPI: ref 0x19bac40 (dpiConn) -> 2
ODPI: fn dpiStmt_release(0x1a6e3c0)
ODPI: ref 0x1a6e3c0 (dpiStmt) -> 0
ODPI: fn dpiSubscr_close(0x1a4d100)
ODPI: fn dpiSubscr_release(0x1a4d100)
ODPI: ref 0x1a4d100 (dpiSubscr) -> 0
ODPI: ref 0x19bac40 (dpiConn) -> 1
ODPI: fn dpiConn_close(0x19bac40)
ERROR at line 64
dpiConn_close(conn, DPI_MODE_CONN_CLOSE_DEFAULT, NULL, 0)
DPI-1054: connection cannot be closed when open statements or LOBs exist |
Good point. I'll have this corrected. |
Thanks for the test case. This issue should now be resolved. |
dpiSubscr_prepareStmt doesn't increment openChildCount in dpiConn.
It should be incremented as dpiConn_prepareStmt does.
Or it should not be decremented when a dpiStmt created by dpiSubscr_prepareStmt is closed.
The text was updated successfully, but these errors were encountered: