The embedded version of HSQL is Chapter 9. SQL Syntax
<installation_directory>/program/classes/hsqldb.jar is the unmodified Java library (compressed 754975 bytes).
How about CHECK CAST("XID" AS LONG)>999999999
?
By the way: Embedded databases should never be used for productive tasks. As your database grows, it becomes more likely that you lose all your data because the whole db is extracted to a temp. directory and wrapped back into the odb (which is a zip archive) when closing the session.
It is fairly easy to re-connect your Base document with an extracted stand-alone version of your database and upgrade the driver. Apache OpenOffice Community Forum - [Python] Macro to extract and reconnect embedded HSQLDB - (View topic)
It is fairly easy to connect Base with PostgreSQL, MySQL or any other relational database providing access via ODBC or JDBC. There are also native LibreOffice drivers (SDBC) for MySQL and Postgre.