SQL Relay version 0.54 is now available!
This release mainly fixes a lot of subtle or obscure bugs. It also fixes problems detecting a bunch of things on a bunch of odd platforms - for example TCL is now properly detected on multi-arch systems like Debian GNU/Linux and 64-bit Sybase and DB2 are properly detected now too. The most significant new features though are a much improved PHP PDO driver and experimental support for a multi-thread (as opposed to multi-process) listener.
To use the new multi-threaded listener, set sessionhandler="thread" (as opposed to sessionhandler="process", which is the default) in the sqlrelay.conf file. There are a few caveats to using this feature though. Currently listenertimeout="0" and handoff="proxy" are not supported when using threads. Those issues will be remedied in a future release.
A good bit of behind-the-scenes work has been done as well. One of the long term goals is multi-protocol support. Ie. the ability to aim a MySQL (or other) app directly at SQL Relay rather than having to port the app to the SQL Relay API or use the drop-in replacement library. The groundwork for this has been laid in this release. The client-server communication has been separated and abstracted and the SQL Relay native API has been refactored as an implementation of the interface.
I'm also working towards complete support on Windows. Currently the C++, C, C# and ADO.NET client API's work on Windows but none of the rest of the API's, nor any of the server components work yet. A lot of the Rudiments library has been ported to Windows in it's most recent release though, and virtually all of the Posix API calls have been replaced with Rudiments calls. There are a few left in the ODBC connection class, but that's all. So, basically when the rest of Rudiments is ported, SQL Relay should work on Windows, and there are only a few things left to port. Some of them are tricky though, like signals, so it could still be a little while.
The full ChangeLog for this release follows:
- fixed bugs that caused problems when unopened result sets were closed
- added protocol identification phase to client/server protocol
- split client protocol handling out into its own class and abstracted it
- updated oracle code not to relogin when dropping tables unless a temp table with an "on commit preserve rows" was run
- updated server to run table-drop and session-end queries after the session-end commit/rollback, as some queries on some platforms (including drop-table on oracle) cause an implicit commit and the rollback needs to be run first
- replaced gettimeofday calls with calls to datetime::getSystemDateAndTime
- fixed a bug in slow query logger that caused it to display the wrong query time
- a few mingw32 tweaks
- fixed a few PDO driver bugs related to affected row counts and last insert id
- implemented PDO exceptions
- implemented support for PDO::ATTR_EMULATE_PREPARES by using substitution variables
- added foundrows and ignorespace options to mysql connect string
- fixed a bug where affectedRows() would return -1 for MySQL selects instead of the same value as rowCount()
- updated sqlr-connection code not to get db host name and ip address at startup unless logging is enabled to work around issues where people fail to put the db host name in dns
- fixed a subtle bind format translation bug that caused errors when translating from oracle-style binds to mysql-style if the varaibles were out of order with the placeholders in the query
- fixed bugs in the mysql and postgresql connection code that assumed that the bind variables were bound in order, independent of their names
- resolved a paradox involved in detecting whether the current mysql query needs to have its bind variables faked or not
- added support for client-side debug-to-file
- added debug-to-file support to command line clients
- tweaked server processes to use process::spawn instead of system() and process::fork()/process::exec()
- added another error string to detect down mysql database
- added support for a multi-threaded listener
- fixed a bug that could cause a crash when logging connection-level errors
- added back x64-detection so sybase and db2 libraries will be detected properly
- added support for forward-only cursors to the PDO driver
- fixed a bug that could cause one (and only one) dynamically spawned connection daemon to ignore its ttl
- added support for get/set result set buffer size to the PDO driver
- updated configure test for xsubpp
- updated configure test for tcl to support multi-arch
- updated configure test for python to support multi-arch
- added custom PDO driver attributes to access db type, version, host name, ip address and bind format
- added custom PDO driver attribute to get/set current database
- added custom PDO driver attribute to set whether or not to get column info when fetching the result set
- updated db2 to re-login when it sees error -30081