-
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: partition number disappear after altering table options
- Loading branch information
1 parent
b33894c
commit 996167b
Showing
3 changed files
with
85 additions
and
26 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
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; |