diff options
Diffstat (limited to 'src/interfaces/ecpg/test')
5 files changed, 141 insertions, 133 deletions
diff --git a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c index 2ef12693fa9..91c8ad55fe8 100644 --- a/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c +++ b/src/interfaces/ecpg/test/expected/preproc-array_of_struct.c @@ -32,7 +32,7 @@ typedef struct { #line 12 "array_of_struct.pgc" - struct varchar_name_12 { int len; char arr[ 50 ]; } name ; + struct varchar_name_1 { int len; char arr[ 50 ]; } name ; #line 13 "array_of_struct.pgc" int phone ; @@ -61,7 +61,7 @@ int main() typedef struct { #line 30 "array_of_struct.pgc" - struct varchar_name_30 { int len; char arr[ 50 ]; } name ; + struct varchar_name_2 { int len; char arr[ 50 ]; } name ; #line 31 "array_of_struct.pgc" int phone ; @@ -95,7 +95,7 @@ int main() #line 38 "array_of_struct.pgc" struct customer3 { #line 36 "array_of_struct.pgc" - struct varchar_name_36 { int len; char arr[ 50 ]; } name ; + struct varchar_name_3 { int len; char arr[ 50 ]; } name ; #line 37 "array_of_struct.pgc" int phone ; @@ -104,7 +104,7 @@ int main() #line 43 "array_of_struct.pgc" struct customer4 { #line 41 "array_of_struct.pgc" - struct varchar_name_41 { int len; char arr[ 50 ]; } name ; + struct varchar_name_4 { int len; char arr[ 50 ]; } name ; #line 42 "array_of_struct.pgc" int phone ; @@ -114,7 +114,7 @@ int main() int r ; #line 45 "array_of_struct.pgc" - struct varchar_onlyname_45 { int len; char arr[ 50 ]; } onlyname [2] ; + struct varchar_onlyname_5 { int len; char arr[ 50 ]; } onlyname [2] ; /* exec sql end declare section */ #line 46 "array_of_struct.pgc" @@ -235,7 +235,7 @@ if (sqlca.sqlcode < 0) sqlprint();} } { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select * from customers limit 1", ECPGt_EOIT, - ECPGt_varchar,&(custs4.name),(long)50,(long)1,sizeof(struct varchar_name_41), + ECPGt_varchar,&(custs4.name),(long)50,(long)1,sizeof(struct varchar_name_4), ECPGt_short,&(inds[0].name_ind),(long)1,(long)1,sizeof(short), ECPGt_int,&(custs4.phone),(long)1,(long)1,sizeof(int), ECPGt_short,&(inds[0].phone_ind),(long)1,(long)1,sizeof(short), ECPGt_EORT); @@ -255,7 +255,7 @@ if (sqlca.sqlcode < 0) sqlprint();} printf( "phone - %d\n", custs4.phone ); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select c from customers limit 2", ECPGt_EOIT, - ECPGt_varchar,(onlyname),(long)50,(long)2,sizeof(struct varchar_onlyname_45), + ECPGt_varchar,(onlyname),(long)50,(long)2,sizeof(struct varchar_onlyname_5), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); #line 85 "array_of_struct.pgc" diff --git a/src/interfaces/ecpg/test/expected/preproc-cursor.c b/src/interfaces/ecpg/test/expected/preproc-cursor.c index b61900c9f9f..e755c574613 100644 --- a/src/interfaces/ecpg/test/expected/preproc-cursor.c +++ b/src/interfaces/ecpg/test/expected/preproc-cursor.c @@ -74,7 +74,7 @@ main (void) char * curname3 = CURNAME ; #line 27 "cursor.pgc" - struct varchar_curname4_27 { int len; char arr[ 50 ]; } curname4 ; + struct varchar_curname4_1 { int len; char arr[ 50 ]; } curname4 ; #line 28 "cursor.pgc" int count ; @@ -602,7 +602,7 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "open"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare $0 cursor for $1", - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char_variable,(ECPGprepared_statement(NULL, "st_id2", __LINE__)),(long)1,(long)1,(1)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); @@ -614,7 +614,7 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "fetch from"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch from $0", - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_int,&(id),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, @@ -629,7 +629,7 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "fetch"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch $0", - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_int,&(id),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, @@ -644,7 +644,7 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "fetch 1 from"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 from $0", - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_int,&(id),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, @@ -662,7 +662,7 @@ if (sqlca.sqlcode < 0) exit (1);} { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch $0 from $0", ECPGt_int,&(count),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_int,&(id),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, @@ -677,7 +677,7 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "move"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "move absolute 0 $0", - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); #line 216 "cursor.pgc" @@ -687,7 +687,7 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "fetch 1"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch 1 $0", - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_int,&(id),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, @@ -705,7 +705,7 @@ if (sqlca.sqlcode < 0) exit (1);} { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch $0 $0", ECPGt_int,&(count),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_int,&(id),(long)1,(long)1,sizeof(int), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, @@ -720,7 +720,7 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "close"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close $0", - ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_27), + ECPGt_varchar,&(curname4),(long)50,(long)1,sizeof(struct varchar_curname4_1), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT); #line 228 "cursor.pgc" diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.c b/src/interfaces/ecpg/test/expected/preproc-variable.c index 6a63f5699d8..9f8b36d8a7b 100644 --- a/src/interfaces/ecpg/test/expected/preproc-variable.c +++ b/src/interfaces/ecpg/test/expected/preproc-variable.c @@ -70,11 +70,12 @@ main (void) + #line 27 "variable.pgc" struct personal_struct { #line 25 "variable.pgc" - struct varchar_name_25 { int len; char arr[ BUFFERSIZ ]; } name ; + struct varchar_name_1 { int len; char arr[ BUFFERSIZ ]; } name ; #line 26 "variable.pgc" struct birthinfo birth ; @@ -91,27 +92,33 @@ main (void) #line 31 "variable.pgc" ind ind_children ; -/* exec sql end declare section */ + struct t1 { #line 32 "variable.pgc" + struct varchar_name_2 { int len; char arr[ BUFFERSIZ ]; } name ; + } ; struct t2 { +#line 32 "variable.pgc" + struct varchar_name_3 { int len; char arr[ BUFFERSIZ ]; } name ; + } ;/* exec sql end declare section */ +#line 33 "variable.pgc" -#line 34 "variable.pgc" +#line 35 "variable.pgc" char * married = NULL ; -#line 34 "variable.pgc" +#line 35 "variable.pgc" -#line 35 "variable.pgc" +#line 36 "variable.pgc" long ind_married ; -#line 35 "variable.pgc" +#line 36 "variable.pgc" -#line 36 "variable.pgc" +#line 37 "variable.pgc" ind children ; -#line 36 "variable.pgc" +#line 37 "variable.pgc" char msg[128]; @@ -120,78 +127,78 @@ main (void) strcpy(msg, "connect"); { ECPGconnect(__LINE__, 0, "regress1" , NULL, NULL , NULL, 0); -#line 43 "variable.pgc" +#line 44 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 43 "variable.pgc" +#line 44 "variable.pgc" strcpy(msg, "set"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "set datestyle to iso", ECPGt_EOIT, ECPGt_EORT); -#line 46 "variable.pgc" +#line 47 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 46 "variable.pgc" +#line 47 "variable.pgc" strcpy(msg, "create"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer )", ECPGt_EOIT, ECPGt_EORT); -#line 49 "variable.pgc" +#line 50 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 49 "variable.pgc" +#line 50 "variable.pgc" strcpy(msg, "insert"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 )", ECPGt_EOIT, ECPGt_EORT); -#line 52 "variable.pgc" - -if (sqlca.sqlcode < 0) exit (1);} -#line 52 "variable.pgc" - - { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 )", ECPGt_EOIT, ECPGt_EORT); #line 53 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} #line 53 "variable.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 1' , 16 )", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 )", ECPGt_EOIT, ECPGt_EORT); #line 54 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} #line 54 "variable.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 2' , 14 )", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 1' , 16 )", ECPGt_EOIT, ECPGt_EORT); #line 55 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} #line 55 "variable.pgc" - { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 3' , 9 )", ECPGt_EOIT, ECPGt_EORT); + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 2' , 14 )", ECPGt_EOIT, ECPGt_EORT); #line 56 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} #line 56 "variable.pgc" + { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into family ( name , age ) values ( 'Child 3' , 9 )", ECPGt_EOIT, ECPGt_EORT); +#line 57 "variable.pgc" + +if (sqlca.sqlcode < 0) exit (1);} +#line 57 "variable.pgc" + strcpy(msg, "commit"); { ECPGtrans(__LINE__, NULL, "commit"); -#line 59 "variable.pgc" +#line 60 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 59 "variable.pgc" +#line 60 "variable.pgc" strcpy(msg, "open"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare cur cursor for select name , born , age , married , children from family", ECPGt_EOIT, ECPGt_EORT); -#line 62 "variable.pgc" +#line 63 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 62 "variable.pgc" +#line 63 "variable.pgc" /* exec sql whenever not found break ; */ -#line 64 "variable.pgc" +#line 65 "variable.pgc" p=&personal; @@ -200,7 +207,7 @@ if (sqlca.sqlcode < 0) exit (1);} while (1) { strcpy(msg, "fetch"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch cur", ECPGt_EOIT, - ECPGt_varchar,&(p->name),(long)BUFFERSIZ,(long)1,sizeof(struct varchar_name_25), + ECPGt_varchar,&(p->name),(long)BUFFERSIZ,(long)1,sizeof(struct varchar_name_1), ECPGt_int,&(i->ind_name),(long)1,(long)1,sizeof(int), ECPGt_long,&(p->birth.born),(long)1,(long)1,sizeof(long), ECPGt_long,&(i->ind_birth.born),(long)1,(long)1,sizeof(long), @@ -210,13 +217,13 @@ if (sqlca.sqlcode < 0) exit (1);} ECPGt_long,&(ind_married),(long)1,(long)1,sizeof(long), ECPGt_int,&(children.integer),(long)1,(long)1,sizeof(int), ECPGt_short,&(ind_children.smallint),(long)1,(long)1,sizeof(short), ECPGt_EORT); -#line 71 "variable.pgc" +#line 72 "variable.pgc" if (sqlca.sqlcode == ECPG_NOT_FOUND) break; -#line 71 "variable.pgc" +#line 72 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 71 "variable.pgc" +#line 72 "variable.pgc" printf("%8.8s", personal.name.arr); if (i->ind_birth.born >= 0) @@ -235,34 +242,34 @@ if (sqlca.sqlcode < 0) exit (1);} strcpy(msg, "close"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close cur", ECPGt_EOIT, ECPGt_EORT); -#line 88 "variable.pgc" +#line 89 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 88 "variable.pgc" +#line 89 "variable.pgc" strcpy(msg, "drop"); { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table family", ECPGt_EOIT, ECPGt_EORT); -#line 91 "variable.pgc" +#line 92 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 91 "variable.pgc" +#line 92 "variable.pgc" strcpy(msg, "commit"); { ECPGtrans(__LINE__, NULL, "commit"); -#line 94 "variable.pgc" +#line 95 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 94 "variable.pgc" +#line 95 "variable.pgc" strcpy(msg, "disconnect"); { ECPGdisconnect(__LINE__, "CURRENT"); -#line 97 "variable.pgc" +#line 98 "variable.pgc" if (sqlca.sqlcode < 0) exit (1);} -#line 97 "variable.pgc" +#line 98 "variable.pgc" return (0); diff --git a/src/interfaces/ecpg/test/expected/preproc-variable.stderr b/src/interfaces/ecpg/test/expected/preproc-variable.stderr index 8f02a7686c4..3ec974d3b03 100644 --- a/src/interfaces/ecpg/test/expected/preproc-variable.stderr +++ b/src/interfaces/ecpg/test/expected/preproc-variable.stderr @@ -2,167 +2,167 @@ [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]: ecpg_execute on line 46: query: set datestyle to iso; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 47: query: set datestyle to iso; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 46: using PQexec +[NO_PID]: ecpg_execute on line 47: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 46: OK: SET +[NO_PID]: ecpg_execute on line 47: OK: SET [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 49: query: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ); with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 50: query: create table family ( name char ( 8 ) , born integer , age smallint , married date , children integer ); with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 49: using PQexec +[NO_PID]: ecpg_execute on line 50: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 49: OK: CREATE TABLE +[NO_PID]: ecpg_execute on line 50: OK: CREATE TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 52: query: insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ); with 0 parameter(s) on connection regress1 -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 52: using PQexec -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 52: OK: INSERT 0 1 -[NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 53: query: insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ); with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 53: query: insert into family ( name , married , children ) values ( 'Mum' , '19870714' , 3 ); with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 53: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 53: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 54: query: insert into family ( name , age ) values ( 'Child 1' , 16 ); with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 54: query: insert into family ( name , born , married , children ) values ( 'Dad' , '19610721' , '19870714' , 3 ); with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 54: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 54: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 55: query: insert into family ( name , age ) values ( 'Child 2' , 14 ); with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 55: query: insert into family ( name , age ) values ( 'Child 1' , 16 ); with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 55: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 55: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 56: query: insert into family ( name , age ) values ( 'Child 3' , 9 ); with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 56: query: insert into family ( name , age ) values ( 'Child 2' , 14 ); with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 56: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_execute on line 56: OK: INSERT 0 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 59: action "commit"; connection "regress1" +[NO_PID]: ecpg_execute on line 57: query: insert into family ( name , age ) values ( 'Child 3' , 9 ); with 0 parameter(s) on connection regress1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 57: using PQexec +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ecpg_execute on line 57: OK: INSERT 0 1 +[NO_PID]: sqlca: code: 0, state: 00000 +[NO_PID]: ECPGtrans on line 60: action "commit"; connection "regress1" [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 62: query: declare cur cursor for select name , born , age , married , children from family; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 63: query: declare cur cursor for select name , born , age , married , children from family; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 62: using PQexec +[NO_PID]: ecpg_execute on line 63: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 62: OK: DECLARE CURSOR +[NO_PID]: ecpg_execute on line 63: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: query: fetch cur; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: using PQexec +[NO_PID]: ecpg_execute on line 72: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: Mum offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: Mum offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: 1987-07-14 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: 1987-07-14 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: 3 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: 3 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: query: fetch cur; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: using PQexec +[NO_PID]: ecpg_execute on line 72: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: Dad offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: Dad offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: 19610721 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: 19610721 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: 1987-07-14 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: 1987-07-14 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: 3 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: 3 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: query: fetch cur; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: using PQexec +[NO_PID]: ecpg_execute on line 72: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: Child 1 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: Child 1 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: 16 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: 16 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: query: fetch cur; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: using PQexec +[NO_PID]: ecpg_execute on line 72: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: Child 2 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: Child 2 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: 14 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: 14 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: query: fetch cur; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: using PQexec +[NO_PID]: ecpg_execute on line 72: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: correctly got 1 tuples with 5 fields +[NO_PID]: ecpg_execute on line 72: correctly got 1 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: Child 3 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: Child 3 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: 9 offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: 9 offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 71: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result on line 72: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 71: RESULT: offset: -1; array: no +[NO_PID]: ecpg_get_data on line 72: RESULT: offset: -1; array: no [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: query: fetch cur; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 72: query: fetch cur; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: using PQexec +[NO_PID]: ecpg_execute on line 72: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: correctly got 0 tuples with 5 fields +[NO_PID]: ecpg_execute on line 72: correctly got 0 tuples with 5 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: raising sqlcode 100 on line 71: no data found on line 71 +[NO_PID]: raising sqlcode 100 on line 72: no data found on line 72 [NO_PID]: sqlca: code: 100, state: 02000 -[NO_PID]: ecpg_execute on line 88: query: close cur; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 89: query: close cur; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 88: using PQexec +[NO_PID]: ecpg_execute on line 89: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 88: OK: CLOSE CURSOR +[NO_PID]: ecpg_execute on line 89: OK: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 91: query: drop table family; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 92: query: drop table family; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 91: using PQexec +[NO_PID]: ecpg_execute on line 92: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 91: OK: DROP TABLE +[NO_PID]: ecpg_execute on line 92: OK: DROP TABLE [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ECPGtrans on line 94: action "commit"; connection "regress1" +[NO_PID]: ECPGtrans on line 95: action "commit"; connection "regress1" [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_finish: connection regress1 closed [NO_PID]: sqlca: code: 0, state: 00000 diff --git a/src/interfaces/ecpg/test/preproc/variable.pgc b/src/interfaces/ecpg/test/preproc/variable.pgc index dcc575f8b4b..71efa0ddaf1 100644 --- a/src/interfaces/ecpg/test/preproc/variable.pgc +++ b/src/interfaces/ecpg/test/preproc/variable.pgc @@ -29,6 +29,7 @@ exec sql begin declare section; struct birthinfo ind_birth; } ind_personal, *i; ind ind_children; + struct t1 { str name; }; struct t2 { str name; }; exec sql end declare section; exec sql char *married = NULL; |