Files
scylladb/test/cql/cdc_batch_delete_postimage_test.result
Calle Wilund 7e345e37e8 cql/cdc_batch_delete_postimage_test - rename test files + fix result
The tests, when added, where not named kosher (*_test), which the
runner apparently quaintly, require to pick it up (instead of the more
sensisble *.cql).

Thusly, the test was never run beyond initial creation, and also
bit-rotted slightly during behaviour changes.

Renamed and re-resulted.

Closes #8581
2021-05-04 12:47:33 +03:00

112 lines
2.1 KiB
Plaintext

-- do range delete in batch
create table ks.t (pk int, ck int, v int, primary key(pk, ck)) with cdc = {'enabled': true, 'preimage': true, 'postimage': true};
{
"status" : "ok"
}
begin batch insert into ks.t (pk, ck, v) values (1, 1, 100); delete from t where pk = 1 and ck >= 1 and ck <= 2; apply batch;
{
"status" : "ok"
}
select "cdc$batch_seq_no", "cdc$operation", pk, ck, v from t_scylla_cdc_log;
{
"rows" :
[
{
"cdc$batch_seq_no" : "0",
"cdc$operation" : "2",
"ck" : "1",
"pk" : "1",
"v" : "100"
},
{
"cdc$batch_seq_no" : "1",
"cdc$operation" : "5",
"ck" : "1",
"pk" : "1"
},
{
"cdc$batch_seq_no" : "2",
"cdc$operation" : "7",
"ck" : "2",
"pk" : "1"
}
]
}
-- do pk delete in batch
create table ks.t2 (pk int, ck int, v int, primary key(pk, ck)) with cdc = {'enabled': true, 'preimage': true, 'postimage': true};
{
"status" : "ok"
}
begin batch insert into ks.t2 (pk, ck, v) values (1, 1, 100); delete from t2 where pk = 1; apply batch;
{
"status" : "ok"
}
select "cdc$batch_seq_no", "cdc$operation", pk, ck, v from t2_scylla_cdc_log;
{
"rows" :
[
{
"cdc$batch_seq_no" : "0",
"cdc$operation" : "2",
"ck" : "1",
"pk" : "1",
"v" : "100"
},
{
"cdc$batch_seq_no" : "1",
"cdc$operation" : "4",
"pk" : "1"
}
]
}
-- do range delete in batch, but not matcing ck
create table ks.t3 (pk int, ck int, v int, primary key(pk, ck)) with cdc = {'enabled': true, 'preimage': true, 'postimage': true};
{
"status" : "ok"
}
-- do range delete in batch
begin batch insert into ks.t3 (pk, ck, v) values (1, 1, 100); delete from t3 where pk = 1 and ck >= 2 and ck <= 3; apply batch;
{
"status" : "ok"
}
select "cdc$batch_seq_no", "cdc$operation", pk, ck, v from t3_scylla_cdc_log;
{
"rows" :
[
{
"cdc$batch_seq_no" : "0",
"cdc$operation" : "2",
"ck" : "1",
"pk" : "1",
"v" : "100"
},
{
"cdc$batch_seq_no" : "1",
"cdc$operation" : "5",
"ck" : "2",
"pk" : "1"
},
{
"cdc$batch_seq_no" : "2",
"cdc$operation" : "7",
"ck" : "3",
"pk" : "1"
},
{
"cdc$batch_seq_no" : "3",
"cdc$operation" : "9",
"ck" : "1",
"pk" : "1",
"v" : "100"
}
]
}