Version 3.5.0 of libzdb is available:
Download: https://www.tildeslash.com/libzdb/dist/libzdb-3.5.0.tar.gz SHA256 checksum: 90c79bf23b0c8fcb6543634844d17c094a24a360c9d63ddf6efc3741ebec32c5
Please see the release notes at https://tildeslash.com/libzdb/#release_notes
Notably, this release introduces Exception_frame.errorCode, which provides the numeric error code from the underlying database when available. This allows for more robust error handling. Thanks to Till for suggesting this feature. Example:
TRY Connection_execute(c, sql); ELSE if (Exception_frame.errorCode == ER_LOCK_DEADLOCK) { // MySQL error code 1213 // Handle deadlock - consider retry } else { printf("Database error (%d): %s\n", Exception_frame.errorCode, Exception_frame.message); } END_TRY;
Exception.h has been updated with detailed information on how to use the new errorCode for all databases. See https://tildeslash.com/libzdb/api-docs/Exception_8h.html