Tuesday, September 15, 2020

Rudiments 1.3.1 Release Announcement

Version 1.3.1 of Rudiments, the C++ class library for developing systems and applications, is now available.

This patch release fixes a bug in the rpm spec file and a missing library dependency in the link command for librudiments-apache.

Tuesday, August 25, 2020

SQL Relay 1.8.0 Release Announcement

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

This release mainly lays the groundwork for some future features, including a generic import/export framework. Some notable progress was also made on the JDBC driver, though it's still not finished. The most significant (finshed) new feature is an aes128 password encryption module.

There are some bugfixes as well. A long-standing issue with postgresql that could cause results from multiple open cursors to get confused has been resolved. A subtle error that could cause counting of bind variables on the client-side to hang has been fixed. A long-standing, but apparently obscure, issue that could cause tables from other MySQL schemas to be included in a "show tables" command has been fixed. As well as various other issues.

Full ChangeLog follows:

  • unattended tests
  • added sqlrresultsetdomnode class to c++ client API
  • fixed datedelimiters parameter
  • added support for SQLParamOptions with SQLUINTEGER arguments
  • sqlr-import detects uppercase .CSV suffix now
  • fixed a csv number-detection but in sqlr-import
  • fixed a delete[] of a const in sqlr-import
  • it's possible to specify a commitcount of 0 with sqlr-import now
  • moved sqlrimportxml/csv classes into libsqlrclient
  • moved sqlrexportxml/csv classes into libsqlrclient
  • csv import/export is consistent now
  • added some event methods to sqlrexport
  • migrated parsedatetime functions to rudiments datetime class
  • different postgresql cursors use different stmtNames now
  • sqlrimportcsv can create a primary key that's not in the CSV now
  • sqlrexportcsv quotes 12+ digit numbers now
  • fixed subtle, count-related issues when validating bind variables on the client side, that could cause a hang
  • added an aes128 pwdenc module
  • applied a patch to fix a crash in the debug logger (missing "%s")
  • added a tweak to getsitearchdir.rb to fix incorrect lib/lib64 reporting on some centos x64 systems
  • fixed mysql getColumnList to distinquish proper db/schema

Rudiments 1.3.0 Release Announcement

Version 1.3.0 of Rudiments, the C++ class library for developing systems and applications, is now available.

This release mainly featured integration of code from other projects. The remnants of the old firstworks project "stencil" have been merged in, as well as some MVC base classes from other projects. Some date-time parsing code from SQL Relay has been pushed down into the datetime class.

There are some new features as well - most notably an encryption framework and aes128 class. There are also sax/dom parsers for CSV, ini, and java-style properties files as well, similar to the xml/json sax/dom classes.

The logger classes have been refactored a bit, in back-incompatible ways. Thus the minor version bump.

Full ChangeLog follows:

  • unattended tests
  • added support for escaping single/double-quotes to templateengine
  • migrated in clasess from stencil project
  • added librudiments-apache
  • added \r\n support when parsing CSVs
  • integrated MVC base classes from other projects
  • added inisax/inidom and propsax/propdom classes
  • added cronschedule class
  • added logger start/end methods
  • logger string-write works like printf now
  • logger indent uses uint32_t now
  • removed some unused logger::write() methods
  • added a log level to the logger class
  • process::spawn()'s forked child exits if exec() fails now
  • charstring::replace() methods are null-safe now
  • migrated datetime::parse() and datetime::formatAs() from sqlrelay
  • csvsax accepts empty (or all whitespace) files now
  • logger::write() is null-safe now
  • base64encode is whitespace-safe now
  • added support for 5-part dates and day-month-year 4-part dates
  • added datetime::getWeekOfYear
  • added file::extension
  • added directory::createTemporaryDirectory
  • added directory::removeTree
  • added encryption interface
  • added aes128 encryption
  • added charstring::startsWith/endsWith

Monday, January 6, 2020

SQL Relay 1.7.0 Release Announcement

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

This release adds 2 significant features: support for the PostgreSQL client-server protocol, and a "replay" module to help automatically recover from deadlocks and lock-timeouts, but also has the usual assortment of minor bugfixes and internal changes.



PostgreSQL Client-Server Protocol

SQL Relay has supported the MySQL client-server protocol for several minor releases, enabling MySQL applications to take advantage of SQL Relay's features by aiming SQL Relay at the database(s) and aiming the application at SQL Relay. It has been a server-only solution requiring no modification of the client application or even any installation of software on the client system.

Release 1.7.0 features similar support for the PostgreSQL client-server protocol. PostgreSQL applications can now take advantage of SQL Relay's features by aiming SQL Relay at the database(s) and aiming the application at SQL Relay. It is also a server-only solution requiring no modification of the client application or even any installation of software on the client system.

See the SQL Relay Configuration Guide for configuration details.


Replay Module

"How do I handle database deadlocks!?"

The answer is usually: figure out which queries are deadlocking and rewrite them to be less likely to deadlock. When that fails, the prescribed solution is to rewrite your application to detect the deadlock and either rerun the previous query (eg. with Oracle) or rerun all queries in the current transaction (eg. with MySQL).

While rewriting queries to be less likely to deadlock might be possible in some cases, rewriting applications to record queries and be able to replay entire transactions is unrealistic. It is especially unrealistic if you consider the trouble involved with doing an insert into a table with an auto-increment column, followed by updates that use the generated id.

But, while it might be unrealistic for applications, it's not terribly unrealistic for a database proxy like SQL Relay.

This release of SQL Relay provides a "replay" module, which can be configured to record and replay either the previous query, or previous transactions-worth of queries upon detecting a deadlock, lock timeout, or other condition. It even correctly rewrites the inserts that it records to handle auto-increment columns.

See the SQL Relay Configuration Guide for configuration details.



Full ChangeLog follows:

  • added postgresql protocol module
  • updated postgresql connection module to get column info pre-execute
  • fixed postgresql connection module type oid bug
  • added tag filter/moduledata
  • added moduledata(s)::closeResultSet()/endTransaction()/endSession()
  • mysql protocol returns empty lobs correctly now (not as nulls)
  • configure replaces -lfbclient with -lgds on freebsd/firebird-2.0.3
  • fixed a bug that could cause sqlr-stop to try to kill pid 0
  • fixed unixodbc detection on solaris 11.4
  • added configure test for PQdescribePrepared
  • test improvements
  • documentation improvements
  • split sqlrelay-crash directive into its own module
  • deprecated drop-in replacement libraries in favor of protocol support
  • fixed various mysql 4.x bugs
  • sqlr-status creates statistics on heap now instead of stack, to work on platforms with a small default ulimit stack
  • mysql stored procedure test is bypassed for older mysql
  • tls test is bypassed for older openssl
  • added NULL handoff socket workaround
  • improved shutdown/crash handlers for sqlr-listener/connection
  • fixed hang when more-than-one address was specified in the instance:addresses attribute
  • *_null used instead of *_unset on PHP 7.4

Rudiments 1.2.2 Release Announcement

Version 1.2.2 of Rudiments, the C++ class library for developing systems and applications, is now available.

This is a minor bug-fix release. ChangeLog follows:

  • fixed another long-standing charstring::httpEscape bug
  • -Wno-deprecated-declarations is now included if possible
  • added configure tests for RB_HALT/AUTOBOOT (enums on solaris 11.4)
  • certificate tests use sha1 if sha256 is unavailable
  • filedescriptor::pvt->_lstnr is initialzed to NULL in clone operation now
  • listener::listen() safely handles non pollin/out events now
  • removed waitForChildren() from shutdown/crash handlers
  • sigsuspend() fails if errno!=EINTR now instead of whether it returns -1
  • filtered out -Wl,-Bsymbolic-functions -Wl,-z,relro from krb5-config