LCOV - differential code coverage report
Current view: top level - src/interfaces/ecpg/test/connect - test3.pgc (source / functions) Coverage Total Hit CBC
Current: Differential Code Coverage HEAD vs 15 Lines: 100.0 % 16 16 16
Current Date: 2023-04-08 15:15:32 Functions: 100.0 % 1 1 1
Baseline: 15
Baseline Date: 2023-04-08 15:09:40
Legend: Lines: hit not hit

           TLA  Line data    Source code
       1                 : /*
       2                 :  * this file just tests the several possibilities you have for a disconnect
       3                 :  */
       4                 : 
       5                 : #include <stdlib.h>
       6                 : #include <string.h>
       7                 : #include <stdlib.h>
       8                 : #include <stdio.h>
       9                 : 
      10                 : exec sql include ../regression;
      11                 : 
      12                 : int
      13 CBC           1 : main(void)
      14                 : {
      15                 : exec sql begin declare section;
      16                 :     char id[200];
      17                 :     char res[200];
      18                 : exec sql end declare section;
      19                 : 
      20               1 :     ECPGdebug(1, stderr);
      21                 : 
      22               1 :     strcpy(id, "first");
      23               1 :     exec sql connect to ecpg2_regression as :id;
      24               1 :     exec sql connect to REGRESSDB1 as second;
      25                 : 
      26                 :     /* this selects from "second" which was opened last */
      27               1 :     exec sql select current_database() into :res;
      28                 : 
      29                 :     /* will close "second" */
      30               1 :     exec sql disconnect CURRENT;
      31               1 :     exec sql select current_database() into :res;
      32                 : 
      33               1 :     exec sql connect to REGRESSDB1 as second;
      34                 :     /* will close "second" */
      35               1 :     exec sql disconnect DEFAULT;
      36                 : 
      37               1 :     exec sql connect to "ecpg2_regression" as second;
      38               1 :     exec sql disconnect ALL;
      39                 : 
      40               1 :     exec sql disconnect CURRENT;
      41               1 :     exec sql disconnect DEFAULT;
      42               1 :     exec sql disconnect ALL;
      43                 : 
      44                 :     /*
      45                 :      * exec sql disconnect;
      46                 :      * exec sql disconnect name;
      47                 :      *
      48                 :      *     are used in other tests
      49                 :      */
      50                 : 
      51               1 :     return 0;
      52                 : }
        

Generated by: LCOV version v1.16-55-g56c0a2a