-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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 #52517 from CurtizJ/fix-drop-of-projection
Fix lightweight delete after drop of projection
- Loading branch information
Showing
3 changed files
with
25 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
99 |
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 @@ | ||
SET mutations_sync = 2; | ||
|
||
DROP TABLE IF EXISTS t_projections_lwd; | ||
|
||
CREATE TABLE t_projections_lwd (a UInt32, b UInt32, PROJECTION p (SELECT * ORDER BY b)) ENGINE = MergeTree ORDER BY a; | ||
|
||
INSERT INTO t_projections_lwd SELECT number, number FROM numbers(100); | ||
|
||
-- LWD does not work, as expected | ||
DELETE FROM t_projections_lwd WHERE a = 1; -- { serverError BAD_ARGUMENTS } | ||
KILL MUTATION WHERE database = currentDatabase() AND table = 't_projections_lwd' SYNC FORMAT Null; | ||
|
||
-- drop projection | ||
ALTER TABLE t_projections_lwd DROP projection p; | ||
|
||
DELETE FROM t_projections_lwd WHERE a = 2; | ||
|
||
SELECT count() FROM t_projections_lwd; | ||
|
||
DROP TABLE t_projections_lwd; |