Repository: trafodion
Updated Branches:
  refs/heads/master cdc788e41 -> ed83389c3


correct datalen while converting char in table to local datetime struct


Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/6f189646
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/6f189646
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/6f189646

Branch: refs/heads/master
Commit: 6f1896465152670724a3e07df7fbd9d8c6755877
Parents: d098c30
Author: Weixin-Xu <weixin...@esgyn.cn>
Authored: Thu Jan 11 13:05:52 2018 +0800
Committer: Weixin-Xu <xwx@weixin-1.novalocal>
Committed: Thu Jan 11 14:36:47 2018 +0800

----------------------------------------------------------------------
 core/conn/unixodbc/odbc/odbcclient/unixcli/cli/sqltocconv.cpp | 3 +++
 win-odbc64/odbcclient/drvr35/sqltocconv.cpp                   | 3 +++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/6f189646/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/sqltocconv.cpp
----------------------------------------------------------------------
diff --git a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/sqltocconv.cpp 
b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/sqltocconv.cpp
index a300bbd..b2c0091 100644
--- a/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/sqltocconv.cpp
+++ b/core/conn/unixodbc/odbc/odbcclient/unixcli/cli/sqltocconv.cpp
@@ -1684,6 +1684,7 @@ unsigned long ODBC::ConvertSQLToC(SQLINTEGER      
ODBCAppVersion,
                                                                return 
IDS_22_003;
                                                }
                                        }
+                    DataLen = sizeof(DATE_STRUCT);
                                }
                        }
                        if ((retCode = ConvertSQLCharToDate(ODBCDataType, 
cTmpBuf, srcLength, SQL_C_DATE, 
@@ -1930,6 +1931,7 @@ unsigned long ODBC::ConvertSQLToC(SQLINTEGER      
ODBCAppVersion,
                                                                return 
IDS_22_003;
                                                }
                                        }
+                    DataLen = sizeof(TIME_STRUCT);
                                }
                        }
                        if ((retCode = ConvertSQLCharToDate(ODBCDataType, 
cTmpBuf, srcLength, SQL_C_TIME, 
@@ -2149,6 +2151,7 @@ unsigned long ODBC::ConvertSQLToC(SQLINTEGER      
ODBCAppVersion,
                                                                return 
IDS_22_003;
                                                }
                                        }
+                    DataLen = sizeof(TIMESTAMP_STRUCT);
                                }
                        }
                        if ((retCode = ConvertSQLCharToDate(ODBCDataType, 
cTmpBuf, srcLength, SQL_C_TIMESTAMP, 

http://git-wip-us.apache.org/repos/asf/trafodion/blob/6f189646/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
----------------------------------------------------------------------
diff --git a/win-odbc64/odbcclient/drvr35/sqltocconv.cpp 
b/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
index 89c0329..e597135 100755
--- a/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
+++ b/win-odbc64/odbcclient/drvr35/sqltocconv.cpp
@@ -1633,6 +1633,7 @@ unsigned long ODBC::ConvertSQLToC(SQLINTEGER      
ODBCAppVersion,
                                                                return 
IDS_22_003;
                                                }
                                        }
+                                       DataLen = sizeof(DATE_STRUCT);
                                }
                        }
                        if ((retCode = ConvertSQLCharToDate(ODBCDataType, 
cTmpBuf, srcLength, SQL_C_DATE, 
@@ -1883,6 +1884,7 @@ unsigned long ODBC::ConvertSQLToC(SQLINTEGER      
ODBCAppVersion,
                                                                return 
IDS_22_003;
                                                }
                                        }
+                                       DataLen = sizeof(TIME_STRUCT);
                                }
                        }
                        if ((retCode = ConvertSQLCharToDate(ODBCDataType, 
cTmpBuf, srcLength, SQL_C_TIME, 
@@ -2104,6 +2106,7 @@ unsigned long ODBC::ConvertSQLToC(SQLINTEGER      
ODBCAppVersion,
                                                                return 
IDS_22_003;
                                                }
                                        }
+                                       DataLen = sizeof(TIMESTAMP_STRUCT);
                                }
                        }
                        if ((retCode = ConvertSQLCharToDate(ODBCDataType, 
cTmpBuf, srcLength, SQL_C_TIMESTAMP, 

Reply via email to