forked from cockroachdb/cockroach
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: dump puts INTERLEAVE statements outside of CREATE TABLE statements
Fix bug where dump would include INTERLEAVE IN PARENT statements inside of CREATE TABLE statements. CRDB currently does not support this, thus forcing the user to manually edit the dump files to remove the INTERLEAVE statements themselves. Previousily, crdb_internal.go would use show_create.go to create the SHOW CREATE TABLE statements which would include INTERLEAVE. crdb_internal.go would also add ALTER STATEMENTs separately to the alter_statements of the create statements of the table. This change removes the addition of the INTERLEAVE within show_create.go, and included the additon of adding the INTERLEAVE statements to the alter_statements within crdb_internal.go. A bug was also fixed in structured.go in the SQLString method that created the SQL string out of order when a non-empty table name is passed in. The bug caused the "ON tablename" to be printed before the index and without space in between the two. Resolves: cockroachdb#35462 Release Note (bug fix): dump now works properly when handling INTERLEAVED tables, printing them outside of CREATE TABLE statements.
- Loading branch information
Tyler314
committed
Aug 9, 2019
1 parent
95968ee
commit fa685c8
Showing
7 changed files
with
133 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters