summaryrefslogtreecommitdiffstats
path: root/src/interfaces/ecpg/test/expected/sql-prepareas.c
blob: b925c4b5e5bc896b6f3d40aae6f5f04c54fb09a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
/* Processed by ecpg (regression mode) */
/* These include files are added by the preprocessor */
#include <ecpglib.h>
#include <ecpgerrno.h>
#include <sqlca.h>
/* End of automatic include section */
#define ECPGdebug(X,Y) ECPGdebug((X)+100,(Y))

#line 1 "prepareas.pgc"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>


#line 1 "regression.h"






#line 5 "prepareas.pgc"

/* exec sql whenever sqlerror  sqlprint ; */
#line 6 "prepareas.pgc"


static void
check_result_of_insert(void)
{
	/* exec sql begin declare section */
	      
	
#line 12 "prepareas.pgc"
 int ivar1 = 0 , ivar2 = 0 ;
/* exec sql end declare section */
#line 13 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "select c1 , c2 from test", ECPGt_EOIT, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT);
#line 15 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 15 "prepareas.pgc"

	printf("%d %d\n", ivar1, ivar2);
}

int main(void)
{
	/* exec sql begin declare section */
	      
	    
	
#line 22 "prepareas.pgc"
 int ivar1 = 1 , ivar2 = 2 ;
 
#line 23 "prepareas.pgc"
 char v_include_dq_name [ 16 ] , v_include_ws_name [ 16 ] , v_normal_name [ 16 ] , v_query [ 64 ] ;
/* exec sql end declare section */
#line 24 "prepareas.pgc"


	strcpy(v_normal_name, "normal_name");
	strcpy(v_include_dq_name, "include_\"_name");
	strcpy(v_include_ws_name, "include_ _name");
	strcpy(v_query, "insert into test values(?,?)");

	/*
	 * preparing for test
	 */
	{ ECPGconnect(__LINE__, 0, "ecpg1_regression" , NULL, NULL , NULL, 0); 
#line 34 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 34 "prepareas.pgc"

	{ ECPGtrans(__LINE__, NULL, "begin");
#line 35 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 35 "prepareas.pgc"

	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "create table test ( c1 int , c2 int )", ECPGt_EOIT, ECPGt_EORT);
#line 36 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 36 "prepareas.pgc"

	{ ECPGtrans(__LINE__, NULL, "commit work");
#line 37 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 37 "prepareas.pgc"

	{ ECPGtrans(__LINE__, NULL, "begin");
#line 38 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 38 "prepareas.pgc"


	/*
	 * Non dynamic statement
	 */
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 43 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 43 "prepareas.pgc"

	printf("+++++ Test for prepnormal +++++\n");
	printf("insert into test values(:ivar1,:ivar2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "insert into test values ( $1  , $2  )", 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 46 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 46 "prepareas.pgc"

	check_result_of_insert();

	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 49 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 49 "prepareas.pgc"

	printf("+++++ Test for execute immediate +++++\n");
	printf("execute immediate \"insert into test values(1,2)\"\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_immediate, "insert into test values(1,2)", ECPGt_EOIT, ECPGt_EORT);
#line 52 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 52 "prepareas.pgc"

	check_result_of_insert();

	/*
	 * PREPARE FROM
	 */
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 58 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 58 "prepareas.pgc"

	printf("+++++ Test for PREPARE ident FROM CString +++++\n");
	printf("prepare ident_name from \"insert into test values(?,?)\"\n");
	{ ECPGprepare(__LINE__, NULL, 0, "ident_name", "insert into test values(?,?)");
#line 61 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 61 "prepareas.pgc"

	printf("execute ident_name using :ivar1,:ivar2\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "ident_name", 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 63 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 63 "prepareas.pgc"

	check_result_of_insert();

	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 66 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 66 "prepareas.pgc"

	printf("+++++ Test for PREPARE char_variable_normal_name FROM char_variable +++++\n");
	printf("prepare :v_normal_name from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, v_normal_name, v_query);
#line 69 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 69 "prepareas.pgc"

	printf("execute :v_normal_name using :ivar1,:ivar2\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, v_normal_name, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 71 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 71 "prepareas.pgc"

	check_result_of_insert();

	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 74 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 74 "prepareas.pgc"

	printf("+++++ Test for PREPARE char_variable_inc_dq_name FROM char_variable +++++\n");
	printf("prepare :v_include_dq_name from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, v_include_dq_name, v_query);
#line 77 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 77 "prepareas.pgc"

	printf("execute :v_include_dq_name using :ivar1,:ivar2\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, v_include_dq_name, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 79 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 79 "prepareas.pgc"

	check_result_of_insert();

	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 82 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 82 "prepareas.pgc"

	printf("+++++ Test for PREPARE char_variable_inc_ws_name FROM char_variable +++++\n");
	printf("prepare :v_include_ws_name from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, v_include_ws_name, v_query);
#line 85 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 85 "prepareas.pgc"

	printf("execute :v_include_ws_name using :ivar1,:ivar2\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, v_include_ws_name, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 87 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 87 "prepareas.pgc"

	check_result_of_insert();

	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 90 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 90 "prepareas.pgc"

	printf("+++++ Test for PREPARE CString_inc_ws_name FROM char_variable +++++\n");
	printf("prepare \"include_ _name\" from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, "include_ _name", v_query);
#line 93 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 93 "prepareas.pgc"

	printf("exec sql execute \"include_ _name\" using :ivar1,:ivar2\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "include_ _name", 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 95 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 95 "prepareas.pgc"

	check_result_of_insert();

	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 98 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 98 "prepareas.pgc"

	printf("+++++ Test for PREPARE CString_normal_name FROM char_variable +++++\n");
	printf("prepare \"norma_name\" from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, "normal_name", v_query);
#line 101 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 101 "prepareas.pgc"

	printf("exec sql execute \"normal_name\" using :ivar1,:ivar2\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "normal_name", 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 103 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 103 "prepareas.pgc"

	check_result_of_insert();

	/*
	 * PREPARE AS
	 */
	{ ECPGdeallocate(__LINE__, 0, NULL, "ident_name");
#line 109 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 109 "prepareas.pgc"

	{ ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
#line 110 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 110 "prepareas.pgc"

	{ ECPGdeallocate(__LINE__, 0, NULL, "include_ _name");
#line 111 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 111 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 113 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 113 "prepareas.pgc"

	printf("+++++ Test for PREPARE ident(typelist) AS +++++\n");
	printf("prepare ident_name(int,int) as insert into test values($1,$2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )", 
	ECPGt_const,"ident_name",(long)10,(long)1,strlen("ident_name"), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 116 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 116 "prepareas.pgc"

	printf("execute ident_name(:ivar1,:ivar2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1  , $2  )", 
	ECPGt_const,"ident_name",(long)10,(long)1,strlen("ident_name"), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 118 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 118 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "ident_name");
#line 120 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 120 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 122 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 122 "prepareas.pgc"

	printf("+++++ Test for PREPARE CString_normal_name(typelist) AS +++++\n");
	printf("prepare \"normal_name\"(int,int) as insert into test values($1,$2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )", 
	ECPGt_const,"normal_name",(long)11,(long)1,strlen("normal_name"), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 125 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 125 "prepareas.pgc"

	printf("execute \"normal_name\"(:ivar1,:ivar2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1  , $2  )", 
	ECPGt_const,"normal_name",(long)11,(long)1,strlen("normal_name"), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 127 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 127 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
#line 129 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 129 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 131 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 131 "prepareas.pgc"

	printf("+++++ Test for PREPARE CString_include_ws_name(typelist) AS +++++\n");
	printf("prepare \"include_ _name\"(int,int) as insert into test values($1,$2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )", 
	ECPGt_const,"include_ _name",(long)14,(long)1,strlen("include_ _name"), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 134 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 134 "prepareas.pgc"

	printf("execute \"include_ _name\"(:ivar1,:ivar2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1  , $2  )", 
	ECPGt_const,"include_ _name",(long)14,(long)1,strlen("include_ _name"), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 136 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 136 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "include_ _name");
#line 138 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 138 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 140 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 140 "prepareas.pgc"

	printf("+++++ Test for PREPARE char_variable_normal_name(typelist) AS +++++\n");
	printf("prepare :v_normal_name(int,int) as insert into test values($1,$2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )", 
	ECPGt_char,(v_normal_name),(long)16,(long)1,(16)*sizeof(char), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 143 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 143 "prepareas.pgc"

	printf("execute :v_normal_name(:ivar1,:ivar2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1  , $2  )", 
	ECPGt_char,(v_normal_name),(long)16,(long)1,(16)*sizeof(char), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 145 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 145 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
#line 147 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 147 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 149 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 149 "prepareas.pgc"

	printf("+++++ Test for PREPARE char_variable_include_ws_name(typelist) AS +++++\n");
	printf("prepare :v_include_ws_name(int,int) as insert into test values($1,$2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_prepare, "prepare $0 ( int , int ) as insert into test values ( $1 , $2 )", 
	ECPGt_char,(v_include_ws_name),(long)16,(long)1,(16)*sizeof(char), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 152 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 152 "prepareas.pgc"

	printf("execute :v_include_ws_name(:ivar1,:ivar2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1  , $2  )", 
	ECPGt_char,(v_include_ws_name),(long)16,(long)1,(16)*sizeof(char), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 154 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 154 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "include_ _name");
#line 156 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 156 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 158 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 158 "prepareas.pgc"

	printf("+++++ Test for EXECUTE :v_normal_name(const,const) +++++\n");
	printf("prepare :v_normal_name from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, v_normal_name, v_query);
#line 161 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 161 "prepareas.pgc"

	printf("execute :v_normal_name(1,2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( 1 , 2 )", 
	ECPGt_char,(v_normal_name),(long)16,(long)1,(16)*sizeof(char), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 163 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 163 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
#line 165 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 165 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 167 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 167 "prepareas.pgc"

	printf("+++++ Test for EXECUTE :v_normal_name(expr,expr) +++++\n");
	printf("prepare :v_normal_name from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, v_normal_name, v_query);
#line 170 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 170 "prepareas.pgc"

	printf("execute :v_normal_name(0+1,1+1)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( 0 + 1 , 1 + 1 )", 
	ECPGt_char,(v_normal_name),(long)16,(long)1,(16)*sizeof(char), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 172 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 172 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "normal_name");
#line 174 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 174 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 176 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 176 "prepareas.pgc"

	printf("+++++ Test for combination PREPARE FROM and EXECUTE ident(typelist) +++++\n");
	printf("prepare ident_name from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, "ident_name", v_query);
#line 179 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 179 "prepareas.pgc"

	printf("execute ident_name(:ivar1,:ivar2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1  , $2  )", 
	ECPGt_const,"ident_name",(long)10,(long)1,strlen("ident_name"), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 181 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 181 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "ident_name");
#line 183 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 183 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "truncate test", ECPGt_EOIT, ECPGt_EORT);
#line 185 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 185 "prepareas.pgc"

	printf("+++++ Test for combination PREPARE FROM and EXECUTE CString_include_ws_name(typelist) +++++\n");
	printf("prepare \"include_ _name\" from :v_query\n");
	{ ECPGprepare(__LINE__, NULL, 0, "include_ _name", v_query);
#line 188 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 188 "prepareas.pgc"

	printf("execute \"include_ _name\"(:ivar1,:ivar2)\n");
	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_exec_with_exprlist, "execute $0 ( $1  , $2  )", 
	ECPGt_const,"include_ _name",(long)14,(long)1,strlen("include_ _name"), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar1),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, 
	ECPGt_int,&(ivar2),(long)1,(long)1,sizeof(int), 
	ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, ECPGt_EORT);
#line 190 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 190 "prepareas.pgc"

	check_result_of_insert();
	{ ECPGdeallocate(__LINE__, 0, NULL, "include_ _name");
#line 192 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 192 "prepareas.pgc"


	{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
#line 194 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 194 "prepareas.pgc"

	{ ECPGtrans(__LINE__, NULL, "commit work");
#line 195 "prepareas.pgc"

if (sqlca.sqlcode < 0) sqlprint();}
#line 195 "prepareas.pgc"


	return 0;
}