mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 09:02:00 +00:00
Merge pull request #16209 from ClickHouse/fix_replicated_mutations_test
Fix 00652_replicated_mutations test
This commit is contained in:
commit
09acceadf7
@ -15,12 +15,10 @@ INSERT INTO mutations_r1 VALUES (123, 1), (234, 2), (345, 3);
|
|||||||
CREATE TABLE for_subquery(x UInt32) ENGINE TinyLog;
|
CREATE TABLE for_subquery(x UInt32) ENGINE TinyLog;
|
||||||
INSERT INTO for_subquery VALUES (234), (345);
|
INSERT INTO for_subquery VALUES (234), (345);
|
||||||
|
|
||||||
ALTER TABLE mutations_r1 UPDATE y = y + 1 WHERE x IN for_subquery;
|
ALTER TABLE mutations_r1 UPDATE y = y + 1 WHERE x IN for_subquery SETTINGS mutations_sync = 2;
|
||||||
ALTER TABLE mutations_r1 UPDATE y = y + 1 WHERE x IN (SELECT x FROM for_subquery);
|
ALTER TABLE mutations_r1 UPDATE y = y + 1 WHERE x IN (SELECT x FROM for_subquery) SETTINGS mutations_sync = 2;
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
wait_for_mutation "mutations_r1" "0000000001"
|
|
||||||
|
|
||||||
${CLICKHOUSE_CLIENT} --query="SELECT * FROM mutations_r1"
|
${CLICKHOUSE_CLIENT} --query="SELECT * FROM mutations_r1"
|
||||||
|
|
||||||
${CLICKHOUSE_CLIENT} --query="DROP TABLE mutations_r1"
|
${CLICKHOUSE_CLIENT} --query="DROP TABLE mutations_r1"
|
||||||
|
@ -26,8 +26,8 @@ ${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE nonexistent
|
|||||||
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE d = '11'" 2>/dev/null || echo "Query should fail 2"
|
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE d = '11'" 2>/dev/null || echo "Query should fail 2"
|
||||||
|
|
||||||
# Delete some values
|
# Delete some values
|
||||||
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE x % 2 = 1"
|
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE x % 2 = 1 SETTINGS mutations_sync = 2"
|
||||||
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE s = 'd'"
|
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE s = 'd' SETTINGS mutations_sync = 2"
|
||||||
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE m = 3 SETTINGS mutations_sync = 2"
|
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_r1 DELETE WHERE m = 3 SETTINGS mutations_sync = 2"
|
||||||
|
|
||||||
# Insert more data
|
# Insert more data
|
||||||
@ -62,8 +62,8 @@ ${CLICKHOUSE_CLIENT} --query="CREATE TABLE mutations_cleaner_r2(x UInt32) ENGINE
|
|||||||
${CLICKHOUSE_CLIENT} --query="INSERT INTO mutations_cleaner_r1(x) VALUES (1), (2), (3), (4)"
|
${CLICKHOUSE_CLIENT} --query="INSERT INTO mutations_cleaner_r1(x) VALUES (1), (2), (3), (4)"
|
||||||
|
|
||||||
# Add some mutations and wait for their execution
|
# Add some mutations and wait for their execution
|
||||||
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_cleaner_r1 DELETE WHERE x = 1"
|
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_cleaner_r1 DELETE WHERE x = 1 SETTINGS mutations_sync = 2"
|
||||||
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_cleaner_r1 DELETE WHERE x = 2"
|
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_cleaner_r1 DELETE WHERE x = 2 SETTINGS mutations_sync = 2"
|
||||||
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_cleaner_r1 DELETE WHERE x = 3 SETTINGS mutations_sync = 2"
|
${CLICKHOUSE_CLIENT} --query="ALTER TABLE mutations_cleaner_r1 DELETE WHERE x = 3 SETTINGS mutations_sync = 2"
|
||||||
|
|
||||||
# Add another mutation and prevent its execution on the second replica
|
# Add another mutation and prevent its execution on the second replica
|
||||||
|
Loading…
Reference in New Issue
Block a user