Comparing v6.65.1...v6.66.0 · googleapis/java-spanner (original) (raw)
Commits on May 3, 2024
- Configuration menu
Browse the repository at this point in the history - feat: allow DDL with autocommit=false (#3057)
Adds support for running DDL statements when a connection is in autocommit=false mode. By default, DDL statements are only allowed when no transaction is active. That is; no query or DML statement has been executed which activated a read/write transaction.
A new flag is added that can be used to revert the behavior back to the original behavior where DDL is always refused when autocommit=false. The same flag can also be used to make the API behave the same as MySQL and Oracle, where any active transaction is automatically committed whenever a DDL statement is encountered.
Concretely this means that the following is now allowed:
set autocommit=false;
create table Singers (SingerId INT64, Name STRING(MAX)) PRIMARY KEY (SingerId);
The following is by default NOT allowed, unless
ddlInTransactionMode=AUTO_COMMIT_TRANSACTION
set autocommit=false;
select * from singers; -- This starts a transaction
create table Albums (AlbumId INT64) PRIMARY KEY (AlbumId); -- This is not allowed
Configuration menu
Browse the repository at this point in the history
3. Configuration menu
Browse the repository at this point in the history
4. chore: use gson Java version util (#3085)
Uses the gson Java version checker, which is more production-hardened than the custom one in the Spanner client. It seems that the Spanner implementation does not get it right on all versions on Windows.
Configuration menu
Browse the repository at this point in the history
5. Configuration menu
Browse the repository at this point in the history
6. Configuration menu
Browse the repository at this point in the history
7. Configuration menu
Browse the repository at this point in the history
8. Configuration menu
Browse the repository at this point in the history
9. Configuration menu
Browse the repository at this point in the history
10. Configuration menu
Browse the repository at this point in the history