diff options
author | Olivier Bertrand <bertrandop@gmail.com> | 2017-08-09 01:23:48 +0200 |
---|---|---|
committer | Olivier Bertrand <bertrandop@gmail.com> | 2017-08-09 01:23:48 +0200 |
commit | 272b3977483e80ca77179b796e7c347be63d82dc (patch) | |
tree | 3007ca1e601c02aa597f34e5a4cb16d1a3eb323f | |
parent | 7947121e9a28961f974ca09b57417bb670437bb4 (diff) | |
download | mariadb-git-272b3977483e80ca77179b796e7c347be63d82dc.tar.gz |
- Re-trying to fix Linux compile on DWORD.
modified: storage/connect/odbconn.cpp
modified: storage/connect/plgdbutl.cpp
-rw-r--r-- | storage/connect/odbconn.cpp | 8 | ||||
-rw-r--r-- | storage/connect/plgdbutl.cpp | 14 |
2 files changed, 13 insertions, 9 deletions
diff --git a/storage/connect/odbconn.cpp b/storage/connect/odbconn.cpp index f29fb6b430b..70a0a6a1450 100644 --- a/storage/connect/odbconn.cpp +++ b/storage/connect/odbconn.cpp @@ -55,6 +55,7 @@ extern "C" HINSTANCE s_hModule; // Saved module handle TYPCONV GetTypeConv(); int GetConvSize(); +void OdbcClose(PGLOBAL g, PFBLOCK fp); /***********************************************************************/ /* Some macro's (should be defined elsewhere to be more accessible) */ @@ -302,6 +303,13 @@ static void ResetNullValues(CATPARM *cap) #endif /***********************************************************************/ +/* Close an ODBC table after a thrown error (called by PlugCloseFile) */ +/***********************************************************************/ +void OdbcClose(PGLOBAL g, PFBLOCK fp) { + ((ODBConn*)fp->File)->Close(); +} // end of OdbcClose + +/***********************************************************************/ /* ODBCColumns: constructs the result blocks containing all columns */ /* of an ODBC table that will be retrieved by GetData commands. */ /***********************************************************************/ diff --git a/storage/connect/plgdbutl.cpp b/storage/connect/plgdbutl.cpp index e5a82dda50d..0943ce9f222 100644 --- a/storage/connect/plgdbutl.cpp +++ b/storage/connect/plgdbutl.cpp @@ -44,8 +44,6 @@ #include <errno.h> #define BIGMEM 1048576 // 1 Megabyte #else // !__WIN__ -// See comment in os.h -#define NODW #include <unistd.h> #include <fcntl.h> //#if defined(THREAD) @@ -70,11 +68,6 @@ #include "tabcol.h" // header of XTAB and COLUMN classes #include "valblk.h" #include "rcmsg.h" -#if defined(ODBC_SUPPORT) -#include "tabext.h" -#include "odbccat.h" -#include "tabodbc.h" -#endif // ODBC_SUPPORT #ifdef ZIP_SUPPORT #include "filamzip.h" #endif // ZIP_SUPPORT @@ -121,6 +114,9 @@ void CloseXMLFile(PGLOBAL, PFBLOCK, bool); #include "libdoc.h" #endif // LIBXML2_SUPPORT +#ifdef ODBC_SUPPORT +void OdbcClose(PGLOBAL g, PFBLOCK fp); +#endif // ODBC_SUPPORT /***********************************************************************/ /* Routines for file IO with error reporting to g->Message */ @@ -887,7 +883,7 @@ FILE *PlugReopenFile(PGLOBAL g, PFBLOCK fp, LPCSTR md) /* Close file routine: the purpose of this routine is to avoid */ /* double closing that freeze the system on some Unix platforms. */ /***********************************************************************/ -int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all) +int PlugCloseFile(PGLOBAL g, PFBLOCK fp, bool all) { int rc = 0; @@ -938,7 +934,7 @@ int PlugCloseFile(PGLOBAL g __attribute__((unused)), PFBLOCK fp, bool all) #endif // LIBXML2_SUPPORT #ifdef ODBC_SUPPORT case TYPE_FB_ODBC: - ((ODBConn*)fp->File)->Close(); + OdbcClose(g, fp); fp->Count = 0; fp->File = NULL; break; |