Commit 54847b25 authored by Michael Meskes's avatar Michael Meskes

*** empty log message ***

parent 04fa5ca5
...@@ -726,3 +726,7 @@ Tue Nov 23 07:59:01 CET 1999 ...@@ -726,3 +726,7 @@ Tue Nov 23 07:59:01 CET 1999
- Ignore locale setting in ECPGdo. - Ignore locale setting in ECPGdo.
- Set library version to 3.0.7. - Set library version to 3.0.7.
Fri Dec 3 16:35:07 CET 1999
- Fixed memory leak in ecpglib.
- Set library version to 3.0.8.
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
# Copyright (c) 1994, Regents of the University of California # Copyright (c) 1994, Regents of the University of California
# #
# IDENTIFICATION # IDENTIFICATION
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.52 1999/11/23 10:32:16 meskes Exp $ # $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.53 1999/12/07 10:29:16 meskes Exp $
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
NAME= ecpg NAME= ecpg
SO_MAJOR_VERSION= 3 SO_MAJOR_VERSION= 3
SO_MINOR_VERSION= 0.7 SO_MINOR_VERSION= 0.8
SRCDIR= @top_srcdir@ SRCDIR= @top_srcdir@
include $(SRCDIR)/Makefile.global include $(SRCDIR)/Makefile.global
......
...@@ -515,6 +515,8 @@ ECPGexecute(struct statement * stmt) ...@@ -515,6 +515,8 @@ ECPGexecute(struct statement * stmt)
return false; return false;
strcat(mallocedval, tmp); strcat(mallocedval, tmp);
free(tmp);
strcat(mallocedval, "'"); strcat(mallocedval, "'");
free(newcopy); free(newcopy);
...@@ -556,6 +558,8 @@ ECPGexecute(struct statement * stmt) ...@@ -556,6 +558,8 @@ ECPGexecute(struct statement * stmt)
return false; return false;
strcat(mallocedval, tmp); strcat(mallocedval, tmp);
free(tmp);
strcat(mallocedval, "'"); strcat(mallocedval, "'");
free(newcopy); free(newcopy);
......
#include <locale.h>
exec sql whenever sqlerror sqlprint; exec sql whenever sqlerror sqlprint;
exec sql include sqlca; exec sql include sqlca;
...@@ -12,6 +14,8 @@ EXEC SQL BEGIN DECLARE SECTION; ...@@ -12,6 +14,8 @@ EXEC SQL BEGIN DECLARE SECTION;
EXEC SQL END DECLARE SECTION; EXEC SQL END DECLARE SECTION;
FILE *dbgs; FILE *dbgs;
setlocale(LC_ALL, "de_DE");
if ((dbgs = fopen("log", "w")) != NULL) if ((dbgs = fopen("log", "w")) != NULL)
ECPGdebug(1, dbgs); ECPGdebug(1, dbgs);
...@@ -21,9 +25,10 @@ EXEC SQL END DECLARE SECTION; ...@@ -21,9 +25,10 @@ EXEC SQL END DECLARE SECTION;
EXEC SQL BEGIN WORK; EXEC SQL BEGIN WORK;
EXEC SQL CREATE TABLE test (f decimal(8,2), i int, a int[10]); /* EXEC SQL CREATE TABLE test (f decimal(8,2), i int, a int[10]);*/
EXEC SQL CREATE TABLE test (f float, i int, a int[10]);
EXEC SQL INSERT INTO test(f,i,a) VALUES(17000.00,1,'{0,1,2,3,4,5,6,7,8,9}'); EXEC SQL INSERT INTO test(f,i,a) VALUES(404.90,1,'{0,1,2,3,4,5,6,7,8,9}');
/* EXEC SQL INSERT INTO test(f,i,a) VALUES(140787.0,2,:a);*/ /* EXEC SQL INSERT INTO test(f,i,a) VALUES(140787.0,2,:a);*/
...@@ -31,19 +36,19 @@ EXEC SQL END DECLARE SECTION; ...@@ -31,19 +36,19 @@ EXEC SQL END DECLARE SECTION;
EXEC SQL BEGIN WORK; EXEC SQL BEGIN WORK;
EXEC SQL SELECT f::float EXEC SQL SELECT f
INTO :f INTO :f
FROM test FROM test
WHERE i = :i; WHERE i = :i;
printf("Found f::float=%f\n", f); printf("Found f=%f\n", f);
EXEC SQL SELECT f EXEC SQL SELECT i
INTO :f INTO :i
FROM test FROM test
WHERE i = :i; WHERE f = :f;
printf("Found f=%f\n", f); printf("Found i=%d\n", i);
EXEC SQL DROP TABLE test; EXEC SQL DROP TABLE test;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment