File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -2528,8 +2528,16 @@ func TestLogicalReplicationCreationChecks(t *testing.T) {
25282528 expectErr (t , "tab" , "cannot create logical replication stream: table tab has a partial index partial_idx" )
25292529 replicationtestutils .WaitForAllProducerJobsToFail (t , dbB )
25302530
2531- // Check for virtual computed columns that are a key of a secondary index .
2531+ // Check for hash sharded indexes .
25322532 dbA .Exec (t , "DROP INDEX partial_idx" )
2533+ dbA .Exec (t , "CREATE INDEX hash_idx ON tab(pk) USING HASH WITH (bucket_count = 4)" )
2534+ dbB .Exec (t , "CREATE INDEX hash_idx ON b.tab(pk) USING HASH WITH (bucket_count = 4)" )
2535+ expectErr (t , "tab" , "tab has a virtual computed column crdb_internal_pk_shard_4 that is a key of index hash_idx" )
2536+ replicationtestutils .WaitForAllProducerJobsToFail (t , dbB )
2537+ dbA .Exec (t , "DROP INDEX hash_idx" )
2538+ dbB .Exec (t , "DROP INDEX hash_idx" )
2539+
2540+ // Check for virtual computed columns that are a key of a secondary index.
25332541 dbA .Exec (t , "ALTER TABLE tab ADD COLUMN virtual_col INT NOT NULL AS (pk + 1) VIRTUAL" )
25342542 dbB .Exec (t , "ALTER TABLE b.tab ADD COLUMN virtual_col INT NOT NULL AS (pk + 1) VIRTUAL" )
25352543 dbA .Exec (t , "CREATE INDEX virtual_col_idx ON tab(virtual_col)" )
You can’t perform that action at this time.
0 commit comments