Sunday, March 30, 2014

SQL Relay - 0.55 is out

SQL Relay 0.55 is now available for download.


This release focused a lot on improved LOB support. Fetching LOB columns and binding LOBS for input and output are supported way better than they used to be. LOB support didn't exist at all for Firebird before, but LOBs are fully supported now. inputBindClob/Blob works on all databases now. On DB2, LOB columns have no size limitations any more and the maximum size of an output bind LOB is now configurable.

Oracle has long had parameters for configuring the size of buffers for fetching result sets. These parameters now exist for Sybase, FreeTDS, DB2 and ODBC connections now as well. In the past, you had to modify the source code to change them for those DB's. Now all you have to do is update the sqlrelay.conf file.

On that note, I made the default fetch buffer sizes consistent across Oracle, Sybase, FreeTDS, DB2 and ODBC. In particular, the maximum size of a column defaulted to 32K for Oracle and 4K for other DB's. 4K was once the maximum size of a varchar/varbinary on those DB's, but at some point (probably long ago) they were increased to 32K. So, 32K is the default size when using those DB's now too.

I also added a subtle but important update that helps out a lot when using a replicated database or database cluster with nodes behind a load balancer, such as Oracle RAC, or MySQL behind Ultramonkey. In the past, if a node went down, SQL Relay connections would detect this, re-log, and get distributed over other nodes. SQL Relay wouldn't know when the node came back up though, and would ignore it until restarted. Now, as of this release, connections to nodes behind a load balancer re-login periodically, giving them the opportunity to be re-distributed over all available nodes.

Some bugs have been fixed too. Probably the most significant was a cursor leak. If cursors were configured to scale dynamically, then with some databases, they wouldn't be freed when scaling back down. Some other bugs were fixed too though. If you were having some odd kind of trouble, give this release a try.

The complete ChangeLog follows:

  • fixed a sql translation bug related to exists clauses
  • added deployment projects for windows
  • tweaked make.batch install target to install 32-bit files under C:\Program Files (x86)
  • added a timeout parameter to db2 and odbc connect strings
  • fixed a bug that could cause a connection's ttl to fail because a semaphore was left signalled when another connection's ttl expired
  • updated handoff="proxy" code to work with sessionhandler="thread"
  • replaced waitpid call in sqlrscaler with rudiments equivalent
  • got the server-side stuff to compile on windows
  • added configurable fetch buffer sizes to sybase, freetds and db2
  • connections re-distribute themselves periodically if the database is behind a load balancer now
  • fixed a bug that caused sqlrsh to incorrectly interpret internal commands with leading whitespace when run from a script or on the command line
  • fixed a bug that caused cursors not to be completely cleaned up after when dynamic scaling is used
  • fixed a bug that caused the response timeout to be handled improperly
  • added response timeout command to sqlrsh
  • added support for clobs/blobs with firebird
  • fixed a blob-related bug with sqlite
  • added support for blob input binds with db2
  • added support for clob/blob output binds with db2
  • improved clob/blob fetching with db2
  • inputBindClob/Blob methods work with all db's now
  • added -Wno-unknown-pragmas flag (if it it supported) to java build for solaris 8
  • updated default item buffer sizes to 32768 for sybase, freetds, db2 and odbc
  • applied Gerhard Lausser's patch to improve Oracle instantclient detection