From 80f95a6500d7f5762e4701c80eb202c3fce9095f Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Mon, 2 Feb 2009 16:54:28 +0000 Subject: [PATCH] When changing a regression test file one should also change the expected output file. --- .../ecpg/test/expected/sql-binary.c | 19 +++---- .../ecpg/test/expected/sql-binary.stderr | 50 +++++++++---------- 2 files changed, 35 insertions(+), 34 deletions(-) diff --git a/src/interfaces/ecpg/test/expected/sql-binary.c b/src/interfaces/ecpg/test/expected/sql-binary.c index 95f8056917..95b5ae2a64 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.c +++ b/src/interfaces/ecpg/test/expected/sql-binary.c @@ -123,13 +123,14 @@ main (void) printf ("name=%s, accs=%d byte=%s\n", empl.name, empl.accs, empl.byte); + memset(empl.name, 0, 21L); /* declare B binary cursor for select name , accs , byte from empl where idnum = $1 */ -#line 62 "binary.pgc" +#line 63 "binary.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare B binary cursor for select name , accs , byte from empl where idnum = $1 ", ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);} -#line 63 "binary.pgc" +#line 64 "binary.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch B", ECPGt_EOIT, ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char), @@ -138,7 +139,7 @@ main (void) ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_char,(empl.byte),(long)20,(long)1,(20)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);} -#line 64 "binary.pgc" +#line 65 "binary.pgc" if (sqlca.sqlcode) { @@ -147,7 +148,7 @@ main (void) } { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close B", ECPGt_EOIT, ECPGt_EORT);} -#line 71 "binary.pgc" +#line 72 "binary.pgc" /* do not print a.accs because big/little endian will have different outputs here */ @@ -157,17 +158,17 @@ main (void) printf("\n"); /* declare A binary cursor for select byte from empl where idnum = $1 */ -#line 79 "binary.pgc" +#line 80 "binary.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare A binary cursor for select byte from empl where idnum = $1 ", ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);} -#line 80 "binary.pgc" +#line 81 "binary.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch A", ECPGt_EOIT, ECPGt_char,&(pointer),(long)0,(long)1,(1)*sizeof(char), ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);} -#line 81 "binary.pgc" +#line 82 "binary.pgc" if (sqlca.sqlcode) { @@ -176,7 +177,7 @@ main (void) } { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close A", ECPGt_EOIT, ECPGt_EORT);} -#line 88 "binary.pgc" +#line 89 "binary.pgc" printf ("pointer="); @@ -186,7 +187,7 @@ main (void) free(pointer); { ECPGdisconnect(__LINE__, "CURRENT");} -#line 96 "binary.pgc" +#line 97 "binary.pgc" exit (0); } diff --git a/src/interfaces/ecpg/test/expected/sql-binary.stderr b/src/interfaces/ecpg/test/expected/sql-binary.stderr index f0530f24c1..81f82afb76 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.stderr +++ b/src/interfaces/ecpg/test/expected/sql-binary.stderr @@ -36,55 +36,55 @@ [NO_PID]: sqlca: code: 0, state: 00000 [NO_PID]: ecpg_get_data on line 53: RESULT: \001m\000\212 offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 63: query: declare B binary cursor for select name , accs , byte from empl where idnum = $1 ; with 1 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 64: query: declare B binary cursor for select name , accs , byte from empl where idnum = $1 ; with 1 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 63: using PQexecParams +[NO_PID]: ecpg_execute on line 64: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 63: parameter 1 = 1 +[NO_PID]: free_params on line 64: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 63: OK: DECLARE CURSOR +[NO_PID]: ecpg_execute on line 64: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 64: query: fetch B; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 65: query: fetch B; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 64: using PQexec +[NO_PID]: ecpg_execute on line 65: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 64: correctly got 1 tuples with 3 fields +[NO_PID]: ecpg_execute on line 65: correctly got 1 tuples with 3 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 64: RESULT: BINARY offset: -1; array: yes +[NO_PID]: ecpg_get_data on line 65: RESULT: BINARY offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 64: RESULT: BINARY offset: -1; array: yes +[NO_PID]: ecpg_get_data on line 65: RESULT: BINARY offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 64: RESULT: BINARY offset: -1; array: yes +[NO_PID]: ecpg_get_data on line 65: RESULT: BINARY offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 71: query: close B; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 72: query: close B; 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: OK: CLOSE CURSOR +[NO_PID]: ecpg_execute on line 72: OK: CLOSE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 80: query: declare A binary cursor for select byte from empl where idnum = $1 ; with 1 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 81: query: declare A binary cursor for select byte from empl where idnum = $1 ; with 1 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 80: using PQexecParams +[NO_PID]: ecpg_execute on line 81: using PQexecParams [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: free_params on line 80: parameter 1 = 1 +[NO_PID]: free_params on line 81: parameter 1 = 1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 80: OK: DECLARE CURSOR +[NO_PID]: ecpg_execute on line 81: OK: DECLARE CURSOR [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: query: fetch A; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 82: query: fetch A; with 0 parameter(s) on connection regress1 [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: using PQexec +[NO_PID]: ecpg_execute on line 82: using PQexec [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 81: correctly got 1 tuples with 1 fields +[NO_PID]: ecpg_execute on line 82: correctly got 1 tuples with 1 fields [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_store_result on line 81: allocating memory for 1 tuples +[NO_PID]: ecpg_store_result on line 82: allocating memory for 1 tuples [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_get_data on line 81: RESULT: BINARY offset: -1; array: yes +[NO_PID]: ecpg_get_data on line 82: RESULT: BINARY offset: -1; array: yes [NO_PID]: sqlca: code: 0, state: 00000 -[NO_PID]: ecpg_execute on line 88: query: close A; with 0 parameter(s) on connection regress1 +[NO_PID]: ecpg_execute on line 89: query: close A; 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_finish: connection regress1 closed [NO_PID]: sqlca: code: 0, state: 00000