You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Odd situation with a Python script; was able to determine what was happening, but not the why.
It looks like the initial environment allocation is succeeding, but returning SUCCESS_WITH_INFO, which isn't documented as a possibility, and is treated as a failure anyways. Interestingly, when it does try to get the error message and break, it says it has no data found!
With a trace (TRACE=ws) from the Tony libdb400 so you can understand what's going on w/o recompiling with additional printf:
Looking at the code, SQLAllocHandle returns SQL_SUCCESS_WITH_INFO for SQL_HANDLE_ENV when handles have been allocated and we're running in PASE.
Of course, wouldn't that mean that any time you allocated more than one connection object in ibm_db, you'd get this? (since each connection allocations an environment, connection, and statement handle)
....I forgot the context of the original issue, but that sounds about right. In fact, the env handle seems to be a singleton w/ CLI on i completely. In the PHP drivers, we do actually handle this (IIRC, we don't free/allocate more/ignore warnings about env handle allocation).
Nowadays IBM i CLI also has an attribute to enable ref-counted ENV handles to prevent getting the error on SQLFreeHandle. I haven't implemented it here yet, though.
Either way, I guess another #ifdef __PASE__ is needed.
Odd situation with a Python script; was able to determine what was happening, but not the why.
It looks like the initial environment allocation is succeeding, but returning
SUCCESS_WITH_INFO
, which isn't documented as a possibility, and is treated as a failure anyways. Interestingly, when it does try to get the error message and break, it says it has no data found!With a trace (
TRACE=ws
) from the Tony libdb400 so you can understand what's going on w/o recompiling with additional printf:python3-ibm_db-2.0.5.12-0.ppc64
is installed, which seems to be the latest version.(Oh, and if it helps, changing from blank user/pass to filled in creds didn't help, but that's irrelevant since it doesn't even get to connecting)
The text was updated successfully, but these errors were encountered: