blob: 75db6e50019d6547f660beb2fc80da8a6a411446 [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 | 10 | 1
(1 row)
INSERT INTO ao VALUES (11, 11);
INSERT 1
SELECT state, tupcount, modcount FROM gp_ao_or_aocs_seg('ao');
state | tupcount | modcount
-------+----------+----------
1 | 11 | 2
(1 row)
DELETE FROM ao WHERE a = 11;
DELETE 1
SELECT state, tupcount, modcount FROM gp_ao_or_aocs_seg('ao');
state | tupcount | modcount
-------+----------+----------
1 | 11 | 3
(1 row)
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 | 12 | 4
(1 row)