mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-25 00:52:02 +00:00
Add extra check to make sure both replicas are present in system.replicas
This commit is contained in:
parent
dc64550536
commit
e4903858c8
@ -1,4 +1,6 @@
|
||||
information_schema tables
|
||||
both default test_03217_system_tables_replica_1 r1
|
||||
both default test_03217_system_tables_replica_2 r2
|
||||
default test_03217_system_tables_replica_1 r1
|
||||
1
|
||||
1
|
||||
|
@ -8,6 +8,8 @@ CREATE TABLE test_03217_system_tables_replica_2(x UInt32)
|
||||
ENGINE ReplicatedMergeTree('/clickhouse/tables/{database}/test_03217_system_tables_replica', 'r2')
|
||||
ORDER BY x;
|
||||
|
||||
-- Make sure we can read both replicas
|
||||
SELECT 'both', database, table, replica_name FROM system.replicas WHERE database = currentDatabase();
|
||||
-- If filtering is not done correctly on database-table column, then this query report to read 2 rows, which are the above tables
|
||||
SELECT database, table, replica_name FROM system.replicas WHERE database = currentDatabase() AND table = 'test_03217_system_tables_replica_1' AND replica_name = 'r1';
|
||||
SYSTEM FLUSH LOGS;
|
||||
|
Loading…
Reference in New Issue
Block a user