Crash when using connection pooling with a unicode driver
Brought to you by:
lurcher,
peteralexharvey
When using a unicode-only driver (such as the oracle instant client ODBC driver), if connection pooling is enabled, crashes occur in at least SQLPrepare() and possibly other places.
It seems that the connection.unicode_driver flag isn't being saved to the pool, resulting in SQLPrepare() calling the null pointer connection.functions[55].func instead of connection.functions[55].funcW when called on a connection that was retrieved from the pool.
The attached patch stores the unicode_driver flag to the pool, and retrieved (along with the iconv function pointers) when taking a connection from the pool.
Fixes a crash bug when using connection pooling with a unicode-only driver