ECPG regression tests

Started by Magnus Haganderover 18 years ago10 messages
#1Magnus Hagander
magnus@hagander.net
1 attachment(s)

Getting much further now - now they all build :-) But I'm getting a couple
of failures in autoprep and oldexec. Diffs attached.

Pointers?

//Magnus

Attachments:

regression.diffstext/plain; charset=us-asciiDownload
*** ./expected/preproc-autoprep.stderr	2007-10-01 10:57:37.532045600 +0200
--- ./results/preproc-autoprep.stderr	2007-10-03 13:53:13.898609200 +0200
***************
*** 2,44 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> 
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 19: stmt not in cache; inserting
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGprepare line 19: NAME: ecpg1 QUERY: create  table T ( Item1 int   , Item2 int   )    
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 19: QUERY: create  table T ( Item1 int   , Item2 int   )     with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 19: using PQexecPrepared for create  table T ( Item1 int   , Item2 int   )    
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 21: stmt not in cache; inserting
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGprepare line 21: NAME: ecpg2 QUERY: insert into T values ( 1 , null ) 
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 21: QUERY: insert into T values ( 1 , null )  with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 21: using PQexecPrepared for insert into T values ( 1 , null ) 
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 22: stmt not in cache; inserting
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGprepare line 22: NAME: ecpg3 QUERY: insert into T values ( 1 ,  $1  ) 
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 22: QUERY: insert into T values ( 1 ,  $1  )  with 1 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 22: using PQexecPrepared for insert into T values ( 1 ,  $1  ) 
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 22: parameter 1 = 1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 24: stmt found in cache, entry 6248
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 24: QUERY: insert into T values ( 1 ,  $1  )  with 1 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 24: using PQexecPrepared for insert into T values ( 1 ,  $1  ) 
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 24: parameter 1 = 2
  [NO_PID]: sqlca: code: 0, state: 00000
--- 2,30 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT> 
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 19: QUERY: create  table T ( Item1 int   , Item2 int   )     with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 19: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 19 Ok: CREATE TABLE
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 21: QUERY: insert into T values ( 1 , null )  with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 21: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 21 Ok: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 22: QUERY: insert into T values ( 1 ,  $1  )  with 1 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 22: using PQexecParams 
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 22: parameter 1 = 1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 22 Ok: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 24: QUERY: insert into T values ( 1 ,  $1  )  with 1 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 24: using PQexecParams 
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 24: parameter 1 = 2
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 52,64 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 28: stmt not in cache; inserting
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGprepare line 28: NAME: ecpg4 QUERY: select  Item2  from T    order by Item2  nulls last
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 28: QUERY: select  Item2  from T    order by Item2  nulls last with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 28: using PQexecPrepared for select  Item2  from T    order by Item2  nulls last
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 28: Correctly got 4 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
--- 38,46 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 26 Ok: INSERT 0 1
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 28: QUERY: select  Item2  from T    order by Item2  nulls last with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 28: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 28: Correctly got 4 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
***************
*** 70,134 ****
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGget_data line 28: RESULT:  offset: -1 array: Yes
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 35: stmt not in cache; inserting
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGprepare line 35: NAME: ecpg5 QUERY: declare C  cursor  for select  Item1  from T   
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 35: QUERY: declare C  cursor  for select  Item1  from T    with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 35: using PQexecPrepared for declare C  cursor  for select  Item1  from T   
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 35 Ok: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 37: stmt not in cache; inserting
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGprepare line 37: NAME: ecpg6 QUERY: fetch 1 in C
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 37: QUERY: fetch 1 in C with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 37: using PQexecPrepared for fetch 1 in C
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 37: Correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGget_data line 37: RESULT: 1 offset: -1 array: Yes
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 40: stmt not in cache; inserting
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGprepare line 40: NAME: ecpg7 QUERY: close C
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 40: QUERY: close C with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 40: using PQexecPrepared for close C
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 40 Ok: CLOSE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGauto_prepare line 42: stmt not in cache; inserting
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGprepare line 42: NAME: ecpg8 QUERY: drop table T 
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 42: QUERY: drop table T  with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 42: using PQexecPrepared for drop table T 
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 42 Ok: DROP TABLE
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGdeallocate line 0: NAME: ecpg8
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGdeallocate line 0: NAME: ecpg7
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGdeallocate line 0: NAME: ecpg6
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGdeallocate line 0: NAME: ecpg5
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGdeallocate line 0: NAME: ecpg4
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGdeallocate line 0: NAME: i
  [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGdeallocate line 0: NAME: ecpg3
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGdeallocate line 0: NAME: ecpg2
- [NO_PID]: sqlca: code: 0, state: 00000
- [NO_PID]: ECPGdeallocate line 0: NAME: ecpg1
- [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_finish: Connection regress1 closed.
  [NO_PID]: sqlca: code: 0, state: 00000
--- 52,84 ----
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGget_data line 28: RESULT:  offset: -1 array: Yes
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 35: QUERY: declare C  cursor  for select  Item1  from T    with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 35: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 35 Ok: DECLARE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 37: QUERY: fetch 1 in C with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 37: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 37: Correctly got 1 tuples with 1 fields
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGget_data line 37: RESULT: 1 offset: -1 array: Yes
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 40: QUERY: close C with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 40: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 40 Ok: CLOSE CURSOR
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 42: QUERY: drop table T  with 0 parameter on connection regress1 
  [NO_PID]: sqlca: code: 0, state: 00000
! [NO_PID]: ECPGexecute line 42: using PQexec
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGexecute line 42 Ok: DROP TABLE
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ECPGdeallocate line 0: NAME: i
  [NO_PID]: sqlca: code: 0, state: 00000
  [NO_PID]: ecpg_finish: Connection regress1 closed.
  [NO_PID]: sqlca: code: 0, state: 00000

======================================================================

*** ./expected/preproc-autoprep.c	2007-08-14 12:32:47.000000000 +0200
--- ./results/preproc-autoprep.c	2007-10-03 13:53:13.679825600 +0200
***************
*** 46,52 ****
  #line 17 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "create  table T ( Item1 int   , Item2 int   )    ", ECPGt_EOIT, ECPGt_EORT);
  #line 19 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 46,52 ----
  #line 17 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create  table T ( Item1 int   , Item2 int   )    ", ECPGt_EOIT, ECPGt_EORT);
  #line 19 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
***************
*** 56,62 ****
  #line 19 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "insert into T values ( 1 , null ) ", ECPGt_EOIT, ECPGt_EORT);
  #line 21 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 56,62 ----
  #line 19 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into T values ( 1 , null ) ", ECPGt_EOIT, ECPGt_EORT);
  #line 21 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
***************
*** 65,71 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 21 "autoprep.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "insert into T values ( 1 ,  $1  ) ", 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 22 "autoprep.pgc"
--- 65,71 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 21 "autoprep.pgc"
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into T values ( 1 ,  $1  ) ", 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 22 "autoprep.pgc"
***************
*** 77,83 ****
  #line 22 "autoprep.pgc"
  
    i++;
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "insert into T values ( 1 ,  $1  ) ", 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 24 "autoprep.pgc"
--- 77,83 ----
  #line 22 "autoprep.pgc"
  
    i++;
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into T values ( 1 ,  $1  ) ", 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 24 "autoprep.pgc"
***************
*** 107,113 ****
  #line 26 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "select  Item2  from T    order by Item2  nulls last", ECPGt_EOIT, 
  	ECPGt_int,(item),(long)1,(long)4,sizeof(int), 
  	ECPGt_int,(ind),(long)1,(long)4,sizeof(int), ECPGt_EORT);
  #line 28 "autoprep.pgc"
--- 107,113 ----
  #line 26 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select  Item2  from T    order by Item2  nulls last", ECPGt_EOIT, 
  	ECPGt_int,(item),(long)1,(long)4,sizeof(int), 
  	ECPGt_int,(ind),(long)1,(long)4,sizeof(int), ECPGt_EORT);
  #line 28 "autoprep.pgc"
***************
*** 126,132 ****
  #line 33 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "declare C  cursor  for select  Item1  from T   ", ECPGt_EOIT, ECPGt_EORT);
  #line 35 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 126,132 ----
  #line 33 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C  cursor  for select  Item1  from T   ", ECPGt_EOIT, ECPGt_EORT);
  #line 35 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
***************
*** 136,142 ****
  #line 35 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "fetch 1 in C", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 37 "autoprep.pgc"
--- 136,142 ----
  #line 35 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 in C", ECPGt_EOIT, 
  	ECPGt_int,&(i),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
  #line 37 "autoprep.pgc"
***************
*** 149,155 ****
  
    printf("i = %d\n", i);
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "close C", ECPGt_EOIT, ECPGt_EORT);
  #line 40 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 149,155 ----
  
    printf("i = %d\n", i);
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close C", ECPGt_EOIT, ECPGt_EORT);
  #line 40 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
***************
*** 159,165 ****
  #line 40 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepnormal, "drop table T ", ECPGt_EOIT, ECPGt_EORT);
  #line 42 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();
--- 159,165 ----
  #line 40 "autoprep.pgc"
  
  
!   { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table T ", ECPGt_EOIT, ECPGt_EORT);
  #line 42 "autoprep.pgc"
  
  if (sqlca.sqlwarn[0] == 'W') sqlprint();

======================================================================

*** ./expected/sql-oldexec.c	2007-10-01 10:57:37.703949200 +0200
--- ./results/sql-oldexec.c	2007-10-03 13:53:19.899530800 +0200
***************
*** 65,71 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 24 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "create  table test ( name char  ( 8 )    , amount int   , letter char  ( 1 )    )    ", ECPGt_EOIT, ECPGt_EORT);
  #line 25 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 65,71 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 24 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create  table test ( name char  ( 8 )    , amount int   , letter char  ( 1 )    )    ", ECPGt_EOIT, ECPGt_EORT);
  #line 25 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
***************
*** 79,85 ****
  
  
  	sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f')");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, 2, command, ECPGt_EOIT, ECPGt_EORT);
  #line 29 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 79,85 ----
  
  
  	sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 1, 'f')");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, 2, command, ECPGt_EOIT, ECPGt_EORT);
  #line 29 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
***************
*** 87,93 ****
  
  
  	sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 2, 't')");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, 2, command, ECPGt_EOIT, ECPGt_EORT);
  #line 32 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 87,93 ----
  
  
  	sprintf(command, "insert into test (name, amount, letter) values ('db: ''r1''', 2, 't')");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, 2, command, ECPGt_EOIT, ECPGt_EORT);
  #line 32 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
***************
*** 95,101 ****
  
  
  	sprintf(command, "insert into test (name, amount, letter) select name, amount+10, letter from test");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, 2, command, ECPGt_EOIT, ECPGt_EORT);
  #line 35 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 95,101 ----
  
  
  	sprintf(command, "insert into test (name, amount, letter) select name, amount+10, letter from test");
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, 2, command, ECPGt_EOIT, ECPGt_EORT);
  #line 35 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
***************
*** 105,117 ****
  	printf("Inserted %ld tuples via execute immediate\n", sqlca.sqlerrd[2]);
  
  	sprintf(command, "insert into test (name, amount, letter) select name, amount+$1, letter from test");
! 	{ ECPGprepare(__LINE__, NULL, 1, "i", command);
  #line 40 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 40 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, 1, "i", 
  	ECPGt_int,&(increment),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 41 "oldexec.pgc"
--- 105,117 ----
  	printf("Inserted %ld tuples via execute immediate\n", sqlca.sqlerrd[2]);
  
  	sprintf(command, "insert into test (name, amount, letter) select name, amount+$1, letter from test");
! 	{ ECPGprepare(__LINE__, NULL, 0, "i", command);
  #line 40 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 40 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, 1, "i", 
  	ECPGt_int,&(increment),(long)1,(long)1,sizeof(int), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 41 "oldexec.pgc"
***************
*** 131,137 ****
  
  	sprintf (command, "select * from test");
  
! 	{ ECPGprepare(__LINE__, NULL, 1, "f", command);
  #line 49 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 131,137 ----
  
  	sprintf (command, "select * from test");
  
! 	{ ECPGprepare(__LINE__, NULL, 0, "f", command);
  #line 49 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
***************
*** 141,147 ****
  #line 50 "oldexec.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "declare CUR  cursor  for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 52 "oldexec.pgc"
--- 141,147 ----
  #line 50 "oldexec.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR  cursor  for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
  #line 52 "oldexec.pgc"
***************
*** 149,155 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 52 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
--- 149,155 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 52 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 8 in CUR", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
***************
*** 181,187 ****
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
  #line 66 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 181,187 ----
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR", ECPGt_EOIT, ECPGt_EORT);
  #line 66 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
***************
*** 190,196 ****
  
  	sprintf (command, "select * from test where ? = amount");
  
! 	{ ECPGprepare(__LINE__, NULL, 1, "f", command);
  #line 70 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 190,196 ----
  
  	sprintf (command, "select * from test where ? = amount");
  
! 	{ ECPGprepare(__LINE__, NULL, 0, "f", command);
  #line 70 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
***************
*** 200,206 ****
  #line 71 "oldexec.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "declare CUR3  cursor  for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_const,"1",(long)1,(long)1,strlen("1"), 
--- 200,206 ----
  #line 71 "oldexec.pgc"
  
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare CUR3  cursor  for $1", 
  	ECPGt_char_variable,(ECPGprepared_statement(NULL, "f", __LINE__)),(long)1,(long)1,(1)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_const,"1",(long)1,(long)1,strlen("1"), 
***************
*** 210,216 ****
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 73 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "fetch in CUR3", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
--- 210,216 ----
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 73 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch in CUR3", ECPGt_EOIT, 
  	ECPGt_char,(name),(long)8,(long)8,(8)*sizeof(char), 
  	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
  	ECPGt_int,(amount),(long)1,(long)8,sizeof(int), 
***************
*** 242,254 ****
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "close CUR3", ECPGt_EOIT, ECPGt_EORT);
  #line 87 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 87 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 1, ECPGst_normal, "drop table test ", ECPGt_EOIT, ECPGt_EORT);
  #line 88 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
--- 242,254 ----
  		printf("name[%d]=%8.8s\tamount[%d]=%d\tletter[%d]=%c\n", i, n, i, a, i, l);
  	}
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close CUR3", ECPGt_EOIT, ECPGt_EORT);
  #line 87 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}
  #line 87 "oldexec.pgc"
  
! 	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test ", ECPGt_EOIT, ECPGt_EORT);
  #line 88 "oldexec.pgc"
  
  if (sqlca.sqlcode < 0) sqlprint();}

======================================================================

#2Michael Meskes
meskes@postgresql.org
In reply to: Magnus Hagander (#1)
Re: ECPG regression tests

On Wed, Oct 03, 2007 at 01:54:50PM +0200, Magnus Hagander wrote:

Getting much further now - now they all build :-) But I'm getting a couple
of failures in autoprep and oldexec. Diffs attached.

Pointers?

Looks like we're almost there.

oldexec needs the additional option "-r questionmarks" to ecpg. Here's
the line from the normal Makefile:

$(ECPG) -r questionmarks -o $@ -I$(srcdir) $<

autoprep also needs an additional parameter. It's "-r prepare". And
again, here's the line:

$(ECPG) -r prepare -o $@ -I$(srcdir) $<

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

#3Magnus Hagander
magnus@hagander.net
In reply to: Michael Meskes (#2)
Re: ECPG regression tests

On Wed, Oct 03, 2007 at 02:12:50PM +0200, Michael Meskes wrote:

On Wed, Oct 03, 2007 at 01:54:50PM +0200, Magnus Hagander wrote:

Getting much further now - now they all build :-) But I'm getting a couple
of failures in autoprep and oldexec. Diffs attached.

Pointers?

Looks like we're almost there.

oldexec needs the additional option "-r questionmarks" to ecpg. Here's
the line from the normal Makefile:

$(ECPG) -r questionmarks -o $@ -I$(srcdir) $<

autoprep also needs an additional parameter. It's "-r prepare". And
again, here's the line:

$(ECPG) -r prepare -o $@ -I$(srcdir) $<

Bingo.

With that, all the ECPG regression tests now pass on MSVC builds.

Andrew - please enable it for the buildfarm :-)

//Magnus

#4Michael Meskes
meskes@postgresql.org
In reply to: Magnus Hagander (#3)
Re: ECPG regression tests

On Wed, Oct 03, 2007 at 02:34:59PM +0200, Magnus Hagander wrote:

With that, all the ECPG regression tests now pass on MSVC builds.

Great!

Thanks a lot for your help Magnus.

Michael
--
Michael Meskes
Email: Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org)
ICQ: 179140304, AIM/Yahoo: michaelmeskes, Jabber: meskes@jabber.org
Go SF 49ers! Go Rhein Fire! Use Debian GNU/Linux! Use PostgreSQL!

#5Andrew Dunstan
andrew@dunslane.net
In reply to: Magnus Hagander (#3)
Re: ECPG regression tests

Magnus Hagander wrote:

Bingo.

With that, all the ECPG regression tests now pass on MSVC builds.

Andrew - please enable it for the buildfarm :-)

Yes, when I have had a chance to test it. Might be a day or so.

cheers

andrew

#6Andrew Dunstan
andrew@dunslane.net
In reply to: Andrew Dunstan (#5)
Re: ECPG regression tests

Andrew Dunstan wrote:

Magnus Hagander wrote:

Bingo.

With that, all the ECPG regression tests now pass on MSVC builds.

Andrew - please enable it for the buildfarm :-)

Yes, when I have had a chance to test it. Might be a day or so.

I finally managed to get this working after much wailing and gnashing of
teeth and rending of hair. (Hint: if you don't put the PlatformSDK
directories first in the INCLUDE and LIB lists bad and inexplicable
things can happen.)

Pick up the latest version of run_build.pl in CVS if you want to run
this in your buildfarm animal now.

A release will be forthcoming very soon.

cheers

andrew

#7Magnus Hagander
magnus@hagander.net
In reply to: Andrew Dunstan (#6)
Re: ECPG regression tests

On Sat, Oct 06, 2007 at 11:50:39PM -0400, Andrew Dunstan wrote:

Andrew Dunstan wrote:

Magnus Hagander wrote:

Bingo.

With that, all the ECPG regression tests now pass on MSVC builds.

Andrew - please enable it for the buildfarm :-)

Yes, when I have had a chance to test it. Might be a day or so.

I finally managed to get this working after much wailing and gnashing of
teeth and rending of hair. (Hint: if you don't put the PlatformSDK
directories first in the INCLUDE and LIB lists bad and inexplicable
things can happen.)

Pick up the latest version of run_build.pl in CVS if you want to run
this in your buildfarm animal now.

A release will be forthcoming very soon.

I put it in, but it doesn't work. It works when running ecpg tests manual,
but from run_build I get:
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=skylark&amp;dt=2007-10-09%20090814&amp;stg=ecpg-check

which seems similar to what you had before. How did you fix that one? Is
that the one requiring a reorder?

//Magnus

#8Andrew Dunstan
andrew@dunslane.net
In reply to: Magnus Hagander (#7)
Re: ECPG regression tests

Magnus Hagander wrote:

(Hint: if you don't put the PlatformSDK
directories first in the INCLUDE and LIB lists bad and inexplicable
things can happen.)

Pick up the latest version of run_build.pl in CVS if you want to run
this in your buildfarm animal now.

A release will be forthcoming very soon.

I put it in, but it doesn't work. It works when running ecpg tests manual,
but from run_build I get:
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=skylark&amp;dt=2007-10-09%20090814&amp;stg=ecpg-check

which seems similar to what you had before. How did you fix that one? Is
that the one requiring a reorder?

Yes. compare its build_env INCLUDE and LIB and possibly PATH values with
those of red_bat:
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=red_bat&amp;dt=2007-10-09%2004:30:04

BTW, following some advice I found on the net those PlatformSDK
directories were copied manually from the SDK install, back when I
installed MSVC.

cheers

andrew

#9Andrew Dunstan
andrew@dunslane.net
In reply to: Andrew Dunstan (#8)
Re: ECPG regression tests

Andrew Dunstan wrote:

Magnus Hagander wrote:

(Hint: if you don't put the PlatformSDK directories first in the
INCLUDE and LIB lists bad and inexplicable things can happen.)

Pick up the latest version of run_build.pl in CVS if you want to run
this in your buildfarm animal now.

A release will be forthcoming very soon.

I put it in, but it doesn't work. It works when running ecpg tests
manual,
but from run_build I get:
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=skylark&amp;dt=2007-10-09%20090814&amp;stg=ecpg-check

which seems similar to what you had before. How did you fix that
one? Is
that the one requiring a reorder?

Yes. compare its build_env INCLUDE and LIB and possibly PATH values
with those of red_bat:
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=red_bat&amp;dt=2007-10-09%2004:30:04

BTW, following some advice I found on the net those PlatformSDK
directories were copied manually from the SDK install, back when I
installed MSVC.

You also appear to have simply a configuration bug - there is a missing
semicolon or two in:

LIB' => 'D:\\Program Files (x86)\\Microsoft Visual Studio 8\\VC\\ATLMFC\\LIB;D:\\Program Files (x86)\\Microsoft Visual Studio 8\\VC\\LIBD:\\Program Files (x86)\\Microsoft Visual Studio 8\\VC\\PlatformSDK\\lib;D:\\Program Files (x86)\\Microsoft Visual Studio 8\\SDK\\v2.0\\libD:\\Program Files (x86)\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\Lib\\;C:\\Program Files\\SQLXML 4.0\\bin\\',

cheers

andrew

#10Magnus Hagander
magnus@hagander.net
In reply to: Andrew Dunstan (#9)
Re: ECPG regression tests

On Tue, Oct 09, 2007 at 05:44:22PM -0400, Andrew Dunstan wrote:

Andrew Dunstan wrote:

Magnus Hagander wrote:

(Hint: if you don't put the PlatformSDK directories first in the
INCLUDE and LIB lists bad and inexplicable things can happen.)

Pick up the latest version of run_build.pl in CVS if you want to run
this in your buildfarm animal now.

A release will be forthcoming very soon.

I put it in, but it doesn't work. It works when running ecpg tests
manual,
but from run_build I get:
http://www.pgbuildfarm.org/cgi-bin/show_stage_log.pl?nm=skylark&amp;dt=2007-10-09%20090814&amp;stg=ecpg-check

which seems similar to what you had before. How did you fix that
one? Is
that the one requiring a reorder?

Yes. compare its build_env INCLUDE and LIB and possibly PATH values
with those of red_bat:
http://www.pgbuildfarm.org/cgi-bin/show_log.pl?nm=red_bat&amp;dt=2007-10-09%2004:30:04

BTW, following some advice I found on the net those PlatformSDK
directories were copied manually from the SDK install, back when I
installed MSVC.

You also appear to have simply a configuration bug - there is a missing
semicolon or two in:

LIB' => 'D:\\Program Files (x86)\\Microsoft Visual Studio
8\\VC\\ATLMFC\\LIB;D:\\Program Files (x86)\\Microsoft Visual Studio
8\\VC\\LIBD:\\Program Files (x86)\\Microsoft Visual Studio
8\\VC\\PlatformSDK\\lib;D:\\Program Files (x86)\\Microsoft Visual Studio
8\\SDK\\v2.0\\libD:\\Program Files (x86)\\Microsoft Visual Studio .NET
2003\\SDK\\v1.1\\Lib\\;C:\\Program Files\\SQLXML 4.0\\bin\\',

Gah. That was it, I had . instead of , in the config file :-(

Fixing that made the ecpg regression etsts pass, didn't have to reorder or
change anything at all.

//Magnus