Wednesday, May 31, 2017

SQL Relay 1.1.0 Release Announcement

Version 1.1.0 of SQL Relay, the powerful connection pool, load balancer, query router, and database proxy, is now available.

Ubuntu Linux and MariaDB Fixes

Probably the most significant improvements in this release are a set of fixes for modern Ubuntu Linux platforms and the MariaDB LGPL client library.

There were some subtle issues that prevented the configure script from detecting various things correctly on Ubuntu Linux 16 and 17, mainly Python 3 and MariaDB. Systemd/sysvinit detection also failed on Ubuntu 16 and 17. These issues are now fixed.

Also, the MariaDB LGPL client library has/had bugs that caused SQL Relay to either crash when attempting to fetch LOB values, and to report an obtuse error when attempting to reuse a statement handle upon which a previous query failed to prepare (eg. because the query was malformed). Workarounds are now in place for both of these issues, and SQL Relay works well with the MariaDB LGPL client now.

MySQL Front-End Modules

Another significant improvement in this release is to the MySQL Front-End Modules. They are a LOT faster now, and now support getting column info after a statement is prepared, but before the statement is executed, which is the standard paradigm for MySQL apps.

This update significantly increases the number of native MySQL apps which can use SQL Relay as a transparent proxy.

If you tried the modules before and had trouble, then you should definitely try them again.

Other new Features and Enhancements

Of course, this release includes various other new features and enhancements.


First off, versioning has been switched from Semantic Versioning to "intuitive versioning", as follows:

Given a version number MAJOR.MINOR.PATCH, increment the:

  • 1. MAJOR when you make very significant changes and set MINOR and PATCH to 0
  • 2. MINOR when you make backwards-incompatible changes and set PATCH to 0
  • 3. PATCH when you make backwards-compatible changes

Strict Semantic Versioning would have required this release to be 2.0.0, and the changes just weren't intuitively significant enough to warrant that. So, we're going with this versioning scheme for now.

Python 3

The configure script now prefers Python 3 to Python 2. So, if you have both installed, Python 3 will be detected.

Router Updates

The query router (dbase="router") supports a fetchatonce connect-string option now.

Two new router modules have been included in this release too: clientinfolist, and usedatabase.

The clientinfolist module routes sessions based on the free-form value sent to the server by the sqlrconnection::setClientInfo() method, available in the native SQL Relay APIs. See the configuration guide for more detail.

The usedatabase module allows you to switch between databases hosted by multiple instances with a "use database" command. See the configuration guide for more detail.

PostgreSQL Performance Improvement

The PostgreSQL database connection module (dbase="postgresql") uses async functions and fetches one row at a time now, if possible. This yields a performance improvement of about 10% or so.

Connect-String Improvements

The maxselectlist and maxitembuffersize database connect-string parameters have been renamed to maxcolumncount and maxfieldlength to make their purpose more understandable, though the old parameter names still work too.

The MySQL database connection module supports sslmode, tlsversion, sslcrl, and sslcrlpath connect-string options. Though, some of these are only supported by the newest versions of the MySQL client library.

Filter and Trigger Module Improvements

Filter modules can be configured to run before or after the query translation modules have been run now. Trigger modules default to "after" if not specified now.

Selecting and Reporitng the Current Database

Selecting a different database at runtime works with PostgreSQL, Firebird, MDBTools, and SQLite now.

Firebird, MDBTools, and SQLite database connection modules can also report the current database now.


A Rudiments version requirement has been added to the configure script. If it finds a version of the Rudiments library that is too old to use, it will fail now.

The libsqlrclient and libsqlrserver libraries have distinct SONAME_VERSION_INFO now. Eg. libsqlrclient is at 4.0.0 and libsqlrserver is at 5.0.0.

Bug Fixes

The FreeTDS database connection module was apparently concatenating error messages over and over. That's fixed now.

The PDO driver was missing the "quote" method. It's now implemented.

There was a subtle login/ping bug in the router that could cause various obscure problems. That's fixed.

A memory leak was fixed in the sqlrclient protocol module.

The MySQL database connection module checks for valid statement before resetting it now. This fixes potential crashes with certain versions of the MySQL/MariaDB client library.

When faketransactionblocks=yes, there was a bug that could cause begin/commit/rollback to try to send nonexistent column info to the client sometimes. It's not clear what actual problems this caused, but it wasn't correct, and it's fixed now.

The "client info" is properly reset at end-of-session now.

The configure script can find openjdk-1.9.0 correctly now.

PHP ini files are automatically installed on FreeBSD now.

Modern versions of the GNU linker embed the RUNPATH flag rather than RPATH when -R is used. The runtime loader doesn't search the RUNPATH for dependent libraries though, only libraries that were directly linked in. This prevented the Oracle, SAP, DB2, and Informix libs from being loaded unless their installation paths were in the LD_LIBRARY_PATH. To work around this, the -Wl,--disable-new-dtags linker option is used (if supported) now when linking Oracle, SAP, DB2, and Informix database connection modules.

The configure script was ignoring --with-mysql-prefix, and --enable-mysql-rpath didn't work. Both of those bugs are now fixed.