From 7ea38f045dad6bbb7fbe807f2486df7370bc0b0f Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Wed, 30 Jan 2019 13:58:25 +0100 Subject: Change error handling of out of scope variables in ecpg. The function called can result in an out of memory error that subsequently was disregarded. Instead it should set the appropriate SQL error variables and be checked by whatever whenever statement is defined. --- src/interfaces/ecpg/test/expected/sql-binary.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/interfaces/ecpg/test/expected/sql-binary.c') diff --git a/src/interfaces/ecpg/test/expected/sql-binary.c b/src/interfaces/ecpg/test/expected/sql-binary.c index 99244bbcef8..6d92ce344b6 100644 --- a/src/interfaces/ecpg/test/expected/sql-binary.c +++ b/src/interfaces/ecpg/test/expected/sql-binary.c @@ -101,6 +101,11 @@ if (sqlca.sqlcode < 0) exit (1);} ECPGset_var( 0, &( empl.idnum ), __LINE__);\ /* declare C cursor for select name , accs , byte from empl where idnum = $1 */ +#line 36 "binary.pgc" + +if (sqlca.sqlcode < 0) exit (1); +#line 36 "binary.pgc" + #line 36 "binary.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare C cursor for select name , accs , byte from empl where idnum = $1 ", @@ -135,6 +140,11 @@ if (sqlca.sqlcode < 0) exit (1);} memset(empl.name, 0, 21L); ECPGset_var( 1, &( empl.idnum ), __LINE__);\ /* declare B binary cursor for select name , accs , byte from empl where idnum = $1 */ +#line 44 "binary.pgc" + +if (sqlca.sqlcode < 0) exit (1); +#line 44 "binary.pgc" + #line 44 "binary.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare B binary cursor for select name , accs , byte from empl where idnum = $1 ", @@ -172,6 +182,11 @@ if (sqlca.sqlcode < 0) exit (1);} ECPGset_var( 2, &( empl.idnum ), __LINE__);\ /* declare A binary cursor for select byte from empl where idnum = $1 */ +#line 55 "binary.pgc" + +if (sqlca.sqlcode < 0) exit (1); +#line 55 "binary.pgc" + #line 55 "binary.pgc" { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_normal, "declare A binary cursor for select byte from empl where idnum = $1 ", -- cgit v1.2.3