Skip to content

Commit 80f95a6

Browse files
author
Michael Meskes
committed
When changing a regression test file one should also change the expected output file.
1 parent 934eab7 commit 80f95a6

File tree

2 files changed

+35
-34
lines changed

2 files changed

+35
-34
lines changed

src/interfaces/ecpg/test/expected/sql-binary.c

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -123,13 +123,14 @@ main (void)
123123

124124
printf ("name=%s, accs=%d byte=%s\n", empl.name, empl.accs, empl.byte);
125125

126+
memset(empl.name, 0, 21L);
126127
/* declare B binary cursor for select name , accs , byte from empl where idnum = $1 */
127-
#line 62 "binary.pgc"
128+
#line 63 "binary.pgc"
128129

129130
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare B binary cursor for select name , accs , byte from empl where idnum = $1 ",
130131
ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
131132
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
132-
#line 63 "binary.pgc"
133+
#line 64 "binary.pgc"
133134

134135
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch B", ECPGt_EOIT,
135136
ECPGt_char,(empl.name),(long)21,(long)1,(21)*sizeof(char),
@@ -138,7 +139,7 @@ main (void)
138139
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L,
139140
ECPGt_char,(empl.byte),(long)20,(long)1,(20)*sizeof(char),
140141
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
141-
#line 64 "binary.pgc"
142+
#line 65 "binary.pgc"
142143

143144
if (sqlca.sqlcode)
144145
{
@@ -147,7 +148,7 @@ main (void)
147148
}
148149

149150
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close B", ECPGt_EOIT, ECPGt_EORT);}
150-
#line 71 "binary.pgc"
151+
#line 72 "binary.pgc"
151152

152153

153154
/* do not print a.accs because big/little endian will have different outputs here */
@@ -157,17 +158,17 @@ main (void)
157158
printf("\n");
158159

159160
/* declare A binary cursor for select byte from empl where idnum = $1 */
160-
#line 79 "binary.pgc"
161+
#line 80 "binary.pgc"
161162

162163
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare A binary cursor for select byte from empl where idnum = $1 ",
163164
ECPGt_long,&(empl.idnum),(long)1,(long)1,sizeof(long),
164165
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);}
165-
#line 80 "binary.pgc"
166+
#line 81 "binary.pgc"
166167

167168
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "fetch A", ECPGt_EOIT,
168169
ECPGt_char,&(pointer),(long)0,(long)1,(1)*sizeof(char),
169170
ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);}
170-
#line 81 "binary.pgc"
171+
#line 82 "binary.pgc"
171172

172173
if (sqlca.sqlcode)
173174
{
@@ -176,7 +177,7 @@ main (void)
176177
}
177178

178179
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "close A", ECPGt_EOIT, ECPGt_EORT);}
179-
#line 88 "binary.pgc"
180+
#line 89 "binary.pgc"
180181

181182

182183
printf ("pointer=");
@@ -186,7 +187,7 @@ main (void)
186187
free(pointer);
187188

188189
{ ECPGdisconnect(__LINE__, "CURRENT");}
189-
#line 96 "binary.pgc"
190+
#line 97 "binary.pgc"
190191

191192
exit (0);
192193
}

src/interfaces/ecpg/test/expected/sql-binary.stderr

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -36,55 +36,55 @@
3636
[NO_PID]: sqlca: code: 0, state: 00000
3737
[NO_PID]: ecpg_get_data on line 53: RESULT: \001m\000\212 offset: -1; array: yes
3838
[NO_PID]: sqlca: code: 0, state: 00000
39-
[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
39+
[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
4040
[NO_PID]: sqlca: code: 0, state: 00000
41-
[NO_PID]: ecpg_execute on line 63: using PQexecParams
41+
[NO_PID]: ecpg_execute on line 64: using PQexecParams
4242
[NO_PID]: sqlca: code: 0, state: 00000
43-
[NO_PID]: free_params on line 63: parameter 1 = 1
43+
[NO_PID]: free_params on line 64: parameter 1 = 1
4444
[NO_PID]: sqlca: code: 0, state: 00000
45-
[NO_PID]: ecpg_execute on line 63: OK: DECLARE CURSOR
45+
[NO_PID]: ecpg_execute on line 64: OK: DECLARE CURSOR
4646
[NO_PID]: sqlca: code: 0, state: 00000
47-
[NO_PID]: ecpg_execute on line 64: query: fetch B; with 0 parameter(s) on connection regress1
47+
[NO_PID]: ecpg_execute on line 65: query: fetch B; with 0 parameter(s) on connection regress1
4848
[NO_PID]: sqlca: code: 0, state: 00000
49-
[NO_PID]: ecpg_execute on line 64: using PQexec
49+
[NO_PID]: ecpg_execute on line 65: using PQexec
5050
[NO_PID]: sqlca: code: 0, state: 00000
51-
[NO_PID]: ecpg_execute on line 64: correctly got 1 tuples with 3 fields
51+
[NO_PID]: ecpg_execute on line 65: correctly got 1 tuples with 3 fields
5252
[NO_PID]: sqlca: code: 0, state: 00000
53-
[NO_PID]: ecpg_get_data on line 64: RESULT: BINARY offset: -1; array: yes
53+
[NO_PID]: ecpg_get_data on line 65: RESULT: BINARY offset: -1; array: yes
5454
[NO_PID]: sqlca: code: 0, state: 00000
55-
[NO_PID]: ecpg_get_data on line 64: RESULT: BINARY offset: -1; array: yes
55+
[NO_PID]: ecpg_get_data on line 65: RESULT: BINARY offset: -1; array: yes
5656
[NO_PID]: sqlca: code: 0, state: 00000
57-
[NO_PID]: ecpg_get_data on line 64: RESULT: BINARY offset: -1; array: yes
57+
[NO_PID]: ecpg_get_data on line 65: RESULT: BINARY offset: -1; array: yes
5858
[NO_PID]: sqlca: code: 0, state: 00000
59-
[NO_PID]: ecpg_execute on line 71: query: close B; with 0 parameter(s) on connection regress1
59+
[NO_PID]: ecpg_execute on line 72: query: close B; with 0 parameter(s) on connection regress1
6060
[NO_PID]: sqlca: code: 0, state: 00000
61-
[NO_PID]: ecpg_execute on line 71: using PQexec
61+
[NO_PID]: ecpg_execute on line 72: using PQexec
6262
[NO_PID]: sqlca: code: 0, state: 00000
63-
[NO_PID]: ecpg_execute on line 71: OK: CLOSE CURSOR
63+
[NO_PID]: ecpg_execute on line 72: OK: CLOSE CURSOR
6464
[NO_PID]: sqlca: code: 0, state: 00000
65-
[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
65+
[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
6666
[NO_PID]: sqlca: code: 0, state: 00000
67-
[NO_PID]: ecpg_execute on line 80: using PQexecParams
67+
[NO_PID]: ecpg_execute on line 81: using PQexecParams
6868
[NO_PID]: sqlca: code: 0, state: 00000
69-
[NO_PID]: free_params on line 80: parameter 1 = 1
69+
[NO_PID]: free_params on line 81: parameter 1 = 1
7070
[NO_PID]: sqlca: code: 0, state: 00000
71-
[NO_PID]: ecpg_execute on line 80: OK: DECLARE CURSOR
71+
[NO_PID]: ecpg_execute on line 81: OK: DECLARE CURSOR
7272
[NO_PID]: sqlca: code: 0, state: 00000
73-
[NO_PID]: ecpg_execute on line 81: query: fetch A; with 0 parameter(s) on connection regress1
73+
[NO_PID]: ecpg_execute on line 82: query: fetch A; with 0 parameter(s) on connection regress1
7474
[NO_PID]: sqlca: code: 0, state: 00000
75-
[NO_PID]: ecpg_execute on line 81: using PQexec
75+
[NO_PID]: ecpg_execute on line 82: using PQexec
7676
[NO_PID]: sqlca: code: 0, state: 00000
77-
[NO_PID]: ecpg_execute on line 81: correctly got 1 tuples with 1 fields
77+
[NO_PID]: ecpg_execute on line 82: correctly got 1 tuples with 1 fields
7878
[NO_PID]: sqlca: code: 0, state: 00000
79-
[NO_PID]: ecpg_store_result on line 81: allocating memory for 1 tuples
79+
[NO_PID]: ecpg_store_result on line 82: allocating memory for 1 tuples
8080
[NO_PID]: sqlca: code: 0, state: 00000
81-
[NO_PID]: ecpg_get_data on line 81: RESULT: BINARY offset: -1; array: yes
81+
[NO_PID]: ecpg_get_data on line 82: RESULT: BINARY offset: -1; array: yes
8282
[NO_PID]: sqlca: code: 0, state: 00000
83-
[NO_PID]: ecpg_execute on line 88: query: close A; with 0 parameter(s) on connection regress1
83+
[NO_PID]: ecpg_execute on line 89: query: close A; with 0 parameter(s) on connection regress1
8484
[NO_PID]: sqlca: code: 0, state: 00000
85-
[NO_PID]: ecpg_execute on line 88: using PQexec
85+
[NO_PID]: ecpg_execute on line 89: using PQexec
8686
[NO_PID]: sqlca: code: 0, state: 00000
87-
[NO_PID]: ecpg_execute on line 88: OK: CLOSE CURSOR
87+
[NO_PID]: ecpg_execute on line 89: OK: CLOSE CURSOR
8888
[NO_PID]: sqlca: code: 0, state: 00000
8989
[NO_PID]: ecpg_finish: connection regress1 closed
9090
[NO_PID]: sqlca: code: 0, state: 00000

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy