LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test/connect - test2.pgc (source / functions) Coverage Total Hit CBC
Current: Differential Code Coverage 16@8cea358b128 vs 17@8cea358b128 Lines: 100.0 % 15 15 15
Current Date: 2024-04-14 14:21:10 Functions: 100.0 % 1 1 1
Baseline: 16@8cea358b128 Branches: - 0 0
Baseline Date: 2024-04-14 14:21:09 Line coverage date bins:
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed (240..) days: 100.0 % 15 15 15
Function coverage date bins:
(240..) days: 100.0 % 1 1 1

 Age         Owner                    Branch data    TLA  Line data    Source code
                                  1                 :                : /*
                                  2                 :                :  * this file tests multiple connections to databases and switches
                                  3                 :                :  * between them.
                                  4                 :                :  */
                                  5                 :                : 
                                  6                 :                : #include <stdlib.h>
                                  7                 :                : #include <string.h>
                                  8                 :                : #include <stdlib.h>
                                  9                 :                : #include <stdio.h>
                                 10                 :                : 
                                 11                 :                : exec sql include ../regression;
                                 12                 :                : 
                                 13                 :                : int
 6465 meskes@postgresql.or       14                 :CBC           1 : main(void)
                                 15                 :                : {
                                 16                 :                : exec sql begin declare section;
                                 17                 :                :     char id[200];
                                 18                 :                :     char res[200];
                                 19                 :                : exec sql end declare section;
                                 20                 :                : 
                                 21                 :              1 :     ECPGdebug(1, stderr);
                                 22                 :                : 
                                 23                 :              1 :     strcpy(id, "first");
 2828 tgl@sss.pgh.pa.us          24                 :              1 :     exec sql connect to ecpg2_regression as :id;
 6463 meskes@postgresql.or       25                 :              1 :     exec sql connect to REGRESSDB1 as second;
                                 26                 :                : 
                                 27                 :                :     /* this selects from "second" which was opened last */
 6465                            28                 :              1 :     exec sql select current_database() into :res;
                                 29                 :              1 :     exec sql at first select current_database() into :res;
                                 30                 :              1 :     exec sql at second select current_database() into :res;
                                 31                 :                : 
                                 32                 :              1 :     exec sql set connection first;
                                 33                 :              1 :     exec sql select current_database() into :res;
                                 34                 :                : 
                                 35                 :                :     /* this will disconnect from "first" */
                                 36                 :              1 :     exec sql disconnect;
                                 37                 :              1 :     exec sql select current_database() into :res;
                                 38                 :                : 
                                 39                 :                :     /* error here since "first" is already disconnected */
                                 40                 :              1 :     exec sql disconnect :id;
                                 41                 :                : 
                                 42                 :                :     /* disconnect from "second" */
                                 43                 :              1 :     exec sql disconnect;
                                 44                 :                : 
 2432 peter_e@gmx.net            45                 :              1 :     return 0;
                                 46                 :                : }
        

Generated by: LCOV version 2.1-beta2-3-g6141622