@@ -200,116 +200,117 @@ if (sqlca.sqlcode < 0) sqlprint();}
200200
201201dump_binary (recv_vlen_buf [0 ].arr ,recv_vlen_buf [0 ].len ,0 );
202202dump_binary (recv_vlen_buf [1 ].arr ,recv_vlen_buf [1 ].len ,0 );
203+ free (recv_vlen_buf );
203204
204205/* Test for dynamic sql statement with normal host variable, indicator */
205206init ();
206207{ECPGdo (__LINE__ ,0 ,1 ,NULL ,0 ,ECPGst_normal ,"truncate test" ,ECPGt_EOIT ,ECPGt_EORT );
207- #line 86 "bytea.pgc"
208+ #line 87 "bytea.pgc"
208209
209210if (sqlca .sqlcode < 0 )sqlprint ();}
210- #line 86 "bytea.pgc"
211+ #line 87 "bytea.pgc"
211212
212213{ECPGdo (__LINE__ ,0 ,1 ,NULL ,0 ,ECPGst_execute ,"ins_stmt" ,
213214ECPGt_bytea ,& (send_buf [0 ]),(long )DATA_SIZE ,(long )1 ,sizeof (struct bytea_1 ),
214215ECPGt_NO_INDICATOR ,NULL ,0L ,0L ,0L ,
215216ECPGt_bytea ,& (send_buf [1 ]),(long )DATA_SIZE ,(long )1 ,sizeof (struct bytea_1 ),
216217ECPGt_NO_INDICATOR ,NULL ,0L ,0L ,0L ,ECPGt_EOIT ,ECPGt_EORT );
217- #line 87 "bytea.pgc"
218+ #line 88 "bytea.pgc"
218219
219220if (sqlca .sqlcode < 0 )sqlprint ();}
220- #line 87 "bytea.pgc"
221+ #line 88 "bytea.pgc"
221222
222223{ECPGdo (__LINE__ ,0 ,1 ,NULL ,0 ,ECPGst_execute ,"sel_stmt" ,ECPGt_EOIT ,
223224ECPGt_bytea ,& (recv_buf [0 ]),(long )DATA_SIZE ,(long )1 ,sizeof (struct bytea_2 ),
224225ECPGt_int ,& (ind [0 ]),(long )1 ,(long )1 ,sizeof (int ),
225226ECPGt_bytea ,& (recv_short_buf ),(long )DATA_SIZE - LACK_SIZE ,(long )1 ,sizeof (struct bytea_4 ),
226227ECPGt_int ,& (ind [1 ]),(long )1 ,(long )1 ,sizeof (int ),ECPGt_EORT );
227- #line 88 "bytea.pgc"
228+ #line 89 "bytea.pgc"
228229
229230if (sqlca .sqlcode < 0 )sqlprint ();}
230- #line 88 "bytea.pgc"
231+ #line 89 "bytea.pgc"
231232
232233dump_binary (recv_buf [0 ].arr ,recv_buf [0 ].len ,ind [0 ]);
233234dump_binary (recv_short_buf .arr ,recv_short_buf .len ,ind [1 ]);
234235
235236/* Test for dynamic sql statement with sql descriptor */
236237init ();
237238{ECPGdo (__LINE__ ,0 ,1 ,NULL ,0 ,ECPGst_normal ,"truncate test" ,ECPGt_EOIT ,ECPGt_EORT );
238- #line 94 "bytea.pgc"
239+ #line 95 "bytea.pgc"
239240
240241if (sqlca .sqlcode < 0 )sqlprint ();}
241- #line 94 "bytea.pgc"
242+ #line 95 "bytea.pgc"
242243
243244{ECPGset_desc (__LINE__ ,"idesc" ,1 ,ECPGd_data ,
244245ECPGt_bytea ,& (send_buf [0 ]),(long )DATA_SIZE ,(long )1 ,sizeof (struct bytea_1 ),ECPGd_EODT );
245246
246- #line 95 "bytea.pgc"
247+ #line 96 "bytea.pgc"
247248
248249if (sqlca .sqlcode < 0 )sqlprint ();}
249- #line 95 "bytea.pgc"
250+ #line 96 "bytea.pgc"
250251
251252{ECPGset_desc (__LINE__ ,"idesc" ,2 ,ECPGd_data ,
252253ECPGt_bytea ,& (send_buf [1 ]),(long )DATA_SIZE ,(long )1 ,sizeof (struct bytea_1 ),ECPGd_EODT );
253254
254- #line 96 "bytea.pgc"
255+ #line 97 "bytea.pgc"
255256
256257if (sqlca .sqlcode < 0 )sqlprint ();}
257- #line 96 "bytea.pgc"
258+ #line 97 "bytea.pgc"
258259
259260{ECPGdo (__LINE__ ,0 ,1 ,NULL ,0 ,ECPGst_execute ,"ins_stmt" ,
260261ECPGt_descriptor ,"idesc" ,1L ,1L ,1L ,
261262ECPGt_NO_INDICATOR ,NULL ,0L ,0L ,0L ,ECPGt_EOIT ,ECPGt_EORT );
262- #line 97 "bytea.pgc"
263+ #line 98 "bytea.pgc"
263264
264265if (sqlca .sqlcode < 0 )sqlprint ();}
265- #line 97 "bytea.pgc"
266+ #line 98 "bytea.pgc"
266267
267268{ECPGdo (__LINE__ ,0 ,1 ,NULL ,0 ,ECPGst_execute ,"sel_stmt" ,ECPGt_EOIT ,
268269ECPGt_descriptor ,"odesc" ,1L ,1L ,1L ,
269270ECPGt_NO_INDICATOR ,NULL ,0L ,0L ,0L ,ECPGt_EORT );
270- #line 98 "bytea.pgc"
271+ #line 99 "bytea.pgc"
271272
272273if (sqlca .sqlcode < 0 )sqlprint ();}
273- #line 98 "bytea.pgc"
274+ #line 99 "bytea.pgc"
274275
275276{ECPGget_desc (__LINE__ ,"odesc" ,1 ,ECPGd_indicator ,
276277ECPGt_int ,& (ind [0 ]),(long )1 ,(long )1 ,sizeof (int ),ECPGd_data ,
277278ECPGt_bytea ,& (recv_buf [0 ]),(long )DATA_SIZE ,(long )1 ,sizeof (struct bytea_2 ),ECPGd_EODT );
278279
279- #line 99 "bytea.pgc"
280+ #line 100 "bytea.pgc"
280281
281282if (sqlca .sqlcode < 0 )sqlprint ();}
282- #line 99 "bytea.pgc"
283+ #line 100 "bytea.pgc"
283284
284285{ECPGget_desc (__LINE__ ,"odesc" ,2 ,ECPGd_indicator ,
285286ECPGt_int ,& (ind [1 ]),(long )1 ,(long )1 ,sizeof (int ),ECPGd_data ,
286287ECPGt_bytea ,& (recv_short_buf ),(long )DATA_SIZE - LACK_SIZE ,(long )1 ,sizeof (struct bytea_4 ),ECPGd_EODT );
287288
288- #line 100 "bytea.pgc"
289+ #line 101 "bytea.pgc"
289290
290291if (sqlca .sqlcode < 0 )sqlprint ();}
291- #line 100 "bytea.pgc"
292+ #line 101 "bytea.pgc"
292293
293294dump_binary (recv_buf [0 ].arr ,recv_buf [0 ].len ,ind [0 ]);
294295dump_binary (recv_short_buf .arr ,recv_short_buf .len ,ind [1 ]);
295296
296297{ECPGdo (__LINE__ ,0 ,1 ,NULL ,0 ,ECPGst_normal ,"drop table test" ,ECPGt_EOIT ,ECPGt_EORT );
297- #line 104 "bytea.pgc"
298+ #line 105 "bytea.pgc"
298299
299300if (sqlca .sqlcode < 0 )sqlprint ();}
300- #line 104 "bytea.pgc"
301+ #line 105 "bytea.pgc"
301302
302303{ECPGtrans (__LINE__ ,NULL ,"commit" );
303- #line 105 "bytea.pgc"
304+ #line 106 "bytea.pgc"
304305
305306if (sqlca .sqlcode < 0 )sqlprint ();}
306- #line 105 "bytea.pgc"
307+ #line 106 "bytea.pgc"
307308
308309{ECPGdisconnect (__LINE__ ,"CURRENT" );
309- #line 106 "bytea.pgc"
310+ #line 107 "bytea.pgc"
310311
311312if (sqlca .sqlcode < 0 )sqlprint ();}
312- #line 106 "bytea.pgc"
313+ #line 107 "bytea.pgc"
313314
314315
315316return 0 ;