]> granicus.if.org Git - postgresql/commitdiff
Fix closing of incorrectly named cursor.
authorMichael Meskes <meskes@postgresql.org>
Sat, 17 Mar 2018 16:24:32 +0000 (17:24 +0100)
committerMichael Meskes <meskes@postgresql.org>
Sat, 17 Mar 2018 17:15:33 +0000 (18:15 +0100)
Patch by "Shinoda, Noriyoshi" <noriyoshi.shinoda@hpe.com>

src/interfaces/ecpg/test/compat_oracle/char_array.pgc
src/interfaces/ecpg/test/expected/compat_oracle-char_array.c
src/interfaces/ecpg/test/expected/compat_oracle-char_array.stderr

index 5b5d0bb37b9c563eaf65b30a798b5fa22bb5d00f..8c33b18b7c85739a74b910cf73a0585706514ff8 100644 (file)
@@ -51,7 +51,7 @@ int main() {
     printf("\"%s\": \"%s\"  %d\n", bigstr, shortstr, shstr_ind);
   }
 
-  EXEC SQL close cstr;
+  EXEC SQL CLOSE C; 
   EXEC SQL DROP TABLE strdbase;
 
   printf("\nGOOD-BYE!!\n\n");
index a72736f673a8ac47178d1a44f376d8d95f00b2bf..c2ef09e354c83432a7a99499692bbaeebc246bbe 100644 (file)
@@ -178,7 +178,7 @@ if (sqlca.sqlcode < 0) sqlprint();}
     printf("\"%s\": \"%s\"  %d\n", bigstr, shortstr, shstr_ind);
   }
 
-  { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "close cstr", ECPGt_EOIT, ECPGt_EORT);
+  { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "close C", ECPGt_EOIT, ECPGt_EORT);
 #line 54 "char_array.pgc"
 
 if (sqlca.sqlwarn[0] == 'W') warn ( );
@@ -186,7 +186,7 @@ if (sqlca.sqlwarn[0] == 'W') warn ( );
 
 if (sqlca.sqlcode < 0) sqlprint();}
 #line 54 "char_array.pgc"
-
   { ECPGdo(__LINE__, 3, 1, NULL, 0, ECPGst_normal, "drop table strdbase", ECPGt_EOIT, ECPGt_EORT);
 #line 55 "char_array.pgc"
 
index 01766b634162968f0c5fde42ed61dc59f76332ca..40d9f7ddb04af3fdafe934a4d44909d8130ed1ff 100644 (file)
@@ -121,24 +121,18 @@ Warning: At least one column was truncated
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: raising sqlcode 100 on line 50: no data found on line 50
 [NO_PID]: sqlca: code: 100, state: 02000
-[NO_PID]: ecpg_execute on line 54: query: close cstr; with 0 parameter(s) on connection ecpg1_regression
+[NO_PID]: ecpg_execute on line 54: query: close C; with 0 parameter(s) on connection ecpg1_regression
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_execute on line 54: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_check_PQresult on line 54: bad response - ERROR:  cursor "cstr" does not exist
+[NO_PID]: ecpg_process_output on line 54: OK: CLOSE CURSOR
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlstate 34000 (sqlcode -400): cursor "cstr" does not exist on line 54
-[NO_PID]: sqlca: code: -400, state: 34000
-SQL error: cursor "cstr" does not exist on line 54
 [NO_PID]: ecpg_execute on line 55: query: drop table strdbase; with 0 parameter(s) on connection ecpg1_regression
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_execute on line 55: using PQexec
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: ecpg_check_PQresult on line 55: bad response - ERROR:  current transaction is aborted, commands ignored until end of transaction block
+[NO_PID]: ecpg_process_output on line 55: OK: DROP TABLE
 [NO_PID]: sqlca: code: 0, state: 00000
-[NO_PID]: raising sqlstate 25P02 (sqlcode -400): current transaction is aborted, commands ignored until end of transaction block on line 55
-[NO_PID]: sqlca: code: -400, state: 25P02
-SQL error: current transaction is aborted, commands ignored until end of transaction block on line 55
 [NO_PID]: ECPGtrans on line 59: action "commit work"; connection "ecpg1_regression"
 [NO_PID]: sqlca: code: 0, state: 00000
 [NO_PID]: ecpg_finish: connection ecpg1_regression closed