Skip to content

Commit 54847b2

Browse files
author
Michael Meskes
committed
*** empty log message ***
1 parent 04fa5ca commit 54847b2

File tree

4 files changed

+24
-11
lines changed

4 files changed

+24
-11
lines changed

src/interfaces/ecpg/ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -726,3 +726,7 @@ Tue Nov 23 07:59:01 CET 1999
726726
- Ignore locale setting in ECPGdo.
727727
- Set library version to 3.0.7.
728728

729+
Fri Dec 3 16:35:07 CET 1999
730+
731+
- Fixed memory leak in ecpglib.
732+
- Set library version to 3.0.8.

src/interfaces/ecpg/lib/Makefile.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
# Copyright (c) 1994, Regents of the University of California
77
#
88
# IDENTIFICATION
9-
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.52 1999/11/23 10:32:16 meskes Exp $
9+
# $Header: /cvsroot/pgsql/src/interfaces/ecpg/lib/Attic/Makefile.in,v 1.53 1999/12/07 10:29:16 meskes Exp $
1010
#
1111
#-------------------------------------------------------------------------
1212

1313
NAME= ecpg
1414
SO_MAJOR_VERSION= 3
15-
SO_MINOR_VERSION= 0.7
15+
SO_MINOR_VERSION= 0.8
1616

1717
SRCDIR= @top_srcdir@
1818
include $(SRCDIR)/Makefile.global

src/interfaces/ecpg/lib/ecpglib.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -515,6 +515,8 @@ ECPGexecute(struct statement * stmt)
515515
return false;
516516

517517
strcat(mallocedval, tmp);
518+
free(tmp);
519+
518520
strcat(mallocedval, "'");
519521

520522
free(newcopy);
@@ -556,6 +558,8 @@ ECPGexecute(struct statement * stmt)
556558
return false;
557559

558560
strcat(mallocedval, tmp);
561+
free(tmp);
562+
559563
strcat(mallocedval, "'");
560564

561565
free(newcopy);

src/interfaces/ecpg/test/test4.pgc

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#include <locale.h>
2+
13
exec sql whenever sqlerror sqlprint;
24

35
exec sql include sqlca;
@@ -11,6 +13,8 @@ EXEC SQL BEGIN DECLARE SECTION;
1113
double f;
1214
EXEC SQL END DECLARE SECTION;
1315
FILE *dbgs;
16+
17+
setlocale(LC_ALL, "de_DE");
1418

1519
if ((dbgs = fopen("log", "w")) != NULL)
1620
ECPGdebug(1, dbgs);
@@ -21,30 +25,31 @@ EXEC SQL END DECLARE SECTION;
2125

2226
EXEC SQL BEGIN WORK;
2327

24-
EXEC SQL CREATE TABLE test (f decimal(8,2), i int, a int[10]);
28+
/* EXEC SQL CREATE TABLE test (f decimal(8,2), i int, a int[10]);*/
29+
EXEC SQL CREATE TABLE test (f float, i int, a int[10]);
2530

26-
EXEC SQL INSERT INTO test(f,i,a) VALUES(17000.00,1,'{0,1,2,3,4,5,6,7,8,9}');
31+
EXEC SQL INSERT INTO test(f,i,a) VALUES(404.90,1,'{0,1,2,3,4,5,6,7,8,9}');
2732

2833
/* EXEC SQL INSERT INTO test(f,i,a) VALUES(140787.0,2,:a);*/
2934

3035
EXEC SQL COMMIT;
3136

3237
EXEC SQL BEGIN WORK;
3338

34-
EXEC SQL SELECT f::float
35-
INTO :f
36-
FROM test
37-
WHERE i = :i;
38-
39-
printf("Found f::float=%f\n", f);
40-
4139
EXEC SQL SELECT f
4240
INTO :f
4341
FROM test
4442
WHERE i = :i;
4543

4644
printf("Found f=%f\n", f);
4745

46+
EXEC SQL SELECT i
47+
INTO :i
48+
FROM test
49+
WHERE f = :f;
50+
51+
printf("Found i=%d\n", i);
52+
4853
EXEC SQL DROP TABLE test;
4954

5055
EXEC SQL COMMIT;

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy