You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2017/08/07 22:13:34 UTC
[1/3] incubator-trafodion git commit: Make threshold of compression
configurable in linux
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 56183e291 -> d53816273
Make threshold of compression configurable in linux
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/a731155a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/a731155a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/a731155a
Branch: refs/heads/master
Commit: a731155a95df05b41ad780a8254a60faada79027
Parents: d86a0ba
Author: CoderSong2015 <40...@qq.com>
Authored: Fri Aug 4 03:36:14 2017 +0000
Committer: CoderSong2015 <40...@qq.com>
Committed: Fri Aug 4 03:36:14 2017 +0000
----------------------------------------------------------------------
.../odbc/odbcclient/unixcli/cli/cconnect.cpp | 4 +++
.../odbc/odbcclient/unixcli/cli/cconnect.h | 2 +-
.../odbc/odbcclient/unixcli/cli/cdatasource.cpp | 38 ++++++++++++++++++--
.../odbc/odbcclient/unixcli/cli/cdatasource.h | 2 +-
.../odbc/odbcclient/unixcli/cli/drvrglobal.cpp | 2 ++
.../odbc/odbcclient/unixcli/cli/drvrglobal.h | 1 +
.../odbcclient/unixcli/common/TCPIPUnixDrvr.cpp | 5 +--
.../odbcclient/unixcli/common/TCPIPUnixDrvr.h | 1 +
8 files changed, 48 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a731155a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.cpp
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.cpp b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.cpp
index 7fa0bb2..3245dee 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.cpp
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.cpp
@@ -772,6 +772,10 @@ SQLRETURN CConnect::Connect(SQLCHAR *ServerName,
if (m_srvrTCPIPSystem != NULL)
m_srvrTCPIPSystem->m_IOCompression = m_IOCompression;
+ if (m_asTCPIPSystem != NULL)
+ m_asTCPIPSystem->m_IOCompressionThreshold = m_DSValue.m_DSIOCompressionThreshold;
+ if (m_srvrTCPIPSystem != NULL)
+ m_srvrTCPIPSystem->m_IOCompressionThreshold= m_DSValue.m_DSIOCompressionThreshold;
// Set the Assocation Service Object Reference
strcpy(m_ASSvc_ObjRef, m_DSValue.m_DSServer);
strcpy(buffer,m_DSValue.m_DSServer);
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a731155a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.h
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.h b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.h
index 75d9c19..87c0a7e 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.h
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cconnect.h
@@ -469,7 +469,7 @@ private:
SQLUINTEGER m_SecurityMode;
bool m_RetryEncryption;
SQLUINTEGER m_IOCompression;
-
+ int m_IOCompressionThreshold;
void reset(bool clearE=true);
friend class CStmt;
friend class CDesc;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a731155a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.cpp
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.cpp b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.cpp
index 5413aec..b222fb4 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.cpp
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.cpp
@@ -34,9 +34,9 @@
#define CONNECTION_TIMEOUT_DEFAULT 60
#define LOGIN_TIMEOUT_DEFAULT 60
#define QUERY_TIMEOUT_DEFAULT 0
+#define IOCOMPRESSION_DEFAULT 1000
#define FETCH_BUFFER_SIZE_DEFAULT 512 * 1024
#define TCP_DEFAULT_PROCESS "$ZTC0"
-
// we are using the hpodbc driver manager
extern int hpodbc_dmanager = 1;
@@ -93,7 +93,7 @@ CDataSource::CDataSource()
m_DSCertificateFileActive[0] = '\0';
strcpy(m_DSCertificateDir,"SYSTEM_DEFAULT");
m_DSIOCompression = 0;
-
+ m_DSIOCompressionThreshold = 0;
//
// Read the ODBC section to get Certificate Directory Location
//
@@ -613,7 +613,7 @@ short CDataSource::readDSValues(char *DSName,CConnect* pConnection)
keyValueLength,
path);
if (len > 0)
- {
+ {
if (strcmp((const char *)keyValueBuf, SYSTEM_DEFAULT) == 0)
m_DSQueryTimeout = QUERY_TIMEOUT_DEFAULT;
else
@@ -788,6 +788,29 @@ short CDataSource::readDSValues(char *DSName,CConnect* pConnection)
}
}
+//get threshold of compression ,default is 1000
+ keyValueLength = sizeof(keyValueBuf);
+ len = GetMyPrivateProfileString(
+ searchKey,
+ "CompressionThreshold",
+ NULL,
+ keyValueBuf,
+ keyValueLength,
+ path);
+
+ if (len > 0)
+ {
+ if (strcmp((const char *)keyValueBuf, SYSTEM_DEFAULT) == 0)
+ m_DSIOCompressionThreshold = IOCOMPRESSION_DEFAULT;
+ else
+ {
+ m_DSIOCompressionThreshold = atol((const char *)keyValueBuf);
+ }
+
+ }
+ else
+ m_DSIOCompressionThreshold = IOCOMPRESSION_DEFAULT;
+
keyValueLength = sizeof(m_DSServiceName);
len = GetMyPrivateProfileString(
searchKey,
@@ -993,6 +1016,15 @@ void CDataSource::updateDSValues(short DSNType, CONNECT_FIELD_ITEMS *connectFiel
m_DSIOCompression = atol((const char *)AttrValue);
}
break;
+ case KEY_COMPRESSIONTHRESHOLD:
+ if (stricmp(AttrValue, SYSTEM_DEFAULT) == 0){
+ m_DSIOCompressionThreshold = IOCOMPRESSION_DEFAULT;
+ }
+ else
+ {
+ m_DSIOCompressionThreshold = atol((const char *)AttrValue);
+ }
+ break;
default:
break;
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a731155a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.h
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.h b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.h
index 67c4cef..5c072b2 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.h
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/cdatasource.h
@@ -88,7 +88,7 @@ private:
char m_DSCertificateFile[MAX_SQL_IDENTIFIER_LEN + 1];
char m_DSCertificateFileActive[MAX_SQL_IDENTIFIER_LEN + 1];
SQLUINTEGER m_DSIOCompression;
-
+ int m_DSIOCompressionThreshold;
friend class CConnect;
};
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a731155a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.cpp
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.cpp b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.cpp
index 0d4fcab..975d66b 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.cpp
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.cpp
@@ -192,6 +192,7 @@ char *ConnectKeywords[] =
"CERTIFICATEFILE",
"CERTIFICATEFILE_ACTIVE",
"COMPRESSION",
+ "COMPRESSIONTHRESHOLD",
NULL
};
@@ -228,6 +229,7 @@ char *ConnectLocalizedIdentifier[] =
"Certificate File",
"Certificate File Active",
"Compression",
+ "CompressionThreshold",
NULL,
};
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a731155a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h
index a3c9dd0..c082a46 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/drvrglobal.h
@@ -401,6 +401,7 @@ typedef enum CONNECT_KEYWORDS
KEY_CERTIFICATEFILE,
KEY_CERTIFICATEFILE_ACTIVE,
KEY_COMPRESSION,
+ KEY_COMPRESSIONTHRESHOLD,
KEY_MAX
};
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a731155a/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.cpp
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.cpp b/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.cpp
index 6984b54..013f61b 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.cpp
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.cpp
@@ -59,6 +59,7 @@ CTCPIPUnixDrvr::CTCPIPUnixDrvr()
m_hSocket = INVALID_SOCKET;
m_IOCompression = 0;
+ m_IOCompressionThreshold = 1000;
m_hEvents[0] = NULL;
m_hEvents[1] = NULL;
@@ -440,7 +441,7 @@ bool DoIO (CTCPIPUnixDrvr* pTCPIPSystem, IDL_char* wbuffer, IDL_long write_count
RESET_ERRORS((long)pTCPIPSystem);
- if (pTCPIPSystem->m_IOCompression != 0)
+ if ((pTCPIPSystem->m_IOCompression != 0)&&(pTCPIPSystem->odbcAPI != AS_API_GETOBJREF))
{
wheader.compress_ind = COMP_YES;
wheader.compress_type = pTCPIPSystem->m_IOCompression;
@@ -459,7 +460,7 @@ bool DoIO (CTCPIPUnixDrvr* pTCPIPSystem, IDL_char* wbuffer, IDL_long write_count
wheader.total_length = write_count;
wheader.hdr_type = WRITE_REQUEST_FIRST;
- if (wheader.compress_ind == COMP_YES && write_count > MIN_LENGTH_FOR_COMPRESSION)
+ if (wheader.compress_ind == COMP_YES && write_count > pTCPIPSystem->m_IOCompressionThreshold)
DoCompression(pTCPIPSystem, wheader, (unsigned char*)wbuffer, (unsigned int&)write_count);
else
wheader.compress_type = COMP_NO_COMPRESSION;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/a731155a/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.h
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.h b/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.h
index f53dc8a..50e3f0f 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.h
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/common/TCPIPUnixDrvr.h
@@ -72,6 +72,7 @@ public:
HEADER m_rheader;
char m_object_ref[MAX_OBJECT_REF + 1];
int m_IOCompression;
+ int m_IOCompressionThreshold;
CCompression m_compression;
private:
[3/3] incubator-trafodion git commit: Merge [TRAFODION-647] PR 1198
Make compression threshold configurable
Posted by db...@apache.org.
Merge [TRAFODION-647] PR 1198 Make compression threshold configurable
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/d5381627
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/d5381627
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/d5381627
Branch: refs/heads/master
Commit: d53816273e92a9771c137c1887735ea1143bf70e
Parents: 56183e2 c181c84
Author: Dave Birdsall <db...@apache.org>
Authored: Mon Aug 7 22:12:41 2017 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Mon Aug 7 22:12:41 2017 +0000
----------------------------------------------------------------------
.../odbc/odbcclient/unixcli/cli/cconnect.cpp | 4 +++
.../odbc/odbcclient/unixcli/cli/cconnect.h | 2 +-
.../odbc/odbcclient/unixcli/cli/cdatasource.cpp | 38 ++++++++++++++++++--
.../odbc/odbcclient/unixcli/cli/cdatasource.h | 2 +-
.../odbc/odbcclient/unixcli/cli/drvrglobal.cpp | 2 ++
.../odbc/odbcclient/unixcli/cli/drvrglobal.h | 1 +
.../odbcclient/unixcli/common/TCPIPUnixDrvr.cpp | 5 +--
.../odbcclient/unixcli/common/TCPIPUnixDrvr.h | 1 +
win-odbc64/Common/TCPIPSystemDrvr.cpp | 5 +--
win-odbc64/Common/TCPIPSystemDrvr.h | 1 +
win-odbc64/odbcclient/drvr35/cconnect.cpp | 4 +++
win-odbc64/odbcclient/drvr35/cconnect.h | 1 +
win-odbc64/odbcclient/drvr35/cdatasource.cpp | 32 +++++++++++++++++
win-odbc64/odbcclient/drvr35/cdatasource.h | 1 +
win-odbc64/odbcclient/drvr35/drvrglobal.cpp | 4 ++-
win-odbc64/odbcclient/drvr35/drvrglobal.h | 1 +
16 files changed, 94 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
[2/3] incubator-trafodion git commit: Make threshold of compression
configurable in windows
Posted by db...@apache.org.
Make threshold of compression configurable in windows
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/c181c842
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/c181c842
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/c181c842
Branch: refs/heads/master
Commit: c181c842beb1c8c9617c1c5db507d672eff0ea46
Parents: a731155
Author: CoderSong2015 <40...@qq.com>
Authored: Fri Aug 4 03:48:18 2017 +0000
Committer: CoderSong2015 <40...@qq.com>
Committed: Fri Aug 4 03:48:18 2017 +0000
----------------------------------------------------------------------
win-odbc64/Common/TCPIPSystemDrvr.cpp | 5 ++--
win-odbc64/Common/TCPIPSystemDrvr.h | 1 +
win-odbc64/odbcclient/drvr35/cconnect.cpp | 4 +++
win-odbc64/odbcclient/drvr35/cconnect.h | 1 +
win-odbc64/odbcclient/drvr35/cdatasource.cpp | 32 +++++++++++++++++++++++
win-odbc64/odbcclient/drvr35/cdatasource.h | 1 +
win-odbc64/odbcclient/drvr35/drvrglobal.cpp | 4 ++-
win-odbc64/odbcclient/drvr35/drvrglobal.h | 1 +
8 files changed, 46 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c181c842/win-odbc64/Common/TCPIPSystemDrvr.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/Common/TCPIPSystemDrvr.cpp b/win-odbc64/Common/TCPIPSystemDrvr.cpp
index 3565a8a..e56caf6 100644
--- a/win-odbc64/Common/TCPIPSystemDrvr.cpp
+++ b/win-odbc64/Common/TCPIPSystemDrvr.cpp
@@ -52,6 +52,7 @@ CTCPIPSystemDrvr::CTCPIPSystemDrvr()
exit(0);
m_hSocket = NULL;
m_IOCompression = 0;
+ m_IOCompressionThreshold = 1000;
m_hEvents[0] = NULL;
m_hEvents[1] = NULL;
m_swap = SWAP_YES;
@@ -376,7 +377,7 @@ bool DoIO (CTCPIPSystemDrvr* pTCPIPSystem, char* wbuffer, long write_count, char
RESET_ERRORS((long)pTCPIPSystem);
- if (pTCPIPSystem->m_IOCompression != 0)
+ if ((pTCPIPSystem->m_IOCompression != 0) && (pTCPIPSystem->odbcAPI != AS_API_GETOBJREF))
{
wheader.compress_ind = COMP_YES;
wheader.compress_type = pTCPIPSystem->m_IOCompression;
@@ -395,7 +396,7 @@ bool DoIO (CTCPIPSystemDrvr* pTCPIPSystem, char* wbuffer, long write_count, char
wheader.total_length = write_count;
wheader.hdr_type = WRITE_REQUEST_FIRST;
- if (wheader.compress_ind == COMP_YES && write_count > MIN_LENGTH_FOR_COMPRESSION)
+ if (wheader.compress_ind == COMP_YES && write_count > pTCPIPSystem->m_IOCompressionThreshold)
DoCompression(pTCPIPSystem, wheader, (unsigned char*)wbuffer, (unsigned long&)write_count);
else
wheader.compress_type = COMP_NO_COMPRESSION;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c181c842/win-odbc64/Common/TCPIPSystemDrvr.h
----------------------------------------------------------------------
diff --git a/win-odbc64/Common/TCPIPSystemDrvr.h b/win-odbc64/Common/TCPIPSystemDrvr.h
index 56b25ab..3baf3d6 100644
--- a/win-odbc64/Common/TCPIPSystemDrvr.h
+++ b/win-odbc64/Common/TCPIPSystemDrvr.h
@@ -72,6 +72,7 @@ public:
HEADER m_rheader;
char m_object_ref[MAX_OBJECT_REF + 1];
int m_IOCompression;
+ int m_IOCompressionThreshold;
CCompression m_compression;
private:
char m_swap;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c181c842/win-odbc64/odbcclient/drvr35/cconnect.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/cconnect.cpp b/win-odbc64/odbcclient/drvr35/cconnect.cpp
index 6cc6175..ade058b 100644
--- a/win-odbc64/odbcclient/drvr35/cconnect.cpp
+++ b/win-odbc64/odbcclient/drvr35/cconnect.cpp
@@ -587,6 +587,10 @@ SQLRETURN CConnect::Connect(SQLCHAR *ServerName,
if (m_srvrTCPIPSystem != NULL)
m_srvrTCPIPSystem->m_IOCompression = m_IOCompression;
+ if (m_asTCPIPSystem != NULL)
+ m_asTCPIPSystem->m_IOCompressionThreshold = m_DSValue.m_DSIOCompressionThreshold;
+ if (m_srvrTCPIPSystem != NULL)
+ m_srvrTCPIPSystem->m_IOCompressionThreshold = m_DSValue.m_DSIOCompressionThreshold;
//if (m_DSValue.m_DSServiceName[0] != 0)
/// strcpy(m_QSServiceName, m_DSValue.m_DSServiceName);
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c181c842/win-odbc64/odbcclient/drvr35/cconnect.h
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/cconnect.h b/win-odbc64/odbcclient/drvr35/cconnect.h
index 3f6d111..4bfe1df 100644
--- a/win-odbc64/odbcclient/drvr35/cconnect.h
+++ b/win-odbc64/odbcclient/drvr35/cconnect.h
@@ -238,6 +238,7 @@ private:
BOOL m_ConnectionDead;
BOOL m_SelectRowsets;
SQLUINTEGER m_IOCompression;
+ int m_IOCompressionThreshold;
BOOL m_ChangePassword; // for password expiry
BOOL m_FlushFetchData; // For query driver which cannot handle huge data being returned.
SQLINTEGER m_StartNode; // Node(cpu) to start the mxosrvr on - defaults to -1 (any)
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c181c842/win-odbc64/odbcclient/drvr35/cdatasource.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/cdatasource.cpp b/win-odbc64/odbcclient/drvr35/cdatasource.cpp
index 4ac6a50..054621a 100644
--- a/win-odbc64/odbcclient/drvr35/cdatasource.cpp
+++ b/win-odbc64/odbcclient/drvr35/cdatasource.cpp
@@ -34,6 +34,7 @@
#define CONNECTION_TIMEOUT_DEFAULT 60
#define LOGIN_TIMEOUT_DEFAULT 60
#define QUERY_TIMEOUT_DEFAULT 0
+#define IOCOMPRESSION_DEFAULT 1000
#define FETCH_BUFFER_SIZE_DEFAULT 512 * 1024
//#define FETCH_BUFFER_SIZE_DEFAULT 0
@@ -515,6 +516,28 @@ short CDataSource::readDSValues(char *DSName, char* transError)
else
m_DSIOCompression = 0;
+ //get threshold of compression ,default is 1000
+ keyValueLength = sizeof(keyValueBuf);
+ error = RegQueryValueEx(keyHandle,
+ "CompressionThreshold",
+ NULL, // Reserved
+ &keyValueType,
+ keyValueBuf,
+ &keyValueLength);
+
+ if (error == ERROR_SUCCESS)
+ {
+ if (strcmp((const char *)keyValueBuf, SYSTEM_DEFAULT) == 0)
+ m_DSIOCompressionThreshold = IOCOMPRESSION_DEFAULT;
+ else
+ {
+ m_DSIOCompressionThreshold = atol((const char *)keyValueBuf);
+ }
+
+ }
+ else
+ m_DSIOCompressionThreshold = IOCOMPRESSION_DEFAULT;
+
keyValueLength = sizeof(keyValueBuf);
error = RegQueryValueEx(keyHandle,
"RowsetErrorRecovery",
@@ -733,6 +756,15 @@ void CDataSource::updateDSValues(short DSNType, CONNECT_FIELD_ITEMS *connectFiel
m_DSIOCompression = atol(AttrValue);
}
break;
+ case KEY_COMPRESSIONTHRESHOLD:
+ if (stricmp(AttrValue, SYSTEM_DEFAULT) == 0){
+ m_DSIOCompressionThreshold = IOCOMPRESSION_DEFAULT;
+ }
+ else
+ {
+ m_DSIOCompressionThreshold = atol((const char *)AttrValue);
+ }
+ break;
default:
break;
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c181c842/win-odbc64/odbcclient/drvr35/cdatasource.h
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/cdatasource.h b/win-odbc64/odbcclient/drvr35/cdatasource.h
index ca349e1..fa776c6 100644
--- a/win-odbc64/odbcclient/drvr35/cdatasource.h
+++ b/win-odbc64/odbcclient/drvr35/cdatasource.h
@@ -63,6 +63,7 @@ private:
char m_DSReplacementChar[5];
BOOL m_DSSelectRowsets;
SQLUINTEGER m_DSIOCompression;
+ int m_DSIOCompressionThreshold;
BOOL m_DSRowsetErrorRecovery;
char m_DSServerDSName[MAX_SQL_IDENTIFIER_LEN + 1];
char m_DSServiceName[SQL_MAX_SERVICENAME_LEN + 1];
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c181c842/win-odbc64/odbcclient/drvr35/drvrglobal.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/drvrglobal.cpp b/win-odbc64/odbcclient/drvr35/drvrglobal.cpp
index 8d1124c..6128ced 100644
--- a/win-odbc64/odbcclient/drvr35/drvrglobal.cpp
+++ b/win-odbc64/odbcclient/drvr35/drvrglobal.cpp
@@ -164,7 +164,8 @@ char *ConnectKeywords[] =
"CERTIFICATEDIR",
"CERTIFICATEFILE",
"CERTIFICATEFILE_ACTIVE",
- "COMPRESSION",
+ "COMPRESSION",
+ "COMPRESSIONTHRESHOLD",
NULL
};
@@ -198,6 +199,7 @@ char *ConnectLocalizedIdentifier[] =
"Certificate File",
"Certificate File Active",
"Compression",
+ "CompressionThreshold",
NULL
};
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/c181c842/win-odbc64/odbcclient/drvr35/drvrglobal.h
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/drvrglobal.h b/win-odbc64/odbcclient/drvr35/drvrglobal.h
index 0865698..2bb174b 100644
--- a/win-odbc64/odbcclient/drvr35/drvrglobal.h
+++ b/win-odbc64/odbcclient/drvr35/drvrglobal.h
@@ -390,6 +390,7 @@ typedef enum CONNECT_KEYWORDS
KEY_CERTIFICATEFILE,
KEY_CERTIFICATEFILE_ACTIVE,
KEY_COMPRESSION,
+ KEY_COMPRESSIONTHRESHOLD,
KEY_MAX
};