Add test alter_scalar_circular_deadlock

This commit is contained in:
vdimir 2021-10-21 14:17:53 +03:00
parent ed0bb2cec2
commit b720b244ef
No known key found for this signature in database
GPG Key ID: 9B404D301C0CC7EB
2 changed files with 19 additions and 0 deletions

View File

@ -0,0 +1,17 @@
DROP TABLE IF EXISTS foo;
CREATE TABLE foo (ts DateTime, x UInt64)
ENGINE = MergeTree PARTITION BY toYYYYMMDD(ts)
ORDER BY (ts);
INSERT INTO foo (ts, x) SELECT toDateTime('2020-01-01 00:05:00'), number from system.numbers_mt LIMIT 10;
SET mutations_sync = 1;
ALTER TABLE foo UPDATE x = 1 WHERE x = (SELECT x from foo WHERE x = 4);
SELECT sum(x) == 42 FROM foo;
ALTER TABLE foo UPDATE x = 1 WHERE x IN (SELECT x FROM foo WHERE x != 0);
SELECT sum(x) == 9 FROM foo;