I assume that you are using the official Google Open Source JDBC driver.
The error you are getting indicates that you are trying to query the INFORMATION_SCHEMA
tables while a read/write transaction is active. You should switch to either autocommit mode or to a read-only transaction. You can do so using one of the following SQL statements, or by setting the appropriate mode through code:
- Switch to autocommit:
SET AUTOCOMMIT=TRUE
- Switch to read-only:
SET READ ONLY=TRUE
It should be sufficient to turn on only one of these two modes, but switching on both should also work.
If that does not work, or if my initial assumption is not correct: Could you share some more information about which JDBC driver you are using and how you are connecting to the database?
Additional information: There is now a community based Liquibase integration for Cloud Spanner here: https://github.com/cloudspannerecosystem/liquibase-spanner