-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15127 from ucasFL/add-mutation-for-storagememory
Add mutation support for StorageMemory
- Loading branch information
Showing
8 changed files
with
175 additions
and
29 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
14 changes: 14 additions & 0 deletions
14
tests/queries/0_stateless/01497_mutation_support_for_storage_memory.reference
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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
1 1 | ||
2 2 | ||
3 3 | ||
4 4 | ||
5 5 | ||
100 1 | ||
2 2 | ||
3 3 | ||
4 4 | ||
5 5 | ||
2 2 | ||
3 3 | ||
4 4 | ||
5 5 |
20 changes: 20 additions & 0 deletions
20
tests/queries/0_stateless/01497_mutation_support_for_storage_memory.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 |
---|---|---|
@@ -0,0 +1,20 @@ | ||
DROP TABLE IF EXISTS defaults; | ||
CREATE TABLE defaults | ||
( | ||
n Int32, | ||
s String | ||
)ENGINE = Memory(); | ||
|
||
INSERT INTO defaults VALUES(1, '1') (2, '2') (3, '3') (4, '4') (5, '5'); | ||
|
||
SELECT * FROM defaults; | ||
|
||
ALTER TABLE defaults UPDATE n = 100 WHERE s = '1'; | ||
|
||
SELECT * FROM defaults; | ||
|
||
ALTER TABLE defaults DELETE WHERE n = 100; | ||
|
||
SELECT * FROM defaults; | ||
|
||
DROP TABLE defaults; |
Empty file.
11 changes: 11 additions & 0 deletions
11
tests/queries/0_stateless/01498_alter_column_storage_memory.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
DROP TABLE IF EXISTS defaults; | ||
CREATE TABLE defaults | ||
( | ||
n Int32, | ||
s String | ||
)ENGINE = Memory(); | ||
|
||
ALTER TABLE defaults ADD COLUMN m Int8; -- { serverError 48 } | ||
ALTER TABLE defaults DROP COLUMN n; -- { serverError 48 } | ||
|
||
DROP TABLE defaults; |
10 changes: 10 additions & 0 deletions
10
tests/queries/0_stateless/01507_multiversion_storage_for_storagememory.reference
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 |
---|---|---|
@@ -0,0 +1,10 @@ | ||
0 | ||
1 | ||
2 | ||
3 | ||
4 | ||
5 | ||
6 | ||
7 | ||
8 | ||
9 |
15 changes: 15 additions & 0 deletions
15
tests/queries/0_stateless/01507_multiversion_storage_for_storagememory.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
DROP TABLE IF EXISTS defaults; | ||
CREATE TABLE defaults | ||
( | ||
n Int32 | ||
)ENGINE = Memory(); | ||
|
||
INSERT INTO defaults SELECT * FROM numbers(10); | ||
|
||
SELECT * FROM defaults; | ||
|
||
TRUNCATE defaults; | ||
|
||
SELECT * FROM defaults; | ||
|
||
DROP TABLE defaults; |