2021-04-09 12:53:51 +00:00
|
|
|
drop table if exists txn_counters;
|
|
|
|
|
|
|
|
create table txn_counters (n Int64, mintid DEFAULT transactionID()) engine=MergeTree order by n;
|
|
|
|
|
|
|
|
insert into txn_counters(n) values (1);
|
|
|
|
select transactionID();
|
|
|
|
|
|
|
|
begin transaction;
|
|
|
|
insert into txn_counters(n) values (2);
|
2021-06-08 18:17:18 +00:00
|
|
|
select 1, system.parts.name, txn_counters.mintid = system.parts.mintid from txn_counters join system.parts on txn_counters._part = system.parts.name where database=currentDatabase() and table='txn_counters' order by system.parts.name;
|
|
|
|
select 2, name, mincsn, maxtid, maxcsn from system.parts where database=currentDatabase() and table='txn_counters' order by system.parts.name;
|
2021-04-09 12:53:51 +00:00
|
|
|
rollback;
|
|
|
|
|
|
|
|
begin transaction;
|
|
|
|
insert into txn_counters(n) values (3);
|
2021-06-08 18:17:18 +00:00
|
|
|
select 3, system.parts.name, txn_counters.mintid = system.parts.mintid from txn_counters join system.parts on txn_counters._part = system.parts.name where database=currentDatabase() and table='txn_counters' order by system.parts.name;
|
|
|
|
select 4, name, mincsn, maxtid, maxcsn from system.parts where database=currentDatabase() and table='txn_counters' order by system.parts.name;
|
2021-04-09 12:53:51 +00:00
|
|
|
commit;
|
|
|
|
|
|
|
|
drop table txn_counters;
|