From 976a7d11560e4f932aff1c72fc2062ffaffaa3e9 Mon Sep 17 00:00:00 2001 From: Michael Meskes Date: Mon, 13 Jan 2014 10:41:53 +0100 Subject: [PATCH] Always use the same way to addres a descriptor in ecpg's regression tests. --- src/interfaces/ecpg/test/expected/sql-desc.c | 6 +++--- src/interfaces/ecpg/test/sql/desc.pgc | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/interfaces/ecpg/test/expected/sql-desc.c b/src/interfaces/ecpg/test/expected/sql-desc.c index b416b2fb87..75c15f2b1c 100644 --- a/src/interfaces/ecpg/test/expected/sql-desc.c +++ b/src/interfaces/ecpg/test/expected/sql-desc.c @@ -228,7 +228,7 @@ if (sqlca.sqlcode < 0) sqlprint();} { ECPGdo(__LINE__, 0, 1, NULL, 0, ECPGst_execute, "foo2", ECPGt_descriptor, "indesc", 1L, 1L, 1L, ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EOIT, - ECPGt_descriptor, "outdesc", 1L, 1L, 1L, + ECPGt_descriptor, (desc1), 1L, 1L, 1L, ECPGt_NO_INDICATOR, NULL , 0L, 0L, 0L, ECPGt_EORT); #line 53 "desc.pgc" @@ -236,7 +236,7 @@ if (sqlca.sqlcode < 0) sqlprint();} #line 53 "desc.pgc" - { ECPGget_desc(__LINE__, "outdesc", 1,ECPGd_data, + { ECPGget_desc(__LINE__, (desc1), 1,ECPGd_data, ECPGt_char,(val2output),(long)sizeof("AAA"),(long)1,(sizeof("AAA"))*sizeof(char), ECPGd_EODT); #line 55 "desc.pgc" @@ -366,7 +366,7 @@ if (sqlca.sqlcode < 0) sqlprint();} if (sqlca.sqlcode < 0) sqlprint(); #line 85 "desc.pgc" - ECPGdeallocate_desc(__LINE__, "outdesc"); + ECPGdeallocate_desc(__LINE__, (desc1)); #line 86 "desc.pgc" if (sqlca.sqlcode < 0) sqlprint(); diff --git a/src/interfaces/ecpg/test/sql/desc.pgc b/src/interfaces/ecpg/test/sql/desc.pgc index 136f326e10..abda77159f 100644 --- a/src/interfaces/ecpg/test/sql/desc.pgc +++ b/src/interfaces/ecpg/test/sql/desc.pgc @@ -50,9 +50,9 @@ main(void) EXEC SQL SET DESCRIPTOR indesc VALUE 1 DATA = :val1; EXEC SQL SET DESCRIPTOR indesc VALUE 2 INDICATOR = :val2i, DATA = :val2; - EXEC SQL EXECUTE foo2 USING SQL DESCRIPTOR indesc INTO SQL DESCRIPTOR outdesc; + EXEC SQL EXECUTE foo2 USING SQL DESCRIPTOR indesc INTO SQL DESCRIPTOR :desc1; - EXEC SQL GET DESCRIPTOR outdesc VALUE 1 :val2output = DATA; + EXEC SQL GET DESCRIPTOR :desc1 VALUE 1 :val2output = DATA; printf("output = %s\n", val2output); EXEC SQL DECLARE c1 CURSOR FOR foo2; @@ -83,7 +83,7 @@ main(void) EXEC SQL DISCONNECT; EXEC SQL DEALLOCATE DESCRIPTOR indesc; - EXEC SQL DEALLOCATE DESCRIPTOR outdesc; + EXEC SQL DEALLOCATE DESCRIPTOR :desc1; return 0; } -- 2.40.0