fix view dbe_perf.global_locks transactionid

This commit is contained in:
chenxiaobin
2020-09-07 21:11:43 +08:00
parent 1827f95771
commit 02a8721ce4
3 changed files with 24 additions and 4 deletions

View File

@ -3552,7 +3552,7 @@ DECLARE
page := row_data.page;
tuple := row_data.tuple;
virtualxid := row_data.virtualxid;
transactionid := row_data.classid;
transactionid := row_data.transactionid;
objid := row_data.objid;
objsubid := row_data.objsubid;
virtualtransaction := row_data.virtualtransaction;

View File

@ -357,7 +357,7 @@ CREATE OR REPLACE PROCEDURE PROC_OUT_PARAM_001(P1 OUT INT)
AS
BEGIN
select id into P1 from test1 where name = 'bbb';
insert into test1 values(P1, 'dddd');
insert into test1 values(P1, 'ddd');
COMMIT;
insert into test1 values(P1, 'eee');
ROLLBACK;
@ -373,7 +373,22 @@ SELECT * from test1;
id | name
----+------
1 | bbb
1 | dddd
1 | ddd
(2 rows)
start transaction;
select * from test1 for share;
id | name
----+------
1 | bbb
1 | ddd
(2 rows)
select count(*) > 0 from dbe_perf.global_locks where transactionid is not null;
?column?
----------
t
(1 row)
commit;
DROP TABLE TEST1;

View File

@ -286,7 +286,7 @@ CREATE OR REPLACE PROCEDURE PROC_OUT_PARAM_001(P1 OUT INT)
AS
BEGIN
select id into P1 from test1 where name = 'bbb';
insert into test1 values(P1, 'dddd');
insert into test1 values(P1, 'ddd');
COMMIT;
insert into test1 values(P1, 'eee');
ROLLBACK;
@ -302,4 +302,9 @@ END;
SELECT * from test1;
start transaction;
select * from test1 for share;
select count(*) > 0 from dbe_perf.global_locks where transactionid is not null;
commit;
DROP TABLE TEST1;