-
Notifications
You must be signed in to change notification settings - Fork 315
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: bugs introduced by alter table options (#4953)
* fix: ChangeTableOptions display * fix: partition number disappear after altering table options * Update src/table/src/metadata.rs Co-authored-by: Ruihang Xia <[email protected]> --------- Co-authored-by: Lei, HUANG <[email protected]> Co-authored-by: Ruihang Xia <[email protected]>
- Loading branch information
1 parent
22a662f
commit 305767e
Showing
5 changed files
with
106 additions
and
33 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
18 changes: 15 additions & 3 deletions
18
tests/cases/standalone/common/alter/alter_table_options.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,31 @@ | ||
CREATE TABLE ato(i INTEGER, j TIMESTAMP TIME INDEX); | ||
CREATE TABLE ato(i INTEGER, j TIMESTAMP TIME INDEX, PRIMARY KEY(i)); | ||
|
||
INSERT INTO ato VALUES(1, now()), (2, now()); | ||
|
||
SELECT i FROM ato; | ||
|
||
ALTER TABLE ato SET 'ttl'='1d'; | ||
|
||
SELECT i FROM ato; | ||
|
||
SHOW CREATE TABLE ato; | ||
|
||
ALTER TABLE ato SET 'ttl'='2d'; | ||
|
||
SELECT i FROM ato; | ||
|
||
SHOW CREATE TABLE ato; | ||
|
||
ALTER TABLE ato SET 'ttl'=NULL; | ||
|
||
SELECT i FROM ato; | ||
|
||
SHOW CREATE TABLE ato; | ||
|
||
ALTER TABLE ato SET 'ttl'='0d'; | ||
ALTER TABLE ato SET 'ttl'='1s'; | ||
|
||
SHOW CREATE TABLE ato; | ||
|
||
DROP TABLE ato; | ||
SELECT i FROM ato; | ||
|
||
DROP TABLE ato; |