Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
59e5d516
Commit
59e5d516
authored
Jul 12, 2002
by
Hiroshi Inoue
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1) Fix a memory leak in use declare/fetch mode.
2) Change default build mode to multibyte(Windows).
parent
839a3465
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
14 deletions
+30
-14
src/interfaces/odbc/qresult.c
src/interfaces/odbc/qresult.c
+18
-2
src/interfaces/odbc/win32.mak
src/interfaces/odbc/win32.mak
+5
-5
src/interfaces/odbc/win32_30.mak
src/interfaces/odbc/win32_30.mak
+5
-5
src/interfaces/odbc/win32_30w.mak
src/interfaces/odbc/win32_30w.mak
+2
-2
No files found.
src/interfaces/odbc/qresult.c
View file @
59e5d516
...
...
@@ -356,7 +356,7 @@ QR_fetch_tuples(QResultClass *self, ConnectionClass *conn, char *cursor)
self
->
inTuples
=
TRUE
;
/* Force a read to occur in next_tuple */
self
->
num_total_rows
=
tuple_size
+
1
;
self
->
num_total_rows
=
0
;
self
->
num_backend_rows
=
tuple_size
+
1
;
self
->
fetch_count
=
tuple_size
+
1
;
self
->
base
=
0
;
...
...
@@ -499,6 +499,9 @@ QR_next_tuple(QResultClass *self)
if
(
self
->
base
==
num_backend_rows
)
{
int
row
,
lf
;
TupleField
*
tuple
=
self
->
backend_tuples
;
/* not a correction */
/* Determine the optimum cache size. */
if
(
ci
->
drivers
.
fetch_max
%
self
->
rowset_size
==
0
)
...
...
@@ -509,6 +512,20 @@ QR_next_tuple(QResultClass *self)
fetch_size
=
self
->
rowset_size
;
self
->
cache_size
=
fetch_size
;
/* clear obsolete tuples */
inolog
(
"clear obsolete %d tuples
\n
"
,
num_backend_rows
);
for
(
row
=
0
;
row
<
num_backend_rows
;
row
++
)
{
for
(
lf
=
0
;
lf
<
self
->
num_fields
;
lf
++
)
{
if
(
tuple
[
lf
].
value
!=
NULL
)
{
free
(
tuple
[
lf
].
value
);
tuple
[
lf
].
value
=
NULL
;
}
}
tuple
+=
self
->
num_fields
;
}
self
->
fetch_count
=
1
;
}
else
...
...
@@ -579,7 +596,6 @@ QR_next_tuple(QResultClass *self)
if
(
!
corrected
)
{
self
->
base
=
0
;
self
->
num_total_rows
=
0
;
/* right ? */
self
->
num_backend_rows
=
0
;
}
...
...
src/interfaces/odbc/win32.mak
View file @
59e5d516
...
...
@@ -14,7 +14,7 @@
!MESSAGE
Building
the
PostgreSQL
ODBC
Driver
for
Win32...
!MESSAGE
!IF
"$(CFG)"
==
""
CFG
=
Release
CFG
=
Multibyte
Release
!MESSAGE
No
configuration
specified.
Defaulting
to
Release.
!MESSAGE
!ENDIF
...
...
@@ -98,9 +98,9 @@ CLEAN :
CPP
=
cl.exe
!IF
"$(CFG)"
==
"MultibyteRelease"
CPP_PROJ
=
/nologo /MT /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"MULTIBYTE"
/D
"DRIVER_CURSOR_IMPLEMENT"
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
CPP_PROJ
=
/nologo /MT /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_WINDOWS"
/D
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PSQLODBC_EXPORTS"
/D
"MULTIBYTE"
/
D
"DRIVER_CURSOR_IMPLEMENT"
$(ADD_DEFINES)
/
Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
!ELSE
CPP_PROJ
=
/nologo /MTd /W3 /Gm /GX /ZI /Od /D
"WIN32"
/D
"_DEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
CPP_PROJ
=
/nologo /MTd /W3 /Gm /GX /ZI /Od /D
"WIN32"
/D
"_DEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/
D
"DRIVER_CURSOR_IMPLEMENT"
$(ADD_DEFINES)
/
Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
!ENDIF
.c{$(INTDIR)}.obj
::
...
...
src/interfaces/odbc/win32_30.mak
View file @
59e5d516
...
...
@@ -13,7 +13,7 @@
!MESSAGE
Building
the
PostgreSQL
ODBC
3.0
Driver
for
Win32...
!MESSAGE
!IF
"$(CFG)"
==
""
CFG
=
ODBC30
CFG
=
Multibyte
ODBC30
!MESSAGE
No
configuration
specified.
Defaulting
to
ODBC30.
!MESSAGE
!ENDIF
...
...
@@ -100,9 +100,9 @@ CLEAN :
CPP
=
cl.exe
!IF
"$(CFG)"
==
"MultibyteODBC30"
CPP_PROJ
=
/nologo /MT /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"MULTIBYTE"
/D
"DRIVER_CURSOR_IMPLEMENT"
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
CPP_PROJ
=
/nologo /MT /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"MULTIBYTE"
/D
"DRIVER_CURSOR_IMPLEMENT"
$(ADD_DEFINES)
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
!ELSE
CPP_PROJ
=
/nologo /MT /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"DRIVER_CURSOR_IMPLEMENT"
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
CPP_PROJ
=
/nologo /MT /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"DRIVER_CURSOR_IMPLEMENT"
$(ADD_DEFINES)
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
!ENDIF
.c{$(INTDIR)}.obj
::
...
...
@@ -245,9 +245,9 @@ CLEAN :
CPP
=
cl.exe
!IF
"$(CFG)"
==
"MultibyteDebug30"
CPP_PROJ
=
/nologo /MTd /W3 /Gm /GX /ZI /Od /D
"WIN32"
/D
"_DEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"MULTIBYTE"
/D
"DRIVER_CURSOR_IMPLEMENT"
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
CPP_PROJ
=
/nologo /MTd /W3 /Gm /GX /ZI /Od /D
"WIN32"
/D
"_DEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"MULTIBYTE"
/D
"DRIVER_CURSOR_IMPLEMENT"
$(ADD_DEFINES)
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
!ELSE
CPP_PROJ
=
/nologo /MTd /W3 /Gm /GX /ZI /Od /D
"WIN32"
/D
"_DEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"DRIVER_CURSOR_IMPLEMENT"
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
CPP_PROJ
=
/nologo /MTd /W3 /Gm /GX /ZI /Od /D
"WIN32"
/D
"_DEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"DRIVER_CURSOR_IMPLEMENT"
$(ADD_DEFINES)
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
!ENDIF
.c{$(INTDIR)}.obj
::
...
...
src/interfaces/odbc/win32_30w.mak
View file @
59e5d516
...
...
@@ -92,7 +92,7 @@ CLEAN :
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
CPP
=
cl.exe
CPP_PROJ
=
/nologo /MT /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"MULTIBYTE"
/D
"UNICODE_SUPPORT"
/D
"DRIVER_CURSOR_IMPLEMENT"
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
CPP_PROJ
=
/nologo /MT /W3 /GX /O2 /D
"WIN32"
/D
"NDEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"MULTIBYTE"
/D
"UNICODE_SUPPORT"
/D
"DRIVER_CURSOR_IMPLEMENT"
$(ADD_DEFINES)
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /c
.c{$(INTDIR)}.obj
::
$(CPP)
@<<
...
...
@@ -227,7 +227,7 @@ CLEAN :
if
not
exist
"$(OUTDIR)/$(NULL)"
mkdir
"$(OUTDIR)"
CPP
=
cl.exe
CPP_PROJ
=
/nologo /MTd /W3 /Gm /GX /ZI /Od /D
"WIN32"
/D
"_DEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"MULTIBYTE"
/D
"UNICODE_SUPPORT"
/D
"DRIVER_CURSOR_IMPLEMENT"
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
CPP_PROJ
=
/nologo /MTd /W3 /Gm /GX /ZI /Od /D
"WIN32"
/D
"_DEBUG"
/D
"_WINDOWS"
/D
"_MBCS"
/D
"_USRDLL"
/D
"PSQLODBC_EXPORTS"
/D
"ODBCVER=0x0300"
/D
"MULTIBYTE"
/D
"UNICODE_SUPPORT"
/D
"DRIVER_CURSOR_IMPLEMENT"
$(ADD_DEFINES)
/Fp
"
$(INTDIR)
\p
sqlodbc.pch"
/YX /Fo
"
$(INTDIR)
\\
"
/Fd
"
$(INTDIR)
\\
"
/FD /GZ /c
.c{$(INTDIR)}.obj
::
$(CPP)
@<<
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment