Merge pull request #16602 from ClickHouse/test-mutation-subquery

Add a test for #7039
This commit is contained in:
alexey-milovidov 2020-11-03 13:39:40 +03:00 committed by GitHub
commit 726e9c734b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 0 deletions

View File

@ -0,0 +1,2 @@
1 2
---

View File

@ -0,0 +1,11 @@
DROP TABLE IF EXISTS t;
CREATE TABLE t(`id` String, `dealer_id` String) ENGINE = MergeTree() ORDER BY id SETTINGS index_granularity = 8192;
insert into t(id, dealer_id) values('1','2');
SELECT * FROM t;
SET mutations_sync = 1;
ALTER TABLE t DELETE WHERE id in (select id from t as tmp);
SELECT '---';
SELECT * FROM t;
DROP TABLE t;