blob: 1abf7996d8aad777d9e5c1d347e139ec7dd38560 [file]
-- @Description Tests that DML operatins change the modification count.
--
DROP TABLE IF EXISTS ao;
DROP
CREATE TABLE ao (a INT, b INT) USING @amname@;
CREATE
INSERT INTO ao SELECT i as a, i as b FROM generate_series(1,10) AS i;
INSERT 10
SELECT state, tupcount, modcount FROM gp_ao_or_aocs_seg('ao');
state | tupcount | modcount
-------+----------+----------
1 | 1 | 1
1 | 4 | 1
1 | 5 | 1
(3 rows)
INSERT INTO ao VALUES (11, 11);
INSERT 1
SELECT state, tupcount, modcount FROM gp_ao_or_aocs_seg('ao');
state | tupcount | modcount
-------+----------+----------
1 | 1 | 1
1 | 5 | 1
1 | 5 | 2
(3 rows)
DELETE FROM ao WHERE a = 11;
DELETE 1
SELECT state, tupcount, modcount FROM gp_ao_or_aocs_seg('ao');
state | tupcount | modcount
-------+----------+----------
1 | 1 | 1
1 | 5 | 1
1 | 5 | 3
(3 rows)
UPDATE AO SET b = 0 WHERE a = 10;
UPDATE 1
SELECT state, tupcount, modcount FROM gp_ao_or_aocs_seg('ao');
state | tupcount | modcount
-------+----------+----------
1 | 1 | 1
1 | 5 | 1
1 | 6 | 4
(3 rows)