summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test/expected/preproc-cursor.c
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2019-01-30 13:58:25 +0100
committerMichael Meskes <meskes@postgresql.org>2019-01-30 14:35:52 +0100
commit7ea38f045dad6bbb7fbe807f2486df7370bc0b0f (patch)
tree4245ff47ee0353ac7cdaddeaae171e1af79c1565 /src/interfaces/ecpg/test/expected/preproc-cursor.c
parente2f731cdba9b7a79cddc64325990a8f51818877b (diff)
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.
Diffstat (limited to 'src/interfaces/ecpg/test/expected/preproc-cursor.c')
-rw-r--r--src/interfaces/ecpg/test/expected/preproc-cursor.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/interfaces/ecpg/test/expected/preproc-cursor.c b/src/interfaces/ecpg/test/expected/preproc-cursor.c
index 48229017421..a4e7b12c17a 100644
--- a/src/interfaces/ecpg/test/expected/preproc-cursor.c
+++ b/src/interfaces/ecpg/test/expected/preproc-cursor.c
@@ -185,6 +185,11 @@ if (sqlca.sqlcode < 0) exit (1);}
/* declare $0 cursor for select id , t from t1 */
#line 64 "cursor.pgc"
+if (sqlca.sqlcode < 0) exit (1);
+#line 64 "cursor.pgc"
+
+#line 64 "cursor.pgc"
+
strcpy(msg, "open");
{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for select id , t from t1",
@@ -321,6 +326,11 @@ if (sqlca.sqlcode < 0) exit (1);}
/* declare $0 cursor for select id , t from t1 */
#line 105 "cursor.pgc"
+if (sqlca.sqlcode < 0) exit (1);
+#line 105 "cursor.pgc"
+
+#line 105 "cursor.pgc"
+
strcpy(msg, "open");
{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for select id , t from t1",
@@ -477,10 +487,20 @@ if (sqlca.sqlcode < 0) exit (1);}
/* declare $0 cursor for $1 */
#line 149 "cursor.pgc"
+if (sqlca.sqlcode < 0) exit (1);
+#line 149 "cursor.pgc"
+
+#line 149 "cursor.pgc"
+
ECPGset_var( 5, &( curname5 ), __LINE__);\
/* declare $0 cursor for $1 */
#line 150 "cursor.pgc"
+if (sqlca.sqlcode < 0) exit (1);
+#line 150 "cursor.pgc"
+
+#line 150 "cursor.pgc"
+
strcpy(msg, "open");
{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for $1",
@@ -661,6 +681,11 @@ if (sqlca.sqlcode < 0) exit (1);}
/* declare $0 cursor for $1 */
#line 203 "cursor.pgc"
+if (sqlca.sqlcode < 0) exit (1);
+#line 203 "cursor.pgc"
+
+#line 203 "cursor.pgc"
+
strcpy(msg, "open");
{ ECPGdo(__LINE__, 0, 1, "test1", 0, ECPGst_normal, "declare $0 cursor for $1",