Conversation
Internal metadata queries should always be allowed, regardless of the type of transaction that is currently running or any special mode that has been set on the connection. Internal metadata queries are system queries that are generated by a connection to return metadata to an application, for example methods like getTables() in JDBC.
| DML | ||
| } | ||
|
|
||
| /** |
There was a problem hiding this comment.
This was dead code. Only the class in the public Connection interface was used.
| final ParsedStatement statement, | ||
| AnalyzeMode analyzeMode, | ||
| QueryOption... options) { | ||
| if (options != null) { |
There was a problem hiding this comment.
This special handling is no longer needed, as it is generically handled in the connection.
| } | ||
|
|
||
| @Test | ||
| public void testExecuteMetadataQuery() { |
There was a problem hiding this comment.
This test specifically checked whether a DDL batch could execute an internal metadata query. That is no longer needed, as a DDL batch no longer handles that special case itself. Instead, this is handled directly in the connection for all types of transactions.
| } | ||
|
|
||
| @Test | ||
| public void testExecuteMetadataQuery() { |
There was a problem hiding this comment.
This test specifically checked whether a DDL batch could execute an internal metadata query. That is no longer needed, as a DDL batch no longer handles that special case itself. Instead, this is handled directly in the connection for all types of transactions.
…is/java-spanner into allow-internal-metadata-queries
rajatbhatta
left a comment
There was a problem hiding this comment.
LGTM, apart from just one nit.
google-cloud-spanner/src/main/java/com/google/cloud/spanner/connection/ConnectionImpl.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Rajat Bhatta <93644539+rajatbhatta@users.noreply.github.com>
🤖 I have created a release *beep* *boop* --- ## [6.45.1](https://togithub.com/googleapis/java-spanner/compare/v6.45.0...v6.45.1) (2023-08-11) ### Bug Fixes * Always allow metadata queries ([#2580](https://togithub.com/googleapis/java-spanner/issues/2580)) ([ebb17fc](https://togithub.com/googleapis/java-spanner/commit/ebb17fc8aeac5fc75e4f135f33dba970f2480585)) --- This PR was generated with [Release Please](https://togithub.com/googleapis/release-please). See [documentation](https://togithub.com/googleapis/release-please#release-please).
Internal metadata queries should always be allowed, regardless of the type of transaction that is currently running or any special mode that has been set on the connection. Internal metadata queries are system queries that are generated by a connection to return metadata to an application, for example methods like getTables() in JDBC.