@@ -126,64 +126,72 @@ if (sqlca.sqlcode < 0) sqlprint();}
...
@@ -126,64 +126,72 @@ if (sqlca.sqlcode < 0) sqlprint();}
#line 43 "variable.pgc"
#line 43 "variable.pgc"
strcpy(msg,"create");
strcpy(msg,"set");
{ECPGdo(__LINE__,0,1,NULL,"create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) ",ECPGt_EOIT,ECPGt_EORT);
{ECPGdo(__LINE__,0,1,NULL,"set datestyle to iso",ECPGt_EOIT,ECPGt_EORT);
#line 46 "variable.pgc"
#line 46 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
if(sqlca.sqlcode<0)sqlprint();}
#line 46 "variable.pgc"
#line 46 "variable.pgc"
strcpy(msg,"insert");
strcpy(msg,"create");
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ) ",ECPGt_EOIT,ECPGt_EORT);
{ECPGdo(__LINE__,0,1,NULL,"create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) ",ECPGt_EOIT,ECPGt_EORT);
#line 49 "variable.pgc"
#line 49 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
if(sqlca.sqlcode<0)sqlprint();}
#line 49 "variable.pgc"
#line 49 "variable.pgc"
strcpy(msg,"insert");
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ) ",ECPGt_EOIT,ECPGt_EORT);
#line 52 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
#line 52 "variable.pgc"
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ) ",ECPGt_EOIT,ECPGt_EORT);
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ) ",ECPGt_EOIT,ECPGt_EORT);
#line 50 "variable.pgc"
#line 53 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
if(sqlca.sqlcode<0)sqlprint();}
#line 50 "variable.pgc"
#line 53 "variable.pgc"
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , age ) values ( 'Child 1' , 16 ) ",ECPGt_EOIT,ECPGt_EORT);
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , age ) values ( 'Child 1' , 16 ) ",ECPGt_EOIT,ECPGt_EORT);
#line 51 "variable.pgc"
#line 54 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
if(sqlca.sqlcode<0)sqlprint();}
#line 51 "variable.pgc"
#line 54 "variable.pgc"
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , age ) values ( 'Child 2' , 14 ) ",ECPGt_EOIT,ECPGt_EORT);
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , age ) values ( 'Child 2' , 14 ) ",ECPGt_EOIT,ECPGt_EORT);
#line 52 "variable.pgc"
#line 55 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
if(sqlca.sqlcode<0)sqlprint();}
#line 52 "variable.pgc"
#line 55 "variable.pgc"
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , age ) values ( 'Child 3' , 9 ) ",ECPGt_EOIT,ECPGt_EORT);
{ECPGdo(__LINE__,0,1,NULL,"insert into family ( name , age ) values ( 'Child 3' , 9 ) ",ECPGt_EOIT,ECPGt_EORT);
#line 53 "variable.pgc"
#line 56 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
if(sqlca.sqlcode<0)sqlprint();}
#line 53 "variable.pgc"
#line 56 "variable.pgc"
strcpy(msg,"commit");
strcpy(msg,"commit");
{ECPGtrans(__LINE__,NULL,"commit");
{ECPGtrans(__LINE__,NULL,"commit");
#line 56 "variable.pgc"
#line 59 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
if(sqlca.sqlcode<0)sqlprint();}
#line 56 "variable.pgc"
#line 59 "variable.pgc"
strcpy(msg,"open");
strcpy(msg,"open");
{ECPGdo(__LINE__,0,1,NULL,"declare cur cursor for select name , born , age , married , children from family ",ECPGt_EOIT,ECPGt_EORT);
{ECPGdo(__LINE__,0,1,NULL,"declare cur cursor for select name , born , age , married , children from family ",ECPGt_EOIT,ECPGt_EORT);
#line 59 "variable.pgc"
#line 62 "variable.pgc"
if(sqlca.sqlcode<0)sqlprint();}
if(sqlca.sqlcode<0)sqlprint();}
#line 59 "variable.pgc"
#line 62 "variable.pgc"
/* exec sql whenever not found break ; */
/* exec sql whenever not found break ; */
#line 61 "variable.pgc"
#line 64 "variable.pgc"
p=&personal;
p=&personal;
...
@@ -202,13 +210,13 @@ if (sqlca.sqlcode < 0) sqlprint();}
...
@@ -202,13 +210,13 @@ if (sqlca.sqlcode < 0) sqlprint();}
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: ECPGconnect: opening database regress1 on <DEFAULT> port <DEFAULT>
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 46: QUERY: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) on connection regress1
[NO_PID]: ECPGexecute line 46: QUERY: set datestyle to iso on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 46 Ok: CREATE TABLE
[NO_PID]: ECPGexecute line 46 Ok: SET
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 49: QUERY: insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ) on connection regress1
[NO_PID]: ECPGexecute line 49: QUERY: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 49 Ok: INSERT 0 1
[NO_PID]: ECPGexecute line 49 Ok: CREATE TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 50: QUERY: insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ) on connection regress1
[NO_PID]: ECPGexecute line 52: QUERY: insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 50 Ok: INSERT 0 1
[NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 51: QUERY: insert into family ( name , age ) values ( 'Child 1' , 16 ) on connection regress1
[NO_PID]: ECPGexecute line 53: QUERY: insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 51 Ok: INSERT 0 1
[NO_PID]: ECPGexecute line 53 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 52: QUERY: insert into family ( name , age ) values ( 'Child 2' , 14 ) on connection regress1
[NO_PID]: ECPGexecute line 54: QUERY: insert into family ( name , age ) values ( 'Child 1' , 16 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 52 Ok: INSERT 0 1
[NO_PID]: ECPGexecute line 54 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 53: QUERY: insert into family ( name , age ) values ( 'Child 3' , 9 ) on connection regress1
[NO_PID]: ECPGexecute line 55: QUERY: insert into family ( name , age ) values ( 'Child 2' , 14 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 53 Ok: INSERT 0 1
[NO_PID]: ECPGexecute line 55 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 56: QUERY: insert into family ( name , age ) values ( 'Child 3' , 9 ) on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 56 Ok: INSERT 0 1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGtrans line 56 action = commit connection = regress1
[NO_PID]: ECPGtrans line 59 action = commit connection = regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 59: QUERY: declare cur cursor for select name , born , age , married , children from family on connection regress1
[NO_PID]: ECPGexecute line 62: QUERY: declare cur cursor for select name , born , age , married , children from family on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 59 Ok: DECLARE CURSOR
[NO_PID]: ECPGexecute line 62 Ok: DECLARE CURSOR
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 68: QUERY: fetch cur on connection regress1
[NO_PID]: ECPGexecute line 71: QUERY: fetch cur on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 68: Correctly got 1 tuples with 5 fields
[NO_PID]: ECPGexecute line 71: Correctly got 1 tuples with 5 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: Mum offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: Mum offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 68: allocating memory for 1 tuples
[NO_PID]: ECPGstore_result: line 71: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: 07-14-1987 offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: 1987-07-14 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: 3 offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: 3 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 68: QUERY: fetch cur on connection regress1
[NO_PID]: ECPGexecute line 71: QUERY: fetch cur on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 68: Correctly got 1 tuples with 5 fields
[NO_PID]: ECPGexecute line 71: Correctly got 1 tuples with 5 fields
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: Dad offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: Dad offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: 19610721 offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: 19610721 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGstore_result: line 68: allocating memory for 1 tuples
[NO_PID]: ECPGstore_result: line 71: allocating memory for 1 tuples
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: 07-14-1987 offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: 1987-07-14 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGget_data line 68: RESULT: 3 offset: -1 array: Yes
[NO_PID]: ECPGget_data line 71: RESULT: 3 offset: -1 array: Yes
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 68: QUERY: fetch cur on connection regress1
[NO_PID]: ECPGexecute line 71: QUERY: fetch cur on connection regress1
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGexecute line 68: Correctly got 1 tuples with 5 fields
[NO_PID]: ECPGexecute line 71: Correctly got 1 tuples with 5 fields
echo"THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT">>$f
echo"THE PORT NUMBER MIGHT HAVE BEEN CHANGED BY THE REGRESSION SCRIPT">>$f
echo>>$f
echo>>$f
cat$f.tmp | sed-e s,$PGPORT,55432,g >>$f
# MinGW could return such a line:
# "could not connect to server: Connection refused (0x0000274D/10061)"
cat$f.tmp | sed-e s,$PGPORT,55432,g | sed-e"s,could not connect to server: Connection refused (0x.*/.*),could not connect to server: Connection refused,g">>$f