-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[YSQL] #1175: Cascade truncate indexes
Summary: This revision fixes an issue with the TRUNCATE statement where indexes on a table are not truncated when the table is truncated. For example, ``` # create table test (id int primary key, value int); CREATE TABLE # create unique index unique_idx on test (value); CREATE INDEX # insert into test values (1, 2); INSERT 0 1 # truncate test; TRUNCATE TABLE # select * from test; id | value ----+------- (0 rows) # insert into test values(1, 2); ERROR: duplicate key value violates unique constraint "unique_idx" ``` The associated indexes are now truncated along with the base table in this revision. A few miscellaneous code cleanups are also included in this diff. Test Plan: yb_create_index Reviewers: neha, mihnea Reviewed By: mihnea Subscribers: yql Differential Revision: https://phabricator.dev.yugabyte.com/D6552
- Loading branch information
1 parent
9cfdfc9
commit b7fa3d9
Showing
11 changed files
with
100 additions
and
298 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
Oops, something went wrong.