Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: avoid invalid SQL in
raw_config_sql
in crdb_internal.zones
Previously, we could include an invalid `ALTER ... CONFIGURE ZONE USING;` stmt in the `raw_config_sql` column of `crdb_internal.zones`. This was the case when some of the config was inherited and we didn't want to include it for the corresponding object. The contract of this virtual tables allows NULLs in this column, so this commit returns NULL in such cases. Note that I spent non-trivial amount of time trying to figure out how we could end up in this situation but was unsuccessful. This invalid stmt was included into the output of SHOW CREATE TABLE which, among other things, we use when recreating the bundle, so we should now have easier time recreating multi-region bundles. Release note: None
- Loading branch information