Changed test case slightly so it doesn't have an unused typedef.

This commit is contained in:
Michael Meskes 2013-11-03 15:37:34 +01:00
parent 2a781d57dc
commit 84a05d479e
3 changed files with 19 additions and 14 deletions

View File

@ -125,16 +125,20 @@ if (sqlca.sqlcode < 0) sqlprint();}
for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
{
/* exec sql begin declare section */
#line 48 "define.pgc"
char n [ 8 ] , l = letter [ i ] [ 0 ] ;
string n ;
#line 49 "define.pgc"
char l = letter [ i ] [ 0 ] ;
#line 50 "define.pgc"
int a = amount [ i ] ;
/* exec sql end declare section */
#line 50 "define.pgc"
#line 51 "define.pgc"
strncpy(n, name[i], 8);
@ -142,22 +146,22 @@ if (sqlca.sqlcode < 0) sqlprint();}
}
{ ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "drop table test", ECPGt_EOIT, ECPGt_EORT);
#line 56 "define.pgc"
#line 57 "define.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 56 "define.pgc"
#line 57 "define.pgc"
{ ECPGtrans(__LINE__, NULL, "commit");
#line 57 "define.pgc"
#line 58 "define.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 57 "define.pgc"
#line 58 "define.pgc"
{ ECPGdisconnect(__LINE__, "CURRENT");
#line 58 "define.pgc"
#line 59 "define.pgc"
if (sqlca.sqlcode < 0) sqlprint();}
#line 58 "define.pgc"
#line 59 "define.pgc"
return (0);

View File

@ -42,13 +42,13 @@
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_get_data on line 43: RESULT: t offset: -1; array: no
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 56: query: drop table test; with 0 parameter(s) on connection regress1
[NO_PID]: ecpg_execute on line 57: query: drop table test; 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]: ecpg_execute on line 57: using PQexec
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ecpg_execute on line 56: OK: DROP TABLE
[NO_PID]: ecpg_execute on line 57: OK: DROP TABLE
[NO_PID]: sqlca: code: 0, state: 00000
[NO_PID]: ECPGtrans on line 57: action "commit"; connection "regress1"
[NO_PID]: ECPGtrans on line 58: 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

View File

@ -45,7 +45,8 @@ exec sql end declare section;
for (i=0, j=sqlca.sqlerrd[2]; i<j; i++)
{
exec sql begin declare section;
char n[8], l = letter[i][0];
string n;
char l = letter[i][0];
int a = amount[i];
exec sql end declare section;