Repository: trafodion
Updated Branches:
refs/heads/master a3c56bc81 -> 2bdbffe70
Inaccurate conditions of judgment cause low efficiency
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/6396326a
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/6396326a
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/6396326a
Branch: refs/heads/master
Commit: 6396326abe3f4a1756bc1239476b5d17b3b269e7
Parents: 875cb17
Author: Weixin-Xu <xwx@weixin-1.novalocal>
Authored: Sat Apr 28 15:43:28 2018 +0800
Committer: Weixin-Xu <weixin.xu@esgyn.cn>
Committed: Sat Apr 28 15:54:32 2018 +0800
----------------------------------------------------------------------
core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp | 4 ++--
win-odbc64/odbcclient/drvr35/ctosqlconv.cpp | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/6396326a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp
index 6d8f11b..9e7d328 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/ctosqlconv.cpp
@@ -354,8 +354,8 @@ unsigned long ODBC::ConvertCToSQL(SQLINTEGER ODBCAppVersion,
if (errorMsg)
*errorMsg = '\0';
//if (targetPrecision < 19)
- if( !(((SQLDataType == SQLTYPECODE_NUMERIC) && (targetPrecision > 18)) ||
- ((SQLDataType == SQLTYPECODE_NUMERIC_UNSIGNED) && (targetPrecision > 9))))
+ if(((SQLDataType == SQLTYPECODE_NUMERIC) && (targetPrecision <= 18)) ||
+ ((SQLDataType == SQLTYPECODE_NUMERIC_UNSIGNED) && (targetPrecision <= 9)))
getMaxNum(targetPrecision, targetScale, integralMax, decimalMax);
switch (ODBCDataType)
http://git-wip-us.apache.org/repos/asf/trafodion/blob/6396326a/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp b/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
index fe1c58e..339368a 100644
--- a/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
+++ b/win-odbc64/odbcclient/drvr35/ctosqlconv.cpp
@@ -277,8 +277,8 @@ unsigned long ODBC::ConvertCToSQL(SQLINTEGER ODBCAppVersion,
*errorMsg = '\0';
//if (targetPrecision < 19)
- if( !(((SQLDataType == SQLTYPECODE_NUMERIC) && (targetPrecision > 18)) ||
- ((SQLDataType == SQLTYPECODE_NUMERIC_UNSIGNED) && (targetPrecision > 9))))
+ if (((SQLDataType == SQLTYPECODE_NUMERIC) && (targetPrecision <= 18)) ||
+ ((SQLDataType == SQLTYPECODE_NUMERIC_UNSIGNED) && (targetPrecision <=
9)))
getMaxNum(targetPrecision, targetScale, integralMax, decimalMax);
switch (ODBCDataType)
|