You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2016/12/07 23:07:48 UTC

[2/3] incubator-trafodion git commit: [TRAFODION-1988] Merge branch 'master' of git://git.apache.org/incubator-trafodion into trafodion-1988

[TRAFODION-1988] Merge branch 'master' of git://git.apache.org/incubator-trafodion into trafodion-1988

Conflicts:
	core/sqf/src/seatrans/tm/hbasetmlib2/hbasetm.cpp


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

Branch: refs/heads/master
Commit: 685a1cec69a31fde0bf55cfb4324604fca1b297f
Parents: f502bc5 c1fadff
Author: selvaganesang <se...@esgyn.com>
Authored: Fri Dec 2 19:03:35 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Fri Dec 2 19:03:35 2016 +0000

----------------------------------------------------------------------
 core/conn/jdbcT4/pom.xml                        |  79 ++---
 core/conn/odbc/src/odbc/nsksrvrcore/Makefile    |   2 +-
 core/dbsecurity/auth/Makefile                   |   1 +
 core/sqf/.gitignore                             |   1 +
 core/sqf/Makefile                               |   4 +-
 core/sqf/build-scripts/build.branch             |   8 +-
 core/sqf/build-scripts/build.id                 |   2 +-
 core/sqf/build-scripts/genverhdr.ksh            |  15 +-
 core/sqf/export/include/dtm/tm.h                |  16 +-
 core/sqf/export/include/dtm/tmtransaction.h     |  13 +-
 .../hbase/client/transactional/RMInterface.java |  40 +--
 .../sqf/src/seatrans/tm/hbasetmlib2/hbasetm.cpp |  34 ++-
 core/sqf/src/seatrans/tm/hbasetmlib2/hbasetm.h  |  14 +-
 core/sqf/src/tm/tmddlrequests.cpp               | 292 ++++++++++++-------
 core/sqf/src/tm/tmddlrequests.h                 |   8 +-
 core/sqf/src/tm/tmlib.cpp                       |  26 +-
 core/sqf/src/tm/tmlibmsg.h                      |   3 +
 core/sqf/src/tm/tmrmhbase.cpp                   |  23 +-
 core/sqf/src/tm/tmtransaction.cpp               |  52 +++-
 core/sql/bin/SqlciErrors.txt                    |   8 +-
 core/sql/common/OperTypeEnum.h                  |   8 +-
 core/sql/executor/ExExeUtil.h                   |   1 +
 core/sql/executor/ExExeUtilLoad.cpp             |  46 ++-
 core/sql/executor/ExHbaseAccess.cpp             |  30 ++
 core/sql/executor/ExHbaseAccess.h               |   1 +
 core/sql/executor/HBaseClient_JNI.cpp           | 129 +++++++-
 core/sql/executor/HBaseClient_JNI.h             |  12 +
 core/sql/executor/SequenceFileReader.cpp        | 127 --------
 core/sql/executor/SequenceFileReader.h          |  12 -
 core/sql/exp/ExpHbaseDefs.h                     |   6 +
 core/sql/exp/ExpHbaseInterface.cpp              |  45 +++
 core/sql/exp/ExpHbaseInterface.h                |  12 +-
 core/sql/exp/ExpLOBaccess.cpp                   |   2 -
 core/sql/exp/ExpPackDefs.cpp                    |  10 +
 core/sql/exp/exp_clause.cpp                     |  35 ++-
 core/sql/exp/exp_clause.h                       |   4 +-
 core/sql/exp/exp_clause_derived.h               | 169 +++++++++++
 core/sql/exp/exp_function.cpp                   | 204 ++++++++++++-
 core/sql/exp/exp_function.h                     |  35 ++-
 core/sql/exp/exp_like.cpp                       |  80 +++++
 core/sql/exp/exp_math_func.cpp                  |  19 +-
 core/sql/generator/GenItemFunc.cpp              |  42 ++-
 core/sql/optimizer/BindItemExpr.cpp             |  24 +-
 core/sql/optimizer/BindRelExpr.cpp              |   9 +-
 core/sql/optimizer/ItemCache.cpp                |   4 +-
 core/sql/optimizer/ItemExpr.cpp                 |  45 ++-
 core/sql/optimizer/ItemFunc.h                   | 104 ++++++-
 core/sql/optimizer/NormItemExpr.cpp             |   2 +-
 core/sql/optimizer/SynthType.cpp                |  67 ++++-
 core/sql/parser/ParKeyWords.cpp                 |   2 +
 core/sql/parser/sqlparser.y                     | 125 +++++++-
 core/sql/regress/compGeneral/EXPECTED006.SB     | 192 ++++++++++++
 core/sql/regress/compGeneral/TEST006            |  47 +++
 core/sql/regress/executor/EXPECTED002.SB        |  99 ++++++-
 core/sql/regress/executor/TEST002               |  29 +-
 core/sql/sqlcomp/CmpDDLCatErrorCodes.h          |   4 +-
 core/sql/sqlcomp/CmpSeabaseDDLtable.cpp         |  60 +++-
 .../java/org/trafodion/sql/HBaseClient.java     |  40 +++
 .../java/org/trafodion/sql/HBulkLoadClient.java |   2 -
 .../org/trafodion/sql/SequenceFileWriter.java   |  70 +----
 .../src/asciidoc/_chapters/ddl_msgs.adoc        |  84 +++---
 .../sql_functions_and_expressions.adoc          | 249 +++++++++++++++-
 .../_chapters/sql_language_elements.adoc        |   3 +-
 .../src/asciidoc/_chapters/sql_statements.adoc  | 243 ++++++++-------
 64 files changed, 2487 insertions(+), 687 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/685a1cec/core/sqf/src/seatrans/tm/hbasetmlib2/hbasetm.cpp
----------------------------------------------------------------------
diff --cc core/sqf/src/seatrans/tm/hbasetmlib2/hbasetm.cpp
index 968895f,326ba50..776c38c
--- a/core/sqf/src/seatrans/tm/hbasetmlib2/hbasetm.cpp
+++ b/core/sqf/src/seatrans/tm/hbasetmlib2/hbasetm.cpp
@@@ -849,8 -862,11 +851,12 @@@ int CHbaseTM::createTable(int64 pv_tran
                      jba_tbldesc,
                      j_keys);
    if (getExceptionDetails(NULL)) {
-      tm_log_write(DTM_TM_JNI_ERROR, SQ_LOG_ERR, (char *)"CHbaseTM::createTable()", (char *)_tlp_error_msg->c_str(), pv_transid);
+      int errMsgLen = (int)_tlp_error_msg->length();
+ 	 errstrlen = ((errMsgLen < errstrlen) && (errMsgLen > 0)) ? errMsgLen  : errstrlen -1;
+ 	 strncpy(errstr, _tlp_error_msg->c_str(), errstrlen);
+ 	 errstr[errstrlen] = '\0';
+ 	 tm_log_write(DTM_TM_JNI_ERROR, SQ_LOG_ERR, (char *)"CHbaseTM::createTable()", (char *)_tlp_error_msg->c_str(), pv_transid);
 +     _tlp_jenv->PopLocalFrame(NULL);
       return RET_EXCEPTION;
    }
  
@@@ -901,11 -921,16 +909,15 @@@ int CHbaseTM::alterTable(int64 pv_trans
                      jba_tblname,
                      j_tblopts);
     if (getExceptionDetails(NULL)) {
+       int errMsgLen = (int)_tlp_error_msg->length();
+       errstrlen = ((errMsgLen < errstrlen) && (errMsgLen > 0)) ? errMsgLen : errstrlen -1;
+       strncpy(errstr, _tlp_error_msg->c_str(), errstrlen);
+       errstr[errstrlen] = '\0';
        tm_log_write(DTM_TM_JNI_ERROR, SQ_LOG_ERR, (char *)"CHbaseTM::alterTable()", (char *)_tlp_error_msg->c_str(), pv_transid);
 +      _tlp_jenv->PopLocalFrame(NULL);
        return RET_EXCEPTION;
     }
 -
 -   _tlp_jenv->DeleteLocalRef(jba_tblname);
 -   _tlp_jenv->DeleteLocalRef(j_tblopts);
 +   _tlp_jenv->PopLocalFrame(NULL);
  
     HBASETrace(HBASETM_TraceExit, (HDR "CHbaseTM::createTable : Error %d, Txn ID (%d,%d), hostname %s.\n",
                  lv_error, lv_tid.node(), lv_tid.seqnum(), pa_tblname));
@@@ -948,11 -974,14 +962,15 @@@ int CHbaseTM::regTruncateOnAbort(int64 
                      jlv_transid,
                      jba_tblname);
     if (getExceptionDetails(NULL)) {
+       int errMsgLen = (int)_tlp_error_msg->length();
+       errstrlen = ((errMsgLen < errstrlen) && (errMsgLen > 0)) ? errMsgLen : errstrlen -1;
+       strncpy(errstr, _tlp_error_msg->c_str(), errstrlen);
+       errstr[errstrlen] = '\0';
        tm_log_write(DTM_TM_JNI_ERROR, SQ_LOG_ERR, (char *)"CHbaseTM::regTruncateOnAbort()", (char *)_tlp_error_msg->c_str(), pv_transid);
 +      _tlp_jenv->PopLocalFrame(NULL);
        return RET_EXCEPTION;
     }
 -   _tlp_jenv->DeleteLocalRef(jba_tblname);
 +   _tlp_jenv->PopLocalFrame(NULL);
  
     HBASETrace(HBASETM_TraceExit, (HDR "CHbaseTM::regTruncateOnAbort : Error %d, Txn ID (%d,%d), hostname %s.\n",
                  lv_error, lv_tid.node(), lv_tid.seqnum(), pa_tblname));
@@@ -995,8 -1025,11 +1015,12 @@@ int CHbaseTM::dropTable(int64 pv_transi
                      jlv_transid,
                      jba_tblname);
     if (getExceptionDetails(NULL)) {
+       int errMsgLen = (int)_tlp_error_msg->length();
+       errstrlen = ((errMsgLen < errstrlen) && (errMsgLen > 0)) ? errMsgLen : errstrlen -1;
+       strncpy(errstr, _tlp_error_msg->c_str(), errstrlen);
+       errstr[errstrlen] = '\0';
        tm_log_write(DTM_TM_JNI_ERROR, SQ_LOG_ERR, (char *)"CHbaseTM::dropTable()", (char *)_tlp_error_msg->c_str(), pv_transid);
 +      _tlp_jenv->PopLocalFrame(NULL);
        return RET_EXCEPTION;
     }