http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java ---------------------------------------------------------------------- diff --git a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java index b1f19ad..d91565e 100644 --- a/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java +++ b/core/sqf/src/seatrans/hbase-trx/src/main/java/org/apache/hadoop/hbase/coprocessor/transactional/SplitBalanceHelper.java @@ -306,12 +306,13 @@ public class SplitBalanceHelper { try { List<String> trafTables = ZKUtil.listChildrenNoWatch(zkw, zSplitBalPathNoSlash); List<String> hbaseTables = ZKUtil.listChildrenNoWatch(zkw, SplitBalanceHelper.zkTable); - - for (String tableName : trafTables) { + if(trafTables != null && hbaseTables != null) { + for (String tableName : trafTables) { if (!hbaseTables.contains(tableName)) { if (LOG.isTraceEnabled()) LOG.trace("zkCleanup, removing " + zSplitBalPath + tableName); ZKUtil.deleteNodeRecursively(zkw, zSplitBalPath + tableName); } + } } } catch (KeeperException ke) { if (LOG.isErrorEnabled()) LOG.error("zkCleanup error, please check your ZooKeeper: " + ke); @@ -320,4 +321,3 @@ public class SplitBalanceHelper { } } -
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/Makefile ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/Makefile b/core/sqf/src/tm/Makefile index 80a295d..734653f 100644 --- a/core/sqf/src/tm/Makefile +++ b/core/sqf/src/tm/Makefile @@ -44,6 +44,9 @@ endif DTMOBJS = -DTMOBJS +#gcc 4.8 need explicit set this flag to allow auto search of dependent shared object during link +LNK_FLGS += -Xlinker --copy-dt-needed-entries + LIBSTMOBJS = $(OUTDIR)/tmtransid.o \ $(OUTDIR)/tmtransaction.o \ $(OUTDIR)/tmlibtxn.o \ http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tm.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tm.cpp b/core/sqf/src/tm/tm.cpp index d37ad76..00db215 100644 --- a/core/sqf/src/tm/tm.cpp +++ b/core/sqf/src/tm/tm.cpp @@ -460,8 +460,8 @@ void tm_process_req_requestregioninfo(CTmTxMessage * pp_msg) TM_Txid_legacy lv_transid; } u; - char res_array[10], tname[300], ername[50], rname[100], offline[20], regid[200], hostname[200], port[100]; - res_array[9] = '\0', tname[299] = '\0', ername[49] = '\0', rname[99] = '\0', offline[19] = '\0'; + char tname[300], ername[50], rname[100], offline[20], regid[200], hostname[200], port[100]; + tname[299] = '\0', ername[49] = '\0', rname[99] = '\0', offline[19] = '\0'; regid[199]= '\0', hostname[199]='\0', port[99]='\0'; TMTrace(2, ("tm_process_req_requestregioninfo ENTRY.\n")); @@ -1401,7 +1401,7 @@ void tm_process_req_ax_reg (CTmTxMessage * pp_msg) lv_nid, lv_pid, lv_ptype)); tm_log_event(DTM_AX_REG_XARM_NOTSUPPORTED, SQ_LOG_CRIT, "DTM_AX_REG_XARM_NOTSUPPORTED", -1,pp_msg->request()->u.iv_ax_reg.iv_rmid,-1,pp_msg->msgid(), - -1,-1,-1,-1,-1,-1,-1,-1,lv_pid,lv_ptype,NULL,lv_nid); + -1,-1,-1,-1,-1,-1,-1,-1,lv_pid,lv_ptype,0,lv_nid); pp_msg->reply(FENOTFOUND); delete pp_msg; return; @@ -2099,8 +2099,6 @@ void tm_originating_sync_abort(int32 pv_tag) // --------------------------------------------------------------------------- void tm_process_node_down_msg(int32 pv_nid) { - int32 lv_error = 0; - gv_tm_info.close_tm(pv_nid); TMTrace(2, ("tm_process_node_down_msg ENTRY, nid %d\n", pv_nid)); tm_log_event(DTM_NODEDOWN, SQ_LOG_INFO, "DTM_NODEDOWN", @@ -2126,7 +2124,7 @@ void tm_process_node_down_msg(int32 pv_nid) // transaction has now yet been enabled. { gv_tm_info.ClusterRecov(new TM_Recov(gv_tm_info.rm_wait_time())); - lv_error = gv_tm_info.ClusterRecov()->initiate_start_sync(); + gv_tm_info.ClusterRecov()->initiate_start_sync(); } else { @@ -2224,7 +2222,6 @@ void tm_abort_all_transactions(bool pv_shutdown) void tm_process_registry_change(MS_Mon_Change_def *pp_change ) { int32 lv_value; - bool lv_success = false; char lv_regKeyText[1024]; char *lp_regKeyText = (char *) &lv_regKeyText; @@ -2285,7 +2282,7 @@ void tm_process_registry_change(MS_Mon_Change_def *pp_change ) lv_value = atoi (pp_change->value); bool lv_tm_stats = ((lv_value == 0)?false:true); gv_tm_info.stats()->initialize(lv_tm_stats, gv_tm_info.stats()->collectInterval()); - lv_success = gv_tm_info.threadPool()->setConfig(lv_tm_stats); + gv_tm_info.threadPool()->setConfig(lv_tm_stats); // Add other pools here } // Configure thread pool @@ -2293,38 +2290,38 @@ void tm_process_registry_change(MS_Mon_Change_def *pp_change ) { lv_value = atoi (pp_change->value); if (lv_value >= 1) - lv_success = gv_tm_info.threadPool()->setConfig(gv_tm_info.tm_stats(), lv_value); + gv_tm_info.threadPool()->setConfig(gv_tm_info.tm_stats(), lv_value); } else if (strcmp(pp_change->key, DTM_STEADYSTATE_LOW_THREADS) == 0) { lv_value = atoi (pp_change->value); if (lv_value >= 0) - lv_success = gv_tm_info.threadPool()->setConfig(gv_tm_info.tm_stats(), -1, lv_value); + gv_tm_info.threadPool()->setConfig(gv_tm_info.tm_stats(), -1, lv_value); } else if (strcmp(pp_change->key, DTM_STEADYSTATE_HIGH_THREADS) == 0) { lv_value = atoi (pp_change->value); if (lv_value >= 0) - lv_success = gv_tm_info.threadPool()->setConfig(gv_tm_info.tm_stats(), -1, -1, lv_value); + gv_tm_info.threadPool()->setConfig(gv_tm_info.tm_stats(), -1, -1, lv_value); } // Configure transaction pool else if (strcmp(pp_change->key, DTM_MAX_NUM_TRANS) == 0) { lv_value = atoi (pp_change->value); if (lv_value >= 1) - lv_success = gv_tm_info.transactionPool()->setConfig(gv_tm_info.tm_stats(), lv_value); + gv_tm_info.transactionPool()->setConfig(gv_tm_info.tm_stats(), lv_value); } else if (strcmp(pp_change->key, DTM_STEADYSTATE_LOW_TRANS) == 0) { lv_value = atoi (pp_change->value); if (lv_value >= 0) - lv_success = gv_tm_info.transactionPool()->setConfig(gv_tm_info.tm_stats(), -1, lv_value); + gv_tm_info.transactionPool()->setConfig(gv_tm_info.tm_stats(), -1, lv_value); } else if (strcmp(pp_change->key, DTM_STEADYSTATE_HIGH_TRANS) == 0) { lv_value = atoi (pp_change->value); if (lv_value >= 0) - lv_success = gv_tm_info.transactionPool()->setConfig(gv_tm_info.tm_stats(), -1, -1, lv_value); + gv_tm_info.transactionPool()->setConfig(gv_tm_info.tm_stats(), -1, -1, lv_value); } else if (strcmp(pp_change->key, DTM_CP_INTERVAL) == 0) { @@ -2789,7 +2786,7 @@ void tm_process_msg(BMS_SRE *pp_sre) Tm_Broadcast_Rsp_Type *lp_br_rsp; Tm_Perf_Stats_Req_Type *lp_ps_req; Tm_Perf_Stats_Rsp_Type *lp_ps_rsp; - Tm_Sys_Status_Req_Type *lp_ss_req; + //Tm_Sys_Status_Req_Type *lp_ss_req; Tm_Sys_Status_Rsp_Type *lp_ss_rsp; Tm_RolloverCP_Req_Type *lp_rc_req; Tm_RolloverCP_Rsp_Type *lp_rc_rsp; @@ -2901,7 +2898,7 @@ void tm_process_msg(BMS_SRE *pp_sre) } case TM_MSG_TYPE_CALLSTATUSSYSTEM: { - lp_ss_req = (Tm_Sys_Status_Req_Type *) la_recv_buffer; + //lp_ss_req = (Tm_Sys_Status_Req_Type *) la_recv_buffer; lp_ss_rsp = (Tm_Sys_Status_Rsp_Type *) la_send_buffer; TM_STATUSSYS *lp_system_status = new TM_STATUSSYS(); @@ -2922,7 +2919,7 @@ void tm_process_msg(BMS_SRE *pp_sre) } case TM_MSG_TYPE_STATUSSYSTEM: { - lp_ss_req = (Tm_Sys_Status_Req_Type *) la_recv_buffer; + //lp_ss_req = (Tm_Sys_Status_Req_Type *) la_recv_buffer; lp_ss_rsp = (Tm_Sys_Status_Rsp_Type *) la_send_buffer; tm_fill_sys_status_buffer(lp_ss_rsp); @@ -3369,7 +3366,7 @@ int main(int argc, char *argv[]) msg_mon_get_my_info2(&lv_my_nid, // mon node-id &lv_my_pid, // mon process-id NULL, // mon name - NULL, // mon name-len + 0, // mon name-len NULL, // mon process-type NULL, // mon zone-id NULL, // os process-id http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmaudit.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmaudit.cpp b/core/sqf/src/tm/tmaudit.cpp index 6bc9315..ca2f5a0 100644 --- a/core/sqf/src/tm/tmaudit.cpp +++ b/core/sqf/src/tm/tmaudit.cpp @@ -298,11 +298,11 @@ int32 TM_Audit::write_trans_state(TM_Transid_Type *pv_transid, { Audit_Transaction_State lv_state_rec; char lv_write_buffer[REC_SIZE]; - bool lv_force = true; + //bool lv_force = true; int32 lv_notify = 0; TMTrace(2, ("TM_Audit::write_trans_state: ENTRY \n")); - lv_force = prepare_trans_state(&lv_state_rec, lv_write_buffer, pv_transid, + prepare_trans_state(&lv_state_rec, lv_write_buffer, pv_transid, pv_nid, pv_state, pv_abort_flags); #ifdef USE_FILE_AUDIT @@ -316,7 +316,7 @@ int32 TM_Audit::write_trans_state(TM_Transid_Type *pv_transid, void TM_Audit::write_shutdown(int32 pv_nid, int32 pv_state) { Audit_TM_Shutdown lv_rec; - int64 lv_vsn; + //int64 lv_vsn; char lv_write_buffer[REC_SIZE]; pv_nid = pv_nid; // 810 @@ -334,7 +334,7 @@ void TM_Audit::write_shutdown(int32 pv_nid, int32 pv_state) #endif iv_mutex.lock(); - lv_vsn = iv_vsn++; + iv_vsn++; iv_mutex.unlock(); @@ -481,15 +481,15 @@ void TM_Audit::adp_module_terminate() void TM_Audit::adp_activate_cursor() { // If we're using a TLOG/TM then the index is nid. - AuditTrailPosition_Struct lv_low_pos, lv_high_pos; + //AuditTrailPosition_Struct lv_low_pos, lv_high_pos; if (!iv_initialized) return; // for now - lv_low_pos.Sequence = 0; - lv_low_pos.rba = 0; - lv_high_pos.Sequence = 0; - lv_high_pos.rba = 0; + //lv_low_pos.Sequence = 0; + //lv_low_pos.rba = 0; + //lv_high_pos.Sequence = 0; + //lv_high_pos.rba = 0; } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmauditobj.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmauditobj.cpp b/core/sqf/src/tm/tmauditobj.cpp index 3f402bb..3b29871 100644 --- a/core/sqf/src/tm/tmauditobj.cpp +++ b/core/sqf/src/tm/tmauditobj.cpp @@ -207,14 +207,12 @@ void CTmAuditObj::write_buffer() { TMTrace(2, ("CTmAuditObj::write_buffer : ENTRY.\n")); - int32 lv_notify = -1; - if (iv_prepared_to_write) // no lock means it was not called appropriately, error TODO { if (iv_write_buf_size > 0) { TMTrace(2, ("CTmAuditObj::write_buffer with size of %d: ENTRY.\n", iv_write_buf_size)); - lv_notify = iv_mat.write_buffer(iv_write_buf_size, ia_write_buffer, iv_highest_fill_vsn); + iv_mat.write_buffer(iv_write_buf_size, ia_write_buffer, iv_highest_fill_vsn); iv_write_buf_size = 0; } else @@ -226,7 +224,7 @@ void CTmAuditObj::write_buffer() prepare_to_write(true); if (iv_write_buf_size > 0) { - lv_notify = iv_mat.write_buffer(iv_write_buf_size, ia_write_buffer, iv_highest_fill_vsn); + iv_mat.write_buffer(iv_write_buf_size, ia_write_buffer, iv_highest_fill_vsn); iv_write_buf_size = 0; } iv_double_write = false; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmddlrequests.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmddlrequests.cpp b/core/sqf/src/tm/tmddlrequests.cpp index 5c45609..63661f1 100644 --- a/core/sqf/src/tm/tmddlrequests.cpp +++ b/core/sqf/src/tm/tmddlrequests.cpp @@ -36,7 +36,6 @@ using namespace std; JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInterface_createTableReq (JNIEnv *pp_env, jobject pv_object, jbyteArray pv_tableDescriptor, jobjectArray pv_keys, jint pv_numSplits, jint pv_keyLength, jlong pv_transid, jbyteArray pv_tblname){ - short lv_ret; char la_tbldesc[TM_MAX_DDLREQUEST_STRING]; char la_tblname[TM_MAX_DDLREQUEST_STRING]; char* str_key; @@ -76,7 +75,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInter pp_env->DeleteLocalRef(jba_keyarray); } - lv_ret = CREATETABLE(la_tbldesc, lv_tbldesc_length, la_tblname, la_keys, lv_numSplits, lv_keyLength, lv_transid); + CREATETABLE(la_tbldesc, lv_tbldesc_length, la_tblname, la_keys, lv_numSplits, lv_keyLength, lv_transid); pp_env->ReleaseByteArrayElements(pv_tableDescriptor, lp_tbldesc, 0); pp_env->ReleaseByteArrayElements(pv_tblname, lp_tblname, 0); @@ -92,7 +91,6 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInter JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInterface_dropTableReq (JNIEnv *pp_env, jobject pv_object, jbyteArray pv_tblname, jlong pv_transid) { - short lv_ret; char la_tblname[TM_MAX_DDLREQUEST_STRING]; int lv_tblname_len = pp_env->GetArrayLength(pv_tblname); @@ -106,7 +104,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInter long lv_transid = (long) pv_transid; - lv_ret = DROPTABLE(la_tblname, lv_tblname_len, lv_transid); + DROPTABLE(la_tblname, lv_tblname_len, lv_transid); pp_env->ReleaseByteArrayElements(pv_tblname, lp_tblname, 0); } } @@ -119,7 +117,6 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInter JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInterface_truncateOnAbortReq (JNIEnv *pp_env, jobject pv_object, jbyteArray pv_tblname, jlong pv_transid) { - short lv_ret; char la_tblname[TM_MAX_DDLREQUEST_STRING]; int lv_tblname_len = pp_env->GetArrayLength(pv_tblname); @@ -133,7 +130,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInter long lv_transid = (long) pv_transid; - lv_ret = REGTRUNCATEONABORT(la_tblname, lv_tblname_len, lv_transid); + REGTRUNCATEONABORT(la_tblname, lv_tblname_len, lv_transid); pp_env->ReleaseByteArrayElements(pv_tblname, lp_tblname, 0); } } @@ -146,7 +143,6 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInter JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInterface_alterTableReq (JNIEnv *pp_env, jobject pv_object, jbyteArray pv_tblName, jobjectArray pv_tableOptions, jlong pv_transID) { - short lv_ret; int tblopts_len =0; char la_tblname[TM_MAX_DDLREQUEST_STRING]; @@ -186,7 +182,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_RMInter } long lv_transid = (long) pv_transID; - lv_ret = ALTERTABLE(la_tblname, lv_tblname_len, tbl_options, tblopts_len, tbloptions_cnt, lv_transid); + ALTERTABLE(la_tblname, lv_tblname_len, tbl_options, tblopts_len, tbloptions_cnt, lv_transid); pp_env->ReleaseByteArrayElements(pv_tblName, lp_tblname, 0); } } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmlib.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmlib.cpp b/core/sqf/src/tm/tmlib.cpp index a2bf48b..54803f5 100644 --- a/core/sqf/src/tm/tmlib.cpp +++ b/core/sqf/src/tm/tmlib.cpp @@ -2730,21 +2730,20 @@ bool TMLIB::phandle_get(TPT_PTR(pp_phandle), int pv_node) void TMLIB::phandle_set (TPT_PTR(pp_phandle), int pv_node) { - short lv_error = 0; ia_tm_phandle[pv_node].iv_phandle = *pp_phandle; ia_tm_phandle[pv_node].iv_open = true; //call decompose to get out the nid/pid - lv_error = XPROCESSHANDLE_DECOMPOSE_(pp_phandle, + XPROCESSHANDLE_DECOMPOSE_(pp_phandle, NULL, // node - already know it &ia_tm_phandle[pv_node].iv_pid, // pid NULL, // don't care NULL, // don't care + 0, // don't care NULL, // don't care NULL, // don't care - NULL, // don't care - NULL, // don't care + 0, // don't care NULL, // don't care NULL); //sdon't care @@ -2754,7 +2753,6 @@ void TMLIB::phandle_set (TPT_PTR(pp_phandle), int pv_node) void TMLIB::initialize() { - int lv_err = 0; msg_mon_get_process_info(NULL, &iv_my_nid, &iv_my_pid); @@ -2766,7 +2764,7 @@ void TMLIB::initialize() //TODO: switch the following call to msg_mon_get_node_info2 when available. // This call has been changed so that the node count includes spare nodes, so // will give the wrong value for iv_node_count. - lv_err = msg_mon_get_node_info(&iv_node_count, MAX_NODES, NULL); + msg_mon_get_node_info(&iv_node_count, MAX_NODES, NULL); is_initialized(true); // We don't use gv_tmlib_initialized but set it here just to keep things aligned. gv_tmlib_initialized = true; @@ -3142,11 +3140,10 @@ short TMLIB::setupJNI() /////////////////////////////////////////////// short TMLIB::initConnection(short pv_nid) { - jboolean jresult = 0; jthrowable exc; jshort jdtmid = pv_nid; //sleep(30); - jresult = _tlp_jenv->CallBooleanMethod(javaObj_, TMLibJavaMethods_[JM_INIT1].methodID, jdtmid); + _tlp_jenv->CallBooleanMethod(javaObj_, TMLibJavaMethods_[JM_INIT1].methodID, jdtmid); exc = _tlp_jenv->ExceptionOccurred(); if(exc) { _tlp_jenv->ExceptionDescribe(); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmpoolelement.h ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmpoolelement.h b/core/sqf/src/tm/tmpoolelement.h index 5984351..ead2120 100644 --- a/core/sqf/src/tm/tmpoolelement.h +++ b/core/sqf/src/tm/tmpoolelement.h @@ -46,7 +46,7 @@ protected: public: CTmPoolElement(); - ~CTmPoolElement(); + virtual ~CTmPoolElement(); // Required callbacks for CTmPool elements: static CTmPoolElement* constructPoolElement(int64); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmrecov.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmrecov.cpp b/core/sqf/src/tm/tmrecov.cpp index d73b419..b3eb222 100644 --- a/core/sqf/src/tm/tmrecov.cpp +++ b/core/sqf/src/tm/tmrecov.cpp @@ -1244,7 +1244,6 @@ int32 TM_Recov::resolve_in_doubt_txs(int32 pv_dtm, int_32 delay) { TM_TX_Info * lp_txn = NULL; int64 lv_last_key = 0; - int32 lv_error = 0; // The total number of transactions to recover for this node has already been set when we created the Transaction State List //iv_total_txs_to_recover = ip_tm_info->num_active_txs() + txnStateList()->size(); @@ -1261,7 +1260,7 @@ int32 TM_Recov::resolve_in_doubt_txs(int32 pv_dtm, int_32 delay) while (lp_txn) { - lv_error = resolveTxn(lp_txn); + resolveTxn(lp_txn); lv_last_key = txnList()->curr_key(); lp_txn = (TM_TX_Info *) txnList()->get_next(); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmregisterregion.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmregisterregion.cpp b/core/sqf/src/tm/tmregisterregion.cpp index 129abf3..97726b4 100644 --- a/core/sqf/src/tm/tmregisterregion.cpp +++ b/core/sqf/src/tm/tmregisterregion.cpp @@ -33,7 +33,6 @@ using namespace std; JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_TransactionState_registerRegion (JNIEnv *pp_env, jobject pv_object, jlong pv_transid, jlong pv_startid, jint pv_port, jbyteArray pv_hostname, jlong pv_startcode, jbyteArray pv_dos) { - short lv_ret; char la_hostname[TM_MAX_REGIONSERVER_STRING]; char la_dos[TM_MAX_REGIONSERVER_STRING]; memset(la_hostname, 0, TM_MAX_REGIONSERVER_STRING); @@ -55,8 +54,7 @@ JNIEXPORT void JNICALL Java_org_apache_hadoop_hbase_client_transactional_Transac lp_dos, lv_dos_length); - lv_ret = REGISTERREGION(pv_transid, pv_startid, pv_port, la_hostname, lv_hostname_length, pv_startcode, la_dos, lv_dos_length); - //cout << "REGISTERREGION Error: " << lv_ret << endl; + REGISTERREGION(pv_transid, pv_startid, pv_port, la_hostname, lv_hostname_length, pv_startcode, la_dos, lv_dos_length); pp_env->ReleaseByteArrayElements(pv_hostname, lp_hostname, 0); pp_env->ReleaseByteArrayElements(pv_dos, lp_dos, 0); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmrmhbase.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmrmhbase.cpp b/core/sqf/src/tm/tmrmhbase.cpp index ea26037..a0974dc 100644 --- a/core/sqf/src/tm/tmrmhbase.cpp +++ b/core/sqf/src/tm/tmrmhbase.cpp @@ -402,7 +402,6 @@ int32 RM_Info_HBASE::hb_ddl_operation(CTmTxBase *pp_txn, int64 pv_flags, CTmTxMe int len; int len_aligned; - int buffer_size; int index; char *ddlbuffer; char **buffer_keys; @@ -437,7 +436,6 @@ int32 RM_Info_HBASE::hb_ddl_operation(CTmTxBase *pp_txn, int64 pv_flags, CTmTxMe 0); } else { - buffer_size = pv_numsplits*pv_keylen; buffer_keys = new char *[pv_numsplits]; index = len_aligned; @@ -480,7 +478,6 @@ int32 RM_Info_HBASE::hb_ddl_operation(CTmTxBase *pp_txn, int64 pv_flags, CTmTxMe ddlbuffer = pp_msg->getBuffer(); - buffer_size = pv_numtblopts*pv_tbloptslen; buffer_opts = new char *[pv_numtblopts]; index = len_aligned; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmrmtse.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmrmtse.cpp b/core/sqf/src/tm/tmrmtse.cpp index f21c84b..8db953a 100644 --- a/core/sqf/src/tm/tmrmtse.cpp +++ b/core/sqf/src/tm/tmrmtse.cpp @@ -191,7 +191,6 @@ void RM_Info_TSE::remove_rm_by_index (int32 pv_index) int RM_Info_TSE::set_partic_and_transid(TM_Txid_Internal pv_transid, int32 pv_rmid ) { bool lv_found = false; - bool lv_partic_added = false; int lv_idx = 0; while (lv_idx <= iv_high_index_used && !lv_found) @@ -200,7 +199,7 @@ int RM_Info_TSE::set_partic_and_transid(TM_Txid_Internal pv_transid, int32 pv_rm // partic to true and set the transid if (ia_TSEBranches[lv_idx].rmid() == pv_rmid) { - lv_partic_added = ia_TSEBranches[lv_idx].add_partic(pv_transid); + ia_TSEBranches[lv_idx].add_partic(pv_transid); lv_found = true; iv_num_rm_partic++; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmtime.h ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmtime.h b/core/sqf/src/tm/tmtime.h index 6f25c21..1602175 100644 --- a/core/sqf/src/tm/tmtime.h +++ b/core/sqf/src/tm/tmtime.h @@ -163,11 +163,10 @@ public: } static Ctimeval now() { - struct timezone lv_tz = {0, NULL}; Ctimeval lv_now; //char la_buf[DTM_STRING_BUF_SIZE]; - int lv_success = gettimeofday(&lv_now, &lv_tz); + int lv_success = gettimeofday(&lv_now, NULL); if (lv_success != 0) { // EMS DTM_GETTIME_FAIL http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmxarmmain.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmxarmmain.cpp b/core/sqf/src/tm/tmxarmmain.cpp index 950b552..9fa60fa 100644 --- a/core/sqf/src/tm/tmxarmmain.cpp +++ b/core/sqf/src/tm/tmxarmmain.cpp @@ -544,7 +544,7 @@ void tm_process_xa_recover(CTmTxMessage * pp_msg) lv_recoverReply.iv_end = true; lv_recoverReply.iv_count = 0; //lv_recoverReply.iv_recovery_index = 0; not found in RM_Recover_Req_Type?? - memset(&lv_recoverReply.iv_xid, NULL, sizeof(lv_recoverReply.iv_xid)); + memset(&lv_recoverReply.iv_xid, 0, sizeof(lv_recoverReply.iv_xid)); // Need to handle TMSTATRSCAN, TMENDRSCAN pp_msg->reply(XA_OK); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tmxatxn.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tmxatxn.cpp b/core/sqf/src/tm/tmxatxn.cpp index 9f7597a..9e52bf3 100644 --- a/core/sqf/src/tm/tmxatxn.cpp +++ b/core/sqf/src/tm/tmxatxn.cpp @@ -145,7 +145,7 @@ void CTmXaTxn::cleanup() iv_txnType = TM_TX_TYPE_XARM; iv_txnObj.ip_xaTxn = this; iv_rmid = -1; - memset(&iv_XID, NULL, sizeof(iv_XID)); + memset(&iv_XID, 0, sizeof(iv_XID)); iv_tx_state = TM_TX_STATE_NOTX; iv_in_use = false; @@ -175,7 +175,7 @@ void CTmXaTxn::initialize(int32 pv_nid, int64 pv_flags, int32 pv_trace_level, iv_txnType = TM_TX_TYPE_XARM; iv_txnObj.ip_xaTxn = this; iv_rmid = -1; - memset(&iv_XID, NULL, sizeof(iv_XID)); + memset(&iv_XID, 0, sizeof(iv_XID)); CTmTxBase::initialize(pv_nid, pv_flags, pv_trace_level, pv_seq, pv_creator_nid, pv_creator_pid, pv_rm_wait_time); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tools/Makefile ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tools/Makefile b/core/sqf/src/tm/tools/Makefile index be32946..93aa948 100644 --- a/core/sqf/src/tm/tools/Makefile +++ b/core/sqf/src/tm/tools/Makefile @@ -48,6 +48,9 @@ endif #TESTAROBJS = adp_read_test.o \ +#gcc 4.8 need explicit enable flag to search for dependent shared object +CXXFLAGS += -Xlinker --copy-dt-needed-entries + PROGS = dtmci \ tmshutdown http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/tools/dtmci.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/tools/dtmci.cpp b/core/sqf/src/tm/tools/dtmci.cpp index ce98eaf..c65259c 100644 --- a/core/sqf/src/tm/tools/dtmci.cpp +++ b/core/sqf/src/tm/tools/dtmci.cpp @@ -142,10 +142,9 @@ void print_transid_str(int32 pv_node, int32 pv_seqnum) { long now() { - struct timezone lv_tz = {0, NULL}; timeval lv_now; - int lv_success = gettimeofday(&lv_now, &lv_tz); + int lv_success = gettimeofday(&lv_now, NULL); if (lv_success != 0) { printf("\n** gettimeofday returned error %d.", lv_success); @@ -502,7 +501,6 @@ void process_tmstats_node(bool pv_reset, int32 pv_nid, bool json) void process_tmstats(bool pv_reset, int32 pv_node, bool json) { - int lv_error = 0; int lv_dtm_count = 0; bool del = false; @@ -513,7 +511,7 @@ void process_tmstats(bool pv_reset, int32 pv_node, bool json) process_tmstats_node(pv_reset, pv_node, json); else { - lv_error = msg_mon_get_node_info ( &lv_dtm_count, + msg_mon_get_node_info ( &lv_dtm_count, MAX_NODES, NULL); @@ -598,14 +596,13 @@ void process_statusalltransactions_node(int32 pv_node) void process_statusalltransactions(int32 pv_node) { - int lv_error = 0; int lv_dtm_count = 0; if(pv_node !=-1) cout << "Info specific node: " << pv_node << "\n"; else { - lv_error = msg_mon_get_node_info(&lv_dtm_count, + msg_mon_get_node_info(&lv_dtm_count, MAX_NODES, NULL); @@ -666,14 +663,13 @@ void process_list_node(int32 pv_node) void process_list(int32 pv_node) { - int lv_error = 0; int lv_dtm_count = 0; if (pv_node != -1) process_list_node(pv_node); else { - lv_error = msg_mon_get_node_info (&lv_dtm_count, + msg_mon_get_node_info (&lv_dtm_count, MAX_NODES, NULL); @@ -1699,7 +1695,7 @@ int main(int argc, char *argv[]) lv_param1 = atoi(lp_nextcmd); } if (lv_param1 == 0) - lv_resume_error= RESUMETRANSACTION(NULL); + lv_resume_error= RESUMETRANSACTION(0); else lv_resume_error= RESUMETRANSACTION(lv_param1); cout << "RESUMETRANSACTION(" << lv_param1 << ") returned error " << lv_resume_error << endl; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/xarmapi.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/xarmapi.cpp b/core/sqf/src/tm/xarmapi.cpp index 15d25e9..55b03bc 100644 --- a/core/sqf/src/tm/xarmapi.cpp +++ b/core/sqf/src/tm/xarmapi.cpp @@ -803,7 +803,7 @@ int xarm_recover_waitReply(int *pp_rmid, XID *pp_xids, int64 *pp_count, int32 lv_type = -1; bool lv_retryLink = false; - if (!pp_rmid || !pp_xids || !pp_count || pp_count <= 0 || !pp_end || !pp_index || !pp_int_error) + if (!pp_rmid || !pp_xids || !pp_count || *pp_count <= 0 || !pp_end || !pp_index || !pp_int_error) { XATrace(XATM_TraceAPIError,("XARM: xarm_recover_waitReply failed with XAER_INVAL " "(invalid parameter or bad address)\n")); @@ -1023,7 +1023,6 @@ int xarm_complete_one(int pv_rmid, int *pp_handle) char la_buf[DTM_STRING_BUF_SIZE]; int lv_xaError = XA_OK; bool lv_retryLink = false; - short lv_event = 0; XATrace(XATM_TraceXAAPI,("XARM: xarm_complete_one ENTRY, rmid(%d), handle(%d).\n", pv_rmid, *pp_handle)); @@ -1049,7 +1048,7 @@ int xarm_complete_one(int pv_rmid, int *pp_handle) } // Wait forever for a completion - lv_event = XWAIT(LDONE, -1); + XWAIT(LDONE, -1); // It's possible for us to have multiple outstanding requests // to the same RM (XARM, so DTM TM process) complete. http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sqf/src/tm/xatmapi.cpp ---------------------------------------------------------------------- diff --git a/core/sqf/src/tm/xatmapi.cpp b/core/sqf/src/tm/xatmapi.cpp index 0100ccc..b6c02d6 100644 --- a/core/sqf/src/tm/xatmapi.cpp +++ b/core/sqf/src/tm/xatmapi.cpp @@ -127,7 +127,7 @@ bool tm_XARM_amIaTM() msg_mon_get_my_info2(NULL, // mon node-id NULL, // mon process-id NULL, // mon name - NULL, // mon name-len + 0, // mon name-len &lv_process_type, // mon process-type NULL, // mon zone-id NULL, // os process-id @@ -1075,7 +1075,7 @@ int tm_xa_recover_waitReply(int *pp_rmid, XID *pp_xids, int64 *pp_count, int32 lv_type = -1; bool lv_retryLink = false; - if (!pp_rmid || !pp_xids || !pp_count || pp_count <= 0 || !pp_end || !pp_index || !pp_int_error) + if (!pp_rmid || !pp_xids || !pp_count || *pp_count <= 0 || !pp_end || !pp_index || !pp_int_error) { XATrace(XATM_TraceAPIError,("XATM: tm_xa_recover_waitReply failed with XAER_INVAL " "(invalid parameter or bad address)\n")); @@ -1295,7 +1295,6 @@ int complete_one(int pv_rmid, int *pp_handle) char la_buf[DTM_STRING_BUF_SIZE]; int lv_xaError = XA_OK; bool lv_retryLink = false; - short lv_event = 0; XATrace(XATM_TraceXAAPI,("XATM: complete_one ENTRY, rmid(%d), handle(%d).\n", pv_rmid, *pp_handle)); @@ -1321,7 +1320,7 @@ int complete_one(int pv_rmid, int *pp_handle) } // Wait forever for a completion - lv_event = XWAIT(LDONE, -1); + XWAIT(LDONE, -1); // It's possible for us to have multiple outstanding requests // to the same RM (XARM, so DTM TM process) complete. http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/SqlCompilerDebugger/mk.sh ---------------------------------------------------------------------- diff --git a/core/sql/SqlCompilerDebugger/mk.sh b/core/sql/SqlCompilerDebugger/mk.sh index 7056cc9..e752bbb 100644 --- a/core/sql/SqlCompilerDebugger/mk.sh +++ b/core/sql/SqlCompilerDebugger/mk.sh @@ -24,6 +24,11 @@ export LD_LIBRARY_PATH=$QT_TOOLKIT/lib:$LD_LIBRARY_PATH # Important: QT_TOOLKIT must not be bundled in Trafodion build # QT License is not compatible with ASF license policy +if [[ ! -d "$QT_TOOLKIT" ]] +then + echo "Skipping Build of SQL Compiler Debugger" + exit 0 +fi qmake -o Makefile SqlCmpDbg.pro make http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/bin/SqlciErrors.txt ---------------------------------------------------------------------- diff --git a/core/sql/bin/SqlciErrors.txt b/core/sql/bin/SqlciErrors.txt index 084a4fd..0e1b24b 100644 --- a/core/sql/bin/SqlciErrors.txt +++ b/core/sql/bin/SqlciErrors.txt @@ -145,7 +145,7 @@ 1143 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Validation of constraint $0~ConstraintName failed; incompatible data exists in referencing base table $1~TableName and referenced base table $2~String0. To display the data that violates the constraint, please use the following DML statement: $3~String1 1144 ZZZZZ 99999 BEGINNER MAJOR DBADMIN A quoted string was expected in first key clause for column $0~ColumnName on table $1~TableName, but the value detected is ($2~String0). 1145 3D000 99999 BEGINNER MAJOR DBADMIN The catalog name $0~CatalogName is reserved for SQL metadata. -1146 ZZZZZ 99999 BEGINNER MINOR DBADMIN Object $0~TableName could not be altered because it is not a $1~String0. +1146 ZZZZZ 99999 BEGINNER MINOR DBADMIN Object $0~String0 could not be altered because it either does not exist or is not a table. 1147 ZZZZZ 99999 BEGINNER MINOR DBADMIN System-generated column $0~ColumnName of base table $1~TableName cannot appear in a unique or primary key constraint definition. 1148 23000 99999 BEGINNER MINOR DBADMIN System-generated column $0~ColumnName of base table $1~TableName cannot appear in a referential integrity constraint definition. 1149 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Column $0~ColumnName does not exist in table $1~TableName. @@ -247,8 +247,8 @@ 1252 ZZZZZ 99999 BEGINNER MAJOR DBADMIN The existing index $0~TableName to be used by a unique or primary constraint has not been populated. Please populate the index and then try to add the constraint again. 1253 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- Msg text will be merged in. ------ 1254 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Duplicate unique constraints are not allowed with same set of columns. -1255 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- Msg text will be merged in ------ -1256 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- Msg text will be merged in ------ +1255 ZZZZZ 99999 BEGINNER MINOR DBADMIN Constraint $0~String0 is the clustering key constraint for table $1~String1 and cannot be dropped. +1256 ZZZZZ 99999 BEGINNER MINOR DBADMIN PRIMARY KEY constraint cannot be added since table $0~String0 already has a user specified clustering key. 1257 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- Msg text will be merged in ------ 1258 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- Msg text will be merged in ------ 1259 ZZZZZ 99999 UUUUUUUU UUUUU UUUUUUU ---- Msg text will be merged in ------ @@ -261,6 +261,7 @@ 1266 ZZZZZ 99999 BEGINNER MINOR DBADMIN Only EXECUTE privilege is supported for a procedure or routine. 1267 ZZZZZ 99999 BEGINNER MINOR DBADMIN $0~string0 privilege is incompatible with this object type. 1268 ZZZZZ 99999 BEGINNER MINOR DBADMIN Duplicate columns are not allowed in a GRANT or REVOKE statement. +1269 ZZZZZ 99999 BEGINNER MINOR DBADMIN Column name $0~String0 is reserved for internal system usage. It cannot be specified as a user column. 1270 ZZZZZ 99999 BEGINNER MAJOR DBADMIN ALLOCATE or DEALLOCATE failed for object $0~TableName due to file error $1~Int0 on $2~String0. 1271 ZZZZZ 99999 BEGINNER MAJOR DBADMIN ALLOCATE failed for object $0~TableName because the number of extents to be allocated ($1~Int0) is greater than the MAXEXTENTS for a partition of the object. 1272 ZZZZZ 99999 BEGINNER CRTCL DIALOUT The system is not licensed for use of SQL format tables. http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/cli/Cli.cpp ---------------------------------------------------------------------- diff --git a/core/sql/cli/Cli.cpp b/core/sql/cli/Cli.cpp index 58a77ba..a6b7f1a 100644 --- a/core/sql/cli/Cli.cpp +++ b/core/sql/cli/Cli.cpp @@ -93,6 +93,8 @@ #include "LmLangManagerC.h" #include "LmLangManagerJava.h" #include "LmRoutine.h" +#include "CmpDDLCatErrorCodes.h" +#include "ExpLOBaccess.h" #define DISPLAY_DONE_WARNING 1032 extern Lng32 getTotalTcbSpace(char * tdb, char * otherInfo, @@ -2454,7 +2456,8 @@ Lng32 SQLCLI_ProcessRetryQuery( return retcode; } - if (rootTdb->updDelInsertQuery()) + if ((rootTdb->updDelInsertQuery()) || + (rootTdb->ddlQuery())) { if (rootTdb->transactionReqd() && (NOT exTransaction->xnInProgress())) @@ -9393,7 +9396,7 @@ Lng32 SQLCLI_LOBcliInterface /*IN*/ char * inLobHandle, /*IN*/ Lng32 inLobHandleLen, /*IN*/ char * blackBox, - /*INOUT*/ Lng32 *blackBoxLen, + /*INOUT*/ Int32 *blackBoxLen, /*OUT*/ char * outLobHandle, /*OUT*/ Lng32 * outLobHandleLen, /*IN*/ LOBcliQueryType qType, @@ -9402,8 +9405,9 @@ Lng32 SQLCLI_LOBcliInterface OUT: for select */ /*INOUT*/ Int64 * dataLen, /* length of data. IN: for insert, out: for select */ - /*OUT*/ Int64 * outDescPartnKey, /* returned after insert and select */ - /*OUT*/ Int64 * outDescSyskey, /* returned after insert and select */ + /*INOUT*/ Int64 * inoutDescPartnKey, /* returned after insert and select + + /*INOUT*/ Int64 * inoutDescSyskey, /* returned after insert and select /*INOUT*/ void* *inCliInterface, /*IN*/ Int64 xnId /* xn id of the parent process, if non-zero */ ) @@ -9458,13 +9462,7 @@ Lng32 SQLCLI_LOBcliInterface ExpLOBoper::ExpGetLOBDescChunksName(schNameLen, schName, uid, lobNum, lobDescChunksNameBuf, lobDescChunksNameLen); - char lobHdrNameBuf[1024]; - Lng32 lobHdrNameLen = 1024; - char * lobHdrName = - ExpLOBoper::ExpGetLOBHdrName(schNameLen, schName, uid, lobNum, - lobHdrNameBuf, lobHdrNameLen); - - + char * query = new(currContext.exHeap()) char[4096]; if (outLobHandleLen) @@ -9498,52 +9496,6 @@ Lng32 SQLCLI_LOBcliInterface SQL_EXEC_Xact(SQLTRANS_INHERIT, NULL); } - /* if ((qType == LOB_CLI_CREATE) || - (qType == LOB_CLI_DROP) || - (qType == LOB_CLI_INSERT) || - (qType == LOB_CLI_INSERT_APPEND) || - (qType == LOB_CLI_UPDATE_UNIQUE) || - (qType == LOB_CLI_DELETE) || - (qType == LOB_CLI_PURGEDATA)) - */ - if (0) - { - Int64 transId; - cliRC = GETTRANSID((short *)&transId); - - if (xnId == 0) // no xn passed in - { - if (cliRC == 75) // no transid present - { - strcpy(query, "set transaction autocommit on;"); - cliRC = cliInterface->executeImmediate(query); - - xnAutoCommit = TRUE; - } - } - else - { - if ((cliRC == 0) && // transid present - (xnId == transId)) - { - // Same as the current transaction in progress. - // do nothing. - } - else - { - cliRC = JOINTRANSACTION(xnId); - if (cliRC) - return -EXE_BEGIN_TRANSACTION_ERROR; - - cliRC = GETTRANSID((short *)&transId); - if ((cliRC) || - (xnId != transId))// transid present - return -EXE_BEGIN_TRANSACTION_ERROR; - - xnJoined = TRUE; - } - } - } switch (qType) { @@ -9565,8 +9517,7 @@ Lng32 SQLCLI_LOBcliInterface case LOB_CLI_CREATE: { - cliRC = cliInterface->executeImmediate("cqd pos hold;"); - cliRC = cliInterface->executeImmediate("cqd pos 'OFF';"); + // create lob descriptor handle table salted str_sprintf(query, "create ghost table %s (descPartnKey largeint not null, numChunks int not null, lobLen largeint not null) salt using 8 partitions store by (descPartnKey, syskey) ", @@ -9581,15 +9532,14 @@ Lng32 SQLCLI_LOBcliInterface if (cliRC < 0) { - cliInterface->executeImmediate("cqd pos restore;"); - + cliInterface->retrieveSQLDiagnostics(myDiags); goto error_return; } // create lob descriptor chunks table salted - str_sprintf(query, "create ghost table %s (descPartnKey largeint not null, descSysKey largeint not null, chunkNum int not null, chunkLen largeint not null, intParam largeint, stringParam varchar(400), primary key(descPartnKey, descSysKey, chunkNum)) salt using 8 partitions", + str_sprintf(query, "create ghost table %s (descPartnKey largeint not null, descSysKey largeint not null, chunkNum int not null, chunkLen largeint not null, dataOffset largeint, stringParam varchar(400), primary key(descPartnKey, descSysKey, chunkNum)) salt using 8 partitions", lobDescChunksName); @@ -9602,14 +9552,11 @@ Lng32 SQLCLI_LOBcliInterface if (cliRC < 0) { - cliInterface->executeImmediate("cqd pos restore;"); - + cliInterface->retrieveSQLDiagnostics(myDiags); goto error_return; } - - cliInterface->executeImmediate("cqd pos restore;"); cliRC = 0; } @@ -9626,7 +9573,7 @@ Lng32 SQLCLI_LOBcliInterface cliRC = cliInterface->executeImmediate(query); currContext.resetSqlParserFlags(0x1); - + if (cliRC < 0) { cliInterface->retrieveSQLDiagnostics(myDiags); @@ -9644,6 +9591,7 @@ Lng32 SQLCLI_LOBcliInterface currContext.resetSqlParserFlags(0x1); + if (cliRC < 0) { cliInterface->retrieveSQLDiagnostics(myDiags); @@ -9651,6 +9599,7 @@ Lng32 SQLCLI_LOBcliInterface goto error_return; } + cliRC = 0; } @@ -9671,7 +9620,6 @@ Lng32 SQLCLI_LOBcliInterface if (cliRC < 0) { cliInterface->retrieveSQLDiagnostics(myDiags); - goto error_return; } @@ -9684,15 +9632,12 @@ Lng32 SQLCLI_LOBcliInterface cliRC = cliInterface->executeImmediate(query); currContext.resetSqlParserFlags(0x1); - + if (cliRC < 0) { cliInterface->retrieveSQLDiagnostics(myDiags); - goto error_return; - } - - + } cliRC = 0; } break; @@ -9715,8 +9660,7 @@ Lng32 SQLCLI_LOBcliInterface if (cliRC < 0) { - cliInterface->retrieveSQLDiagnostics(myDiags); - + cliInterface->retrieveSQLDiagnostics(myDiags); goto error_return; } @@ -9751,11 +9695,11 @@ Lng32 SQLCLI_LOBcliInterface goto error_return; } - if (outDescPartnKey) - *outDescPartnKey = descPartnKey; + if (inoutDescPartnKey) + *inoutDescPartnKey = descPartnKey; - if (outDescSyskey) - *outDescSyskey = descSyskey; + if (inoutDescSyskey) + *inoutDescSyskey = descSyskey; // update lob handle with the returned values if (outLobHandle) @@ -9766,7 +9710,9 @@ Lng32 SQLCLI_LOBcliInterface if (outLobHandleLen) *outLobHandleLen = inLobHandleLen; } + + cliRC = 0; } break; @@ -9825,7 +9771,8 @@ Lng32 SQLCLI_LOBcliInterface str_sprintf(query, "insert into table(ghost table %s) values (%Ld, %Ld, %d, %Ld, %Ld, NULL)", lobDescChunksName, descPartnKey, inDescSyskey, numChunks, (dataLen ? *dataLen : 0), - (dataOffset ? *dataOffset : 0)); + (dataOffset ? *dataOffset : 0) + ); } // set parserflags to allow ghost table @@ -9841,7 +9788,14 @@ Lng32 SQLCLI_LOBcliInterface goto error_return; } + if (inoutDescPartnKey) + *inoutDescPartnKey = descPartnKey; + + if (inoutDescSyskey) + *inoutDescSyskey = inDescSyskey; + if(blackBoxLen) + *blackBoxLen = numChunks; cliRC = 0; // if (outDescSyskey) @@ -9923,7 +9877,7 @@ Lng32 SQLCLI_LOBcliInterface goto error_return; } - + // update lob handle with the returned values if (outLobHandle) { @@ -9933,7 +9887,11 @@ Lng32 SQLCLI_LOBcliInterface if (outLobHandleLen) *outLobHandleLen = inLobHandleLen; } + if (inoutDescPartnKey) + *inoutDescPartnKey = descPartnKey; + if (inoutDescSyskey) + *inoutDescSyskey = inDescSyskey; cliRC = 0; } break; @@ -9975,10 +9933,7 @@ Lng32 SQLCLI_LOBcliInterface goto error_return; } - - cliRC = 0; - // if (outDescSyskey) - // *outDescSyskey = inDescSyskey; + } break; @@ -10038,7 +9993,7 @@ Lng32 SQLCLI_LOBcliInterface } // This lob has only one chunk. Read and return the single descriptor. - str_sprintf(query, "select c.chunkLen, c.intParam from table(ghost table %s) h, table(ghost table %s) c where h.descPartnKey = c.descPartnKey and h.syskey = c.descSyskey and h.descPartnKey = %Ld and h.syskey = %Ld and c.chunkNum = h.numChunks for read committed access", + str_sprintf(query, "select c.chunkLen, c.dataOffset from table(ghost table %s) h, table(ghost table %s) c where h.descPartnKey = c.descPartnKey and h.syskey = c.descSyskey and h.descPartnKey = %Ld and h.syskey = %Ld and c.chunkNum = h.numChunks for read committed access", lobDescHandleName, lobDescChunksName, descPartnKey, inDescSyskey); @@ -10081,11 +10036,11 @@ Lng32 SQLCLI_LOBcliInterface if (dataOffset) str_cpy_all((char*)dataOffset, ptr, len); - if (outDescPartnKey) - *outDescPartnKey = descPartnKey; + if (inoutDescPartnKey) + *inoutDescPartnKey = descPartnKey; - if (outDescSyskey) - *outDescSyskey = inDescSyskey; + if (inoutDescSyskey) + *inoutDescSyskey = inDescSyskey; } // else //cliRC = -100; @@ -10106,7 +10061,7 @@ Lng32 SQLCLI_LOBcliInterface case LOB_CLI_SELECT_CURSOR: { - str_sprintf(query, "select intParam, chunkLen from table(ghost table %s) where descPartnKey = %Ld and descSyskey = %Ld order by chunkNum for read committed access", + str_sprintf(query, "select dataOffset, chunkLen from table(ghost table %s) where descPartnKey = %Ld and descSyskey = %Ld order by chunkNum for read committed access", lobDescChunksName, descPartnKey, inDescSyskey); // set parserflags to allow ghost table @@ -10233,7 +10188,7 @@ Lng32 SQLCLI_LOBcliInterface //aggregate on chunklen for this lob. - str_sprintf (query, "select sum(chunklen) from %s where descpartnkey = %Ld and descsyskey = %Ld ", lobDescChunksName, descPartnKey, inDescSyskey ); + str_sprintf (query, "select sum(chunklen) from %s where descpartnkey = %Ld and descsyskey = %Ld ", lobDescChunksName, descPartnKey, inDescSyskey ); // set parserflags to allow ghost table currContext.setSqlParserFlags(0x1); @@ -10241,11 +10196,11 @@ Lng32 SQLCLI_LOBcliInterface Int64 outlen = 0;Lng32 len = 0; cliRC = cliInterface->executeImmediate(query,(char *)dataLen, &len, FALSE); - if (outDescPartnKey) - *outDescPartnKey = descPartnKey; + if (inoutDescPartnKey) + *inoutDescPartnKey = descPartnKey; - if (outDescSyskey) - *outDescSyskey = inDescSyskey; + if (inoutDescSyskey) + *inoutDescSyskey = inDescSyskey; @@ -10262,6 +10217,7 @@ Lng32 SQLCLI_LOBcliInterface cliRC = saveCliErr; } break; + } // switch // normal return. Fall down to deallocate of structures. @@ -10302,10 +10258,274 @@ Lng32 SQLCLI_LOBcliInterface else return 0; } +/* The process for GC is as follows: +1. Check LOB descriptor chunks table (per column) for any holes in the LOB sections. +2. Create an in memory array that can be used to calculate new offsets. +3. Update the lob descriptor chunks table to reflect the new offsets + if any error, return an error and rollback the user transaction. +4. Compact the lob data file buy doing hte following : + a) Save a copy of the LOB data file. + b) Create a temp lob file to copy the sections contiguously from the lob data file to the temp file. + If any error return an error and rollback all updates to the lob descriptor chunks table. + c) Delete the lob data file. + d) Rename the tempfile to original lob data file name. + If any error, restore the lob data file from the saved backup in step (a) + e) Purge the saved backup. +*/ + +Lng32 SQLCLI_LOB_GC_Interface +( + /*IN*/ CliGlobals *cliGlobals, + /*IN*/ void *lobGlobals, // can be passed or NULL + /*IN*/ char * handle, + /*IN*/ Lng32 handleLen, + /*IN*/ char* hdfsServer, + /*IN*/ Lng32 hdfsPort, + /*IN*/ char *lobLocation, + /*IN*/ Int64 lobMaxMemChunkLen // if passed in as 0, will use default value of 1G for the in memory buffer to do compaction. + ) +{ + Lng32 cliRC = 0; + + ContextCli & currContext = *(cliGlobals->currContext()); + ComDiagsArea & diags = currContext.diags(); + + ComDiagsArea * myDiags = ComDiagsArea::allocate(currContext.exHeap()); + + ExeCliInterface *cliInterface = NULL; + cliInterface = new (currContext.exHeap()) + ExeCliInterface(currContext.exHeap(), + SQLCHARSETCODE_UTF8, + &currContext, + NULL); + Int32 rc = 0; + Int16 flags = 0; + Lng32 lobType = 1; + Lng32 lobNum = 0; + Int64 uid = 0; + Int64 inDescSyskey, inDescPartnKey; + short schNameLen = 0; + char schName[512]; + if (handle) + { + ExpLOBoper::extractFromLOBhandle(&flags, &lobType, &lobNum, &uid, + &inDescSyskey, &inDescPartnKey, + &schNameLen, schName, + handle); + } + + char tgtLobNameBuf[100]; + char * tgtLobName = + ExpLOBoper::ExpGetLOBname(uid, lobNum, tgtLobNameBuf, 100); + + char lobDescHandleNameBuf[1024]; + Lng32 lobDescHandleNameLen = 1024; + char * lobDescHandleName = + ExpLOBoper::ExpGetLOBDescHandleName(schNameLen, schName, uid, lobNum, + lobDescHandleNameBuf, lobDescHandleNameLen); + + char lobDescChunksNameBuf[1024]; + Lng32 lobDescChunksNameLen = 1024; + char * lobDescChunksName = + ExpLOBoper::ExpGetLOBDescChunksName(schNameLen, schName, uid, lobNum, + lobDescChunksNameBuf, lobDescChunksNameLen); + + + char * query = new(currContext.exHeap()) char[4096]; + //Find how many entries in the descchunks table to allocate + //in memory array. + str_sprintf(query, "select count(*) from table(ghost table %s) ", + lobDescChunksName); + + // set parserflags to allow ghost table + currContext.setSqlParserFlags(0x1); + + Lng32 numEntries = 0; + Lng32 len; + cliRC = cliInterface->executeImmediate(query, (char*)&numEntries, &len, FALSE); + + currContext.resetSqlParserFlags(0x1); + + if (cliRC < 0) + { + cliInterface->retrieveSQLDiagnostics(myDiags); + + goto error_return; + } + { + //Allocate an inmemory array of numEntries. + ExLobInMemoryDescChunksEntry *dcInMemoryArray = new ExLobInMemoryDescChunksEntry[numEntries]; + //Read the desc chunks table into memory + + str_sprintf(query, "select dataOffset, descPartnKey,descSyskey,chunkLen,chunkNum from table(ghost table %s) order by dataOffset for read committed access", + lobDescChunksName); + + // set parserflags to allow ghost table + currContext.setSqlParserFlags(0x1); + + cliRC = cliInterface->fetchRowsPrologue(query); + + currContext.resetSqlParserFlags(0x1); + + if (cliRC < 0) + { + cliInterface->retrieveSQLDiagnostics(myDiags); + + goto error_return; + } + cliRC = cliInterface->fetch(); + if (cliRC < 0) + { + cliInterface->retrieveSQLDiagnostics(myDiags); + + cliInterface->fetchRowsEpilogue(0); + + goto error_return; + } + + short i = 0; + Int64 currentOffset = 0; + Int64 descPartnKey = 0; + Int64 descSyskey = 0; + Int64 chunkLen = 0; + Int64 chunkNum = 0; + while (cliRC != 100) + { + char * ptr; + Lng32 len; + + cliInterface->getPtrAndLen(1, ptr, len); + str_cpy_all((char*)¤tOffset, ptr, len); + + cliInterface->getPtrAndLen(2, ptr, len); + str_cpy_all((char*)&descPartnKey, ptr, len); + + cliInterface->getPtrAndLen(3, ptr, len); + str_cpy_all((char*)&descSyskey, ptr, len); + + cliInterface->getPtrAndLen(4, ptr, len); + str_cpy_all((char*)&chunkLen, ptr, len); + + cliInterface->getPtrAndLen(5, ptr, len); + str_cpy_all((char*)&chunkNum, ptr, len); + + dcInMemoryArray[i].setCurrentOffset(currentOffset); + dcInMemoryArray[i].setNewOffset(currentOffset); + dcInMemoryArray[i].setDescPartnKey(descPartnKey); + dcInMemoryArray[i].setSyskey(descSyskey); + dcInMemoryArray[i].setChunkLen(chunkLen); + dcInMemoryArray[i].setChunkNum(chunkNum); + cliRC = cliInterface->fetch(); + i++; + if (cliRC < 0) + { + cliInterface->retrieveSQLDiagnostics(myDiags); + + cliInterface->fetchRowsEpilogue(0); + + goto error_return; + } + } + + cliRC = cliInterface->fetchRowsEpilogue(0); + if (cliRC < 0) + { + cliInterface->retrieveSQLDiagnostics(myDiags); + + goto error_return; + } + + // adjust in memory array to calculate holes and new offsets. + ExpLOBoper::calculateNewOffsets(dcInMemoryArray,numEntries); + + + // Update the descChunks table with new offsets + //TBD start a separate transaction to manage this. + //For now use the transaction associated with the IUD operation + //that triggered this GC + + i = 0; + while (i < numEntries) + { + if (dcInMemoryArray[i].getCurrentOffset() == dcInMemoryArray[i].getNewOffset()) + i++; + else + { + str_sprintf(query, "update table(ghost table %s) set dataOffset=%Ld, chunkLen = %Ld where descPartnKey = %Ld and descSysKey = %Ld", + lobDescChunksName, + dcInMemoryArray[i].getNewOffset(), + dcInMemoryArray[i].getChunkLen(), + dcInMemoryArray[i].getDescPartnKey(), + dcInMemoryArray[i].getSyskey()); + // set parserflags to allow ghost table + currContext.setSqlParserFlags(0x1); + + cliRC = cliInterface->executeImmediate(query); + currContext.resetSqlParserFlags(0x1); + + if (cliRC < 0) + { + cliInterface->retrieveSQLDiagnostics(myDiags); + + //tbd Give warning and rollback just these updates and return with warning. For now return error and abort the iud operation itself since there is no support for nested transactions or SUSPEND and RESUME. + goto error_return; + } + i++; + } + } + + // Compact into new temp file + + + rc = ExpLOBoper::compactLobDataFile(lobGlobals,dcInMemoryArray,numEntries,tgtLobName,lobMaxMemChunkLen, (void *)currContext.exHeap(), hdfsServer, hdfsPort,lobLocation); + + if (rc ) + { + cliRC = 9999; // Warning + ComDiagsArea * da = &diags; + ExRaiseSqlError(currContext.exHeap(), &da, + (ExeErrorCode)(8442), NULL, &cliRC , + &rc, NULL, (char*)"Lob GC call", + getLobErrStr(rc)); + // TBD When local transaction support is in + // rollback all the updates to the lob desc chunks file too. + // return with warning + // For now, return error for the IUD operation + + // Restore original data file. + Int32 rc2=ExpLOBoper::restoreLobDataFile(lobGlobals,tgtLobName, (void *)currContext.exHeap(),hdfsServer,hdfsPort,lobLocation); + // if error restoring, this lob could become corrupt. + goto error_return; + } + else + { + //TBD :commit all updates and remove the saved copy of datafile + ExpLOBoper::purgeBackupLobDataFile(lobGlobals, tgtLobName,(void *)currContext.exHeap(),hdfsServer,hdfsPort,lobLocation); + } + } + error_return: + + Lng32 tempCliRC = 0; + NADELETEBASIC(query, currContext.exHeap()); + + + if (cliRC < 0) + { + if (myDiags->getNumber() > 0) + { + diags.mergeAfter(*myDiags); + } + return cliRC; + } + else if (cliRC == 100) + return 100; + else + return 0; +} Lng32 SQLCLI_LOBddlInterface ( - /*IN*/ CliGlobals *cliGlobals, +/*IN*/ CliGlobals *cliGlobals, /*IN*/ char * schName, /*IN*/ Lng32 schNameLen, /*IN*/ Int64 objectUID, @@ -10314,8 +10534,11 @@ Lng32 SQLCLI_LOBddlInterface /*IN*/ short *lobNumList, /*IN*/ short *lobTypList, /*IN*/ char* *lobLocList, + /*IN*/ char *hdfsServer, + /*IN*/ Int32 hdfsPort, /*IN*/ Int64 lobMaxSize ) + { Lng32 cliRC = 0; @@ -10343,22 +10566,14 @@ Lng32 SQLCLI_LOBddlInterface { case LOB_CLI_CREATE: { - cliRC = cliInterface->executeImmediate("cqd pos hold;"); - cliRC = cliInterface->executeImmediate("cqd pos 'OFF';"); - + // create lob metadata table - str_sprintf(query, "create ghost table %s (lobnum smallint not null, storagetype smallint not null, location varchar(4096) not null, primary key (lobnum)) location $system", - // str_sprintf(query, "create ghost table %s (lobnum smallint not null, storagetype smallint not null, location varchar(4096) not null, primary key (lobnum)) no partition", - lobMDName); + str_sprintf(query, "create ghost table %s (lobnum smallint not null, storagetype smallint not null, location varchar(4096) not null, primary key (lobnum)) ",lobMDName); // set parserflags to allow ghost table currContext.setSqlParserFlags(0x1); - cliRC = cliInterface->executeImmediate(query); - - cliInterface->executeImmediate("cqd pos restore;"); - - + cliRC = cliInterface->executeImmediate(query); currContext.resetSqlParserFlags(0x1); if (cliRC < 0) @@ -10397,8 +10612,8 @@ Lng32 SQLCLI_LOBddlInterface // create lob data tables Lng32 rc = ExpLOBoper::createLOB (NULL, currContext.exHeap(), - lobLocList[i], - objectUID, lobNumList[i], lobMaxSize); + lobLocList[i], hdfsPort,hdfsServer, + objectUID, lobNumList[i],lobMaxSize); if (rc) { @@ -10407,6 +10622,7 @@ Lng32 SQLCLI_LOBddlInterface ExRaiseSqlError(currContext.exHeap(), &da, (ExeErrorCode)(8442), NULL, &cliRC , &rc, NULL, (char*)"ExpLOBInterfaceCreate", + getLobErrStr(rc)); goto error_return; } @@ -10457,10 +10673,11 @@ Lng32 SQLCLI_LOBddlInterface cliRC = cliInterface->executeImmediate(query); currContext.resetSqlParserFlags(0x1); - + if (cliRC < 0) { - cliInterface->retrieveSQLDiagnostics(&diags); + cliInterface->retrieveSQLDiagnostics(&diags); + goto error_return; } @@ -10469,7 +10686,7 @@ Lng32 SQLCLI_LOBddlInterface { Lng32 rc = ExpLOBoper::dropLOB (NULL, currContext.exHeap(), - lobLocList[i], + lobLocList[i],hdfsPort,hdfsServer, objectUID, lobNumList[i]); if (rc) @@ -10541,7 +10758,7 @@ Lng32 SQLCLI_LOBddlInterface { Lng32 rc = ExpLOBoper::dropLOB (NULL, currContext.exHeap(), - lobLocList[i], + lobLocList[i],hdfsPort, hdfsServer, objectUID, lobNumList[i]); if (rc) http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/cli/Cli.h ---------------------------------------------------------------------- diff --git a/core/sql/cli/Cli.h b/core/sql/cli/Cli.h index 9bffc5c..db96c87 100644 --- a/core/sql/cli/Cli.h +++ b/core/sql/cli/Cli.h @@ -895,7 +895,7 @@ Lng32 SQLCLI_LOBcliInterface /*IN*/ char * inLobHandle, /*IN*/ Lng32 inLobHandleLen, /*IN*/ char * blackBox, - /*IN*/ Lng32* blackBoxLen, + /*IN*/ Int32* blackBoxLen, /*OUT*/ char * outLobHandle, /*OUT*/ Lng32 * outLobHandleLen, /*IN*/ LOBcliQueryType qType, @@ -909,6 +909,17 @@ Lng32 SQLCLI_LOBcliInterface /*INOUT*/ void* *inCliInterface, /*IN*/ Int64 xnId /* xn id of the parent process, if non-zero */ ); +Lng32 SQLCLI_LOB_GC_Interface +( + /*IN*/ CliGlobals *cliGlobals, + /*IN*/ void *lobGlobals, // can be passed or NULL + /*IN*/ char * handle, + /*IN*/ Lng32 handleLen, + /*IN*/ char* hdfsServer, + /*IN*/ Lng32 hdfsPort, + /*IN*/ char *lobLocation, + /*IN*/ Int64 lobMaxMemChunkLen // if passed in as 0, will use default value of 1G for the in memory buffer to do compaction. + ); Lng32 SQLCLI_LOBddlInterface ( @@ -921,6 +932,8 @@ Lng32 SQLCLI_LOBddlInterface /*IN*/ short *lobNumList, /*IN*/ short *lobTypList, /*IN*/ char* *lobLocList, + /*IN*/ char *hdfsServer, + /*IN*/ Int32 hdfsPort, /*IN*/ Int64 lobMaxSize ); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/cli/CliExpExchange.cpp ---------------------------------------------------------------------- diff --git a/core/sql/cli/CliExpExchange.cpp b/core/sql/cli/CliExpExchange.cpp index b313040..871985d 100644 --- a/core/sql/cli/CliExpExchange.cpp +++ b/core/sql/cli/CliExpExchange.cpp @@ -207,14 +207,17 @@ ex_expr::exp_return_type InputOutputExpr::describeOutput(void * output_desc_, // Use SQLDESC_CHAR_SET_NAM (one-part name) for charset - if ( DFS2REC::isAnyCharacter(operand->getDatatype()) ) { - output_desc->setDescItem(entry, SQLDESC_CHAR_SET_NAM, 0, - (char*)CharInfo::getCharSetName(operand->getCharSet())); + if ( DFS2REC::isAnyCharacter(operand->getDatatype()) || + (operand->getDatatype() == REC_BLOB) || + (operand->getDatatype() == REC_CLOB )) + { + output_desc->setDescItem(entry, SQLDESC_CHAR_SET_NAM, 0, + (char*)CharInfo::getCharSetName(operand->getCharSet())); - // reset the length for Unicode + // reset the length for Unicode if ( operand->getCharSet() == CharInfo::UNICODE || CharInfo::is_NCHAR_MP(operand->getCharSet()) - ) + ) { length = operand->getLength()/SQL_DBCHAR_SIZE; } @@ -2240,8 +2243,9 @@ ex_expr::exp_return_type InputOutputExpr::describeInput(void * input_desc_, } // Use SQLDESC_CHAR_SET_NAM (one-part name) for charset - if ((dataType >= REC_MIN_CHARACTER) && - (dataType <= REC_MAX_CHARACTER)) { + if (((dataType >= REC_MIN_CHARACTER) && + (dataType <= REC_MAX_CHARACTER)) ) + { input_desc->setDescItem(entry, SQLDESC_CHAR_SET_NAM, 0, (char*)CharInfo::getCharSetName(operand->getCharSet())); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/cli/CliExtern.cpp ---------------------------------------------------------------------- diff --git a/core/sql/cli/CliExtern.cpp b/core/sql/cli/CliExtern.cpp index 127380f..e5dd796 100644 --- a/core/sql/cli/CliExtern.cpp +++ b/core/sql/cli/CliExtern.cpp @@ -7359,7 +7359,7 @@ SQLCLI_LIB_FUNC Lng32 SQL_EXEC_LOBcliInterface /*IN*/ char * inLobHandle, /*IN*/ Lng32 inLobHandleLen, /*IN*/ char * blackBox, - /*IN*/ Lng32* blackBoxLen, + /*IN*/ Int32* blackBoxLen, /*OUT*/ char * outLobHandle, /*OUT*/ Lng32 * outLobHandleLen, /*IN*/ LOBcliQueryType qType, @@ -7415,6 +7415,51 @@ SQLCLI_LIB_FUNC Lng32 SQL_EXEC_LOBcliInterface RecordError(NULL, retcode); return retcode; } +Lng32 SQL_EXEC_LOB_GC_Interface +( + /*IN*/ void *lobGlobals, // can be passed or NULL + /*IN*/ char * handle, + /*IN*/ Lng32 handleLen, + /*IN*/ char* hdfsServer, + /*IN*/ Lng32 hdfsPort, + /*IN*/ char *lobLocation, + /*IN*/ Int64 lobMaxMemChunkLen // if passed in as 0, will use default value of 1G for the in memory buffer to do compaction. + ) +{ + Lng32 retcode; + CLISemaphore *tmpSemaphore; + ContextCli *threadContext; + CLI_NONPRIV_PROLOGUE(retcode); + try + { + tmpSemaphore = getCliSemaphore(threadContext); + tmpSemaphore->get(); + threadContext->incrNumOfCliCalls(); + retcode = SQLCLI_LOB_GC_Interface(GetCliGlobals(), + lobGlobals, + handle, + handleLen, + hdfsServer, + hdfsPort,lobLocation, + lobMaxMemChunkLen); + } + catch(...) + { + retcode = -CLI_INTERNAL_ERROR; +#if defined(_THROW_EXCEPTIONS) + if (cliWillThrow()) + { + threadContext->decrNumOfCliCalls(); + tmpSemaphore->release(); + throw; + } +#endif + } + threadContext->decrNumOfCliCalls(); + tmpSemaphore->release(); + RecordError(NULL, retcode); + return retcode; + } Lng32 SQL_EXEC_LOBddlInterface ( @@ -7426,6 +7471,8 @@ Lng32 SQL_EXEC_LOBddlInterface /*IN*/ short *lobNumList, /*IN*/ short *lobTypList, /*IN*/ char* *lobLocList, + /*IN*/ char *hdfsServer, + /*IN*/ Int32 hdfsPort, /*IN */ Int64 lobMaxSize ) { @@ -7446,7 +7493,10 @@ Lng32 SQL_EXEC_LOBddlInterface qType, lobNumList, lobTypList, - lobLocList, lobMaxSize); + lobLocList, + hdfsServer, + hdfsPort, + lobMaxSize); } catch(...) { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/cli/Descriptor.cpp ---------------------------------------------------------------------- diff --git a/core/sql/cli/Descriptor.cpp b/core/sql/cli/Descriptor.cpp index 7cf666a..e369ee6 100644 --- a/core/sql/cli/Descriptor.cpp +++ b/core/sql/cli/Descriptor.cpp @@ -2931,9 +2931,9 @@ RETCODE Descriptor::setDescItem(Lng32 entry, Lng32 what_to_set, if ( charset_name == NULL ) charset_name = (char*)CharInfo::getCharSetName(newCharSet); - if ( !DFS2REC::isAnyCharacter(descItem.datatype) || - !CharInfo::isCharSetSupported(newCharSet) - ) + if (( !DFS2REC::isAnyCharacter(descItem.datatype) || + !CharInfo::isCharSetSupported(newCharSet) + ) && !((descItem.datatype != REC_BLOB) ||(descItem.datatype != REC_CLOB))) { //Error 8895: An invalid character set name for the descriptor item SQLDESC_CHAR_SET. diags << DgSqlCode(-CLI_INVALID_CHARSET_FOR_DESCRIPTOR) << DgString0(charset_name); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/comexe/ComQueue.h ---------------------------------------------------------------------- diff --git a/core/sql/comexe/ComQueue.h b/core/sql/comexe/ComQueue.h index 7dbfe89..b42c472 100644 --- a/core/sql/comexe/ComQueue.h +++ b/core/sql/comexe/ComQueue.h @@ -203,7 +203,7 @@ NA_EIDPROC NA_EIDPROC void * get(); - // returns the i'th entry + // returns the i'th entry. 0 based. First entry is i = 0 NA_EIDPROC void * get(ULng32 i); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/comexe/ComTdb.h ---------------------------------------------------------------------- diff --git a/core/sql/comexe/ComTdb.h b/core/sql/comexe/ComTdb.h index 5846fd8..a7f7d25 100644 --- a/core/sql/comexe/ComTdb.h +++ b/core/sql/comexe/ComTdb.h @@ -995,6 +995,7 @@ class ComTdbVirtTableIndexInfo : public ComTdbVirtTableBase const char * baseTableName; const char * indexName; + Int64 indexUID; Lng32 keytag; Lng32 isUnique; Lng32 isExplicit; http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/comexe/ComTdbHbaseAccess.cpp ---------------------------------------------------------------------- diff --git a/core/sql/comexe/ComTdbHbaseAccess.cpp b/core/sql/comexe/ComTdbHbaseAccess.cpp index 7d3c3b1..e30787d 100644 --- a/core/sql/comexe/ComTdbHbaseAccess.cpp +++ b/core/sql/comexe/ComTdbHbaseAccess.cpp @@ -335,7 +335,7 @@ ComTdbHbaseAccess::getExpressionName(Int32 expNum) const case 3: return "UpdateExpr"; case 4: - return "MergeInsertExpr"; + return ((getAccessType() == DELETE_) ? "LobDeleteExpr" : "MergeInsertExpr"); case 5: return "LowKeyExpr"; case 6: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/comexe/ComTdbHbaseAccess.h ---------------------------------------------------------------------- diff --git a/core/sql/comexe/ComTdbHbaseAccess.h b/core/sql/comexe/ComTdbHbaseAccess.h index 909a2ed..f430b39 100644 --- a/core/sql/comexe/ComTdbHbaseAccess.h +++ b/core/sql/comexe/ComTdbHbaseAccess.h @@ -154,7 +154,7 @@ public: return NULL; }; - ComTdbAccessType getAccessType() { return ComTdbAccessType(accessType_); } + ComTdbAccessType getAccessType() const { return ComTdbAccessType(accessType_); } class HbaseScanRows : public NAVersionedObject { http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/CharType.cpp ---------------------------------------------------------------------- diff --git a/core/sql/common/CharType.cpp b/core/sql/common/CharType.cpp index 40d258d..6f9e8a3 100644 --- a/core/sql/common/CharType.cpp +++ b/core/sql/common/CharType.cpp @@ -1536,6 +1536,7 @@ SQLBlob::SQLBlob( externalFormat, extFormatLen) { + setCharSet(CharInfo::ISO88591);//lobhandle can only be in ISO format } NAType *SQLBlob::newCopy(NAMemory* h) const @@ -1588,7 +1589,7 @@ SQLClob::SQLClob( externalFormat, extFormatLen) { - setCharSet(CharInfo::DefaultCharSet); + setCharSet(CharInfo::ISO88591); //lob handle can only be in this format } NAType *SQLClob::newCopy(NAMemory* h) const http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/CharType.h ---------------------------------------------------------------------- diff --git a/core/sql/common/CharType.h b/core/sql/common/CharType.h index f76f574..7d0c383 100644 --- a/core/sql/common/CharType.h +++ b/core/sql/common/CharType.h @@ -817,7 +817,7 @@ public: NABoolean allowSQLnull = TRUE, NABoolean inlineIfPossible = FALSE, NABoolean externalFormat = FALSE, - Lng32 extFormatLen = 100); + Lng32 extFormatLen = 1024); SQLClob(const SQLClob & aClob,NAMemory * heap) :SQLlob(aClob,heap) {} http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/ComMisc.cpp ---------------------------------------------------------------------- diff --git a/core/sql/common/ComMisc.cpp b/core/sql/common/ComMisc.cpp index b9b94a5..76313a2 100644 --- a/core/sql/common/ComMisc.cpp +++ b/core/sql/common/ComMisc.cpp @@ -228,4 +228,17 @@ NAString ComConvertTrafNameToNativeName( return convertedName; } +NABoolean ComTrafReservedColName( + const NAString &colName) +{ + + if ((colName == TRAF_SALT_COLNAME) || + (colName == TRAF_SYSKEY_COLNAME)) + return TRUE; + if ((memcmp(colName.data(), TRAF_DIVISION_COLNAME_PREFIX, strlen(TRAF_DIVISION_COLNAME_PREFIX)) == 0) && + (colName.data()[colName.length()-1] == '_')) + return TRUE; + + return FALSE; +} http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/ComMisc.h ---------------------------------------------------------------------- diff --git a/core/sql/common/ComMisc.h b/core/sql/common/ComMisc.h index 65aca95..8049209 100644 --- a/core/sql/common/ComMisc.h +++ b/core/sql/common/ComMisc.h @@ -65,4 +65,12 @@ NAString ComConvertTrafNameToNativeName( const NAString &schemaName, const NAString &objectName); +// returns TRUE if specified name is a reserved name. +// Currently, reserved names for traf internal usage are: +// SYSKEY +// _SALT_ +// _DIVISION_*_ :_DIVISION_ prefix followed by division number and ending +// with underscore(_) +NABoolean ComTrafReservedColName(const NAString &colName); + #endif // COMMISC_H http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/ComSmallDefs.h ---------------------------------------------------------------------- diff --git a/core/sql/common/ComSmallDefs.h b/core/sql/common/ComSmallDefs.h index 9a10fc8..f83e199 100644 --- a/core/sql/common/ComSmallDefs.h +++ b/core/sql/common/ComSmallDefs.h @@ -122,7 +122,9 @@ typedef NABoolean ComBoolean; #define SEABASE_OLD_PRIVMGR_SCHEMA "PRIVMGR_MD" #define SEABASE_PRIVMGR_SCHEMA "_PRIVMGR_MD_" #define SEABASE_UDF_SCHEMA "_UDF_" - +#define LOB_MD_PREFIX "LOBMD_" +#define LOB_DESC_CHUNK_PREFIX "LOBDescChunks_" +#define LOB_DESC_HANDLE_PREFIX "LOBDescHandle_" #define SEABASE_DEFAULT_COL_FAMILY "#1" // reserved names for seabase metadata where SQL table information is kept @@ -169,6 +171,16 @@ typedef NABoolean ComBoolean; #define SEABASE_REGRESS_DEFAULT_SCHEMA "SCH" +// Trafodion system library and procedures reserved schema +// Procedures are defined in CmpSeabaseDDLroutine.h +#define SEABASE_LIBMGR_SCHEMA "_LIBMGR_" +#define SEABASE_LIBMGR_LIBRARY "DB__LIBMGRNAME" + +// reserved column names for traf internal system usage +#define TRAF_SALT_COLNAME "_SALT_" +#define TRAF_DIVISION_COLNAME_PREFIX "_DIVISION_" +#define TRAF_SYSKEY_COLNAME "SYSKEY" + // length of explain_plan column in metric_query_table. // explain_plan greater than this length are chunked and store in multiple // rows in metric_text_table http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/ComUser.cpp ---------------------------------------------------------------------- diff --git a/core/sql/common/ComUser.cpp b/core/sql/common/ComUser.cpp index 504ce06..7e7d7ca 100644 --- a/core/sql/common/ComUser.cpp +++ b/core/sql/common/ComUser.cpp @@ -347,3 +347,57 @@ Int16 ComUser::getAuthNameFromAuthID(Int32 authID, return FEOK; } + +// ---------------------------------------------------------------------------- +// method: getRoleList +// +// Returns the list of system roles +// Params: +// (out) roleList - the list of roles, space is managed by the caller +// (out) actualLen - the length of the returned role list +// ( in) maxLen - the size of the roleList allocated by the caller +// ( in) delimited - delimiter to use (defaults to single quote) +// ( in) separator - specified what separator to use (defaults to comma) +// ( in) includeSpecialAuths - includes the special auths (PUBLIC and _SYSTEM) +// +// Returns: FEOK -- found +// FEBUFTOOSMALL -- space allocated for role list is too small +// ---------------------------------------------------------------------------- +Int32 ComUser::getRoleList (char * roleList, + Int32 &actualLen, + const Int32 maxLen, + const char delimiter, + const char separator, + const bool includeSpecialAuths) +{ + Int32 numberRoles = sizeof(systemRoles)/sizeof(SystemRolesStruct); + Int32 roleListLen = (MAX_AUTHNAME_LEN*numberRoles)+(numberRoles * 4); // 4 = 2 del + 2 sep + char generatedRoleList[roleListLen]; + char *pRoles = generatedRoleList; + char roleName[MAX_AUTHNAME_LEN + 4]; + char currentSeparator = ' '; + for (Int32 i = 0; i < numberRoles; i++) + { + const SystemRolesStruct &roleDefinition = systemRoles[i]; + if (!includeSpecialAuths && roleDefinition.isSpecialAuth) + continue; + + // str_sprintf does not support the %c format + sprintf(roleName, "%c%c%s%c", + currentSeparator, delimiter, roleDefinition.roleName, delimiter); + str_cpy_all(pRoles, roleName, sizeof(roleName)-1); // don't copy null terminator + currentSeparator = separator; + pRoles = pRoles + strlen(roleName); + } + + pRoles = '\0'; // null terminate string + pRoles = generatedRoleList; + actualLen = strlen(pRoles); + if (actualLen > maxLen) + return FEBUFTOOSMALL; + + str_cpy_all(roleList, pRoles, strlen(pRoles)); + roleList[strlen(pRoles)] = 0; // null terminate string + return FEOK; +} + http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/ComUser.h ---------------------------------------------------------------------- diff --git a/core/sql/common/ComUser.h b/core/sql/common/ComUser.h index d5f5c2e..ea00c88 100644 --- a/core/sql/common/ComUser.h +++ b/core/sql/common/ComUser.h @@ -90,6 +90,12 @@ class ComUser static Int16 getAuthIDFromAuthName (const char * authName, Int32 & authID); + static Int32 getRoleList (char *roleList, + Int32 &actualLen, + const Int32 maxLen, + const char delimiter = '\'', + const char separator =',', + const bool includeSpecialAuths = false); private: // default constructor ComUser (); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/NAString.cpp ---------------------------------------------------------------------- diff --git a/core/sql/common/NAString.cpp b/core/sql/common/NAString.cpp index 8de31fc..3b9830e 100644 --- a/core/sql/common/NAString.cpp +++ b/core/sql/common/NAString.cpp @@ -280,6 +280,29 @@ NAString Int64ToNAString(Int64 l) return NAString(resultstr); } +NAString &replaceAll(NAString &source, const NAString &searchFor, + const NAString &replaceWith) +{ + size_t indexOfReplace = NA_NPOS; + indexOfReplace = source.index(searchFor); + if (indexOfReplace != NA_NPOS) + { + // Replace all occurences of searchFor with replaceWith. When no + // more occurences are found or end of string is reached, index() + // will return NA_NPOS. + while (indexOfReplace != NA_NPOS) + { + source.replace(indexOfReplace, searchFor.length(), + replaceWith); + // Find index of next occurence to replace. + indexOfReplace = + source.index(searchFor, indexOfReplace + replaceWith.length()); + } + } + + return source; +} + // --------------------------------------------------------------------- // Hash function for NAString types in NAKeyLookup // --------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/NAString.h ---------------------------------------------------------------------- diff --git a/core/sql/common/NAString.h b/core/sql/common/NAString.h index d87cf42..10fd288 100644 --- a/core/sql/common/NAString.h +++ b/core/sql/common/NAString.h @@ -160,6 +160,9 @@ void RemoveTrailingZeros(NAString &ns); NAString Latin1StrToUTF8(const NAString & latin1Str, NAMemory * heap = NULL); +NAString &replaceAll(NAString &source, const NAString &searchFor, + const NAString &replaceWith); + // See notes at NAString.cpp specialSQL_TEXT[]. // http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/NAUserId.h ---------------------------------------------------------------------- diff --git a/core/sql/common/NAUserId.h b/core/sql/common/NAUserId.h index 992c2c3..46de6bc 100644 --- a/core/sql/common/NAUserId.h +++ b/core/sql/common/NAUserId.h @@ -42,23 +42,28 @@ #define MAX_USERNAME_LEN 128 #define MAX_AUTHNAME_LEN 128 #define MAX_AUTHID_AS_STRING_LEN 20 + #define MIN_USERID 33333 #define MAX_USERID 999999 #define MIN_ROLEID 1000000 -#define MAX_ROLEID 1490000 +#define MAX_ROLEID_RANGE1 1490000 +#define MAX_ROLEID 1500000 #define NA_UserId Int32 #define NA_AuthID Int32 #define NA_UserIdDefault 0 -// Defines for special users -#define SYSTEM_AUTH_NAME "_SYSTEM" -#define DB__ROOT "DB__ROOT" - // Defines for special roles +// For new system roles, add a define and include it in the +// systemRoles constant #define PUBLIC_AUTH_NAME "PUBLIC" #define DB__HIVEROLE "DB__HIVEROLE" #define DB__HBASEROLE "DB__HBASEROLE" #define DB__ROOTROLE "DB__ROOTROLE" +#define DB__LIBMGRROLE "DB__LIBMGRROLE" + +// Defines for special users +#define SYSTEM_AUTH_NAME "_SYSTEM" +#define DB__ROOT "DB__ROOT" #define SUPER_USER_LIT "33333" @@ -71,5 +76,22 @@ #define HIVE_ROLE_ID 1490000 #define HBASE_ROLE_ID 1490001 +struct SystemRolesStruct +{ + const char *roleName; + bool isSpecialAuth; + int32_t roleID; +}; + +static const SystemRolesStruct systemRoles[] +{ { DB__HIVEROLE, false, HIVE_ROLE_ID }, + { DB__HBASEROLE, false, HBASE_ROLE_ID }, + { DB__ROOTROLE, false, ROOT_ROLE_ID }, + { DB__LIBMGRROLE, false, NA_UserIdDefault }, + { PUBLIC_AUTH_NAME, true, PUBLIC_USER }, + { SYSTEM_AUTH_NAME, true, SYSTEM_USER } }; + +#define NUMBER_SPECIAL_SYSTEM_ROLES 2; + #endif /* NAUSERID_H*/ http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/common/OperTypeEnum.h ---------------------------------------------------------------------- diff --git a/core/sql/common/OperTypeEnum.h b/core/sql/common/OperTypeEnum.h index 12cc0cf..30b4fa5 100644 --- a/core/sql/common/OperTypeEnum.h +++ b/core/sql/common/OperTypeEnum.h @@ -857,6 +857,7 @@ enum OperatorTypeEnum { DDL_ALTER_TABLE_TOGGLE_ONLINE, DDL_ALTER_TABLE_NAMESPACE, DDL_ALTER_TABLE_ALTER_COLUMN_DATATYPE, + DDL_ALTER_TABLE_ALTER_COLUMN_RENAME, DDL_ALTER_TABLE_ALTER_COLUMN_DEFAULT_VALUE, DDL_ALTER_TABLE_ALTER_COLUMN_SET_SG_OPTION, DDL_ALTER_TABLE_ALTER_HBASE_OPTIONS, http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/executor/ExExeUtilLoad.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExExeUtilLoad.cpp b/core/sql/executor/ExExeUtilLoad.cpp index 1db4bee..cc481a2 100644 --- a/core/sql/executor/ExExeUtilLoad.cpp +++ b/core/sql/executor/ExExeUtilLoad.cpp @@ -2980,7 +2980,8 @@ short ExExeUtilLobExtractTcb::work() LOB_CLI_SELECT_UNIQUE, lobNumList, lobTypList, - lobLocList,0); + lobLocList,lobTdb().getLobHdfsServer(), + lobTdb().getLobHdfsPort(),0); if (cliRC < 0) { getDiagsArea()->mergeAfter(diags); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/executor/ExHbaseAccess.h ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExHbaseAccess.h b/core/sql/executor/ExHbaseAccess.h index 1c0208e..ae32a1c 100644 --- a/core/sql/executor/ExHbaseAccess.h +++ b/core/sql/executor/ExHbaseAccess.h @@ -205,6 +205,9 @@ protected: inline ex_expr *mergeInsertExpr() const { return hbaseAccessTdb().mergeInsertExpr_; } + inline ex_expr *lobDelExpr() const + { return hbaseAccessTdb().mergeInsertExpr_; } + inline ex_expr *mergeInsertRowIdExpr() const { return hbaseAccessTdb().mergeInsertRowIdExpr_; } http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/executor/ExHbaseIUD.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/ExHbaseIUD.cpp b/core/sql/executor/ExHbaseIUD.cpp index 522c741..296f6c2 100644 --- a/core/sql/executor/ExHbaseIUD.cpp +++ b/core/sql/executor/ExHbaseIUD.cpp @@ -1853,6 +1853,7 @@ ExWorkProcRetcode ExHbaseUMDtrafUniqueTaskTcb::work(short &rc) step_ = HANDLE_ERROR; else if ((tcb_->hbaseAccessTdb().getAccessType() == ComTdbHbaseAccess::DELETE_) && (! tcb_->scanExpr()) && + (! tcb_->lobDelExpr()) && (NOT tcb_->hbaseAccessTdb().returnRow())) step_ = DELETE_ROW; else @@ -2243,7 +2244,19 @@ ExWorkProcRetcode ExHbaseUMDtrafUniqueTaskTcb::work(short &rc) step_ = HANDLE_ERROR; break; } - + + // delete entries from LOB desc table, if needed + if (tcb_->lobDelExpr()) + { + ex_expr::exp_return_type exprRetCode = + tcb_->lobDelExpr()->eval(pentry_down->getAtp(), tcb_->workAtp_); + if (exprRetCode == ex_expr::EXPR_ERROR) + { + step_ = HANDLE_ERROR; + break; + } + } + if (tcb_->getHbaseAccessStats()) tcb_->getHbaseAccessStats()->incUsedRows(); @@ -3006,6 +3019,18 @@ ExWorkProcRetcode ExHbaseUMDtrafSubsetTaskTcb::work(short &rc) break; } + // delete entries from LOB desc table, if needed + if (tcb_->lobDelExpr()) + { + ex_expr::exp_return_type exprRetCode = + tcb_->lobDelExpr()->eval(pentry_down->getAtp(), tcb_->workAtp_); + if (exprRetCode == ex_expr::EXPR_ERROR) + { + step_ = HANDLE_ERROR; + break; + } + } + if (tcb_->getHbaseAccessStats()) tcb_->getHbaseAccessStats()->incUsedRows(); http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/executor/hiveHook.cpp ---------------------------------------------------------------------- diff --git a/core/sql/executor/hiveHook.cpp b/core/sql/executor/hiveHook.cpp index 523bf0a..a83ead4 100644 --- a/core/sql/executor/hiveHook.cpp +++ b/core/sql/executor/hiveHook.cpp @@ -591,7 +591,7 @@ struct hive_bkey_desc* populateBucketingCols(HiveMetaData *md, Int32 sdID, // this is the last bucket col } NAText nameStr = tblStr->substr(pos, foundB-pos); - pos = foundB; + pos = foundB + 1; hive_bkey_desc* newBkey = new (CmpCommon::contextHeap()) struct hive_bkey_desc(nameStr.c_str(), http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/681cad66/core/sql/exp/ExpHbaseInterface.h ---------------------------------------------------------------------- diff --git a/core/sql/exp/ExpHbaseInterface.h b/core/sql/exp/ExpHbaseInterface.h index 53f2143..aeccee4 100644 --- a/core/sql/exp/ExpHbaseInterface.h +++ b/core/sql/exp/ExpHbaseInterface.h @@ -42,7 +42,6 @@ #include <iostream> -#include <boost/lexical_cast.hpp> #include <protocol/TBinaryProtocol.h> #include <transport/TSocket.h> #include <transport/TTransportUtils.h>
