-
Notifications
You must be signed in to change notification settings - Fork 387
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database returned by CreateDatabase() does not contain a set database_dialect #8573
Labels
api: spanner
Issues related to the Spanner API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Comments
devbww
added a commit
to devbww/google-cloud-cpp
that referenced
this issue
Mar 23, 2022
Extend existing tests to also cover `database_dialect`by setting it in the CreateDatabaseRequest, and expecting it in Database and Backup responses. Include allowances for these being invisible to the Spanner emulator, and for pending bug googleapis#8573. In particular, BackupIntegrationTest.BackupRestore leaves the dialect unspecified in CreateDatabase() (but expects to see GOOGLE_STANDARD_SQL in responses), while it is set explicitly to GOOGLE_STANDARD_SQL in DatabaseAdminClientTest.VersionRetentionPeriodCreate, and to POSTGRESQL in BackupExtraIntegrationTest.BackupRestoreWithCMEK. DatabaseAdminClientTest.DatabasePostgreSQLBasics is a new test case that also exercises the non-backup parts of an explicit POSTGRESQL setting. [Aside: These are only in the tests for the generated database admin client.] Finally, add ClientIntegrationTest.DatabaseDialect to enumerate the `database_dialect` value from `INFORMATION_SCHEMA.DATABASE_OPTIONS` for a default-dialect database.
devbww
added a commit
that referenced
this issue
Mar 24, 2022
Extend existing tests to also cover `database_dialect`by setting it in the CreateDatabaseRequest, and expecting it in Database and Backup responses. Include allowances for these being invisible to the Spanner emulator, and for pending bug #8573. In particular, BackupIntegrationTest.BackupRestore leaves the dialect unspecified in CreateDatabase() (but expects to see GOOGLE_STANDARD_SQL in responses), while it is set explicitly to GOOGLE_STANDARD_SQL in DatabaseAdminClientTest.VersionRetentionPeriodCreate, and to POSTGRESQL in BackupExtraIntegrationTest.BackupRestoreWithCMEK. DatabaseAdminClientTest.DatabasePostgreSQLBasics is a new test case that also exercises the non-backup parts of an explicit POSTGRESQL setting. [Aside: These are only in the tests for the generated database admin client.] Finally, add ClientIntegrationTest.DatabaseDialect to enumerate the `database_dialect` value from `INFORMATION_SCHEMA.DATABASE_OPTIONS` for a default-dialect database.
devbww
added a commit
to devbww/google-cloud-cpp
that referenced
this issue
May 20, 2022
Setting of `database_dialect` in the `CreateDatabase()` result has been fixed. `RestoreDatabase()`, however, remains an issue. Part of googleapis#8573.
Setting of |
devbww
added a commit
to devbww/google-cloud-cpp
that referenced
this issue
Jul 21, 2022
devbww
added a commit
that referenced
this issue
Jul 22, 2022
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
api: spanner
Issues related to the Spanner API.
priority: p2
Moderately-important priority. Fix may not be included in next release.
type: bug
Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
The "Client Library Spec for Dialect Aware Database" doc says, "Check that a database created with the DATABASE_DIALECT_UNSPECIFIED dialect has the dialect set as GOOGLE_STANDARD_SQL in the creation response, in GetDatabase, in ListDatabases and in RestoreDatabase."
My testing indicates that the
Database
message returned byCreateDatabase()
does not contain a setGOOGLE_STANDARD_SQL
database_dialect field when theCreateDatabaseRequest
has an unset or explicitDATABASE_DIALECT_UNSPECIFIED
database_dialect field.Similarly, the
Database
message returned byRestoreDatabase()
does not contain a setGOOGLE_STANDARD_SQL
database_dialect field when the source database was created with an unset or explicitDATABASE_DIALECT_UNSPECIFIED
database_dialect field.GetDatabase()
andListDatabases()
do reportGOOGLE_STANDARD_SQL
for such a database, and its restoration.I think I agree with the doc's idea of how this should work, and in which case I'd say its a bug.
The text was updated successfully, but these errors were encountered: