LCOV - code coverage report
Current view: top level - src/interfaces/ecpg/test/sql - twophase.pgc (source / functions) Coverage Total Hit
Test: PostgreSQL 19devel Lines: 100.0 % 31 31
Test Date: 2026-03-03 01:14:37 Functions: 100.0 % 1 1
Legend: Lines:     hit not hit

            Line data    Source code
       1              : #include <stdio.h>
       2              : #include <stdlib.h>
       3              : #include <string.h>
       4              : 
       5              : exec sql include ../regression;
       6              : 
       7              : exec sql whenever sqlerror sqlprint;
       8              : 
       9            2 : int main(void)
      10              : {
      11              :     char msg[128];
      12              : 
      13            2 :     ECPGdebug(1, stderr);
      14              : 
      15            2 :     strcpy(msg, "connect");
      16            2 :     exec sql connect to REGRESSDB1;
      17            2 :     exec sql set autocommit to off;
      18            2 : 
      19            2 :     strcpy(msg, "create");
      20            2 :     exec sql create table t1(c int);
      21            2 : 
      22            2 :     strcpy(msg, "commit");
      23            2 :     exec sql commit;
      24            2 : 
      25            2 :     strcpy(msg, "begin");
      26            2 :     exec sql begin;
      27            2 : 
      28            2 :     strcpy(msg, "insert");
      29            2 :     exec sql insert into t1 values(1);
      30            2 : 
      31            2 :     strcpy(msg, "prepare transaction");
      32            2 :     exec sql prepare transaction 'ecpg_twophase';
      33            2 : 
      34            2 :     strcpy(msg, "commit prepared");
      35            2 :     exec sql commit prepared 'ecpg_twophase';
      36            2 : 
      37            2 :     strcpy(msg, "drop");
      38            2 :     exec sql drop table t1;
      39            2 : 
      40            2 :     strcpy(msg, "disconnect");
      41            2 :     exec sql disconnect current;
      42            2 : 
      43            2 :     return 0;
      44              : }
        

Generated by: LCOV version 2.0-1