[GitHub] incubator-trafodion pull request #1240: [TRAFODION-2740]JDBC extract LOB con...

2017-09-21 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:


https://github.com/apache/incubator-trafodion/pull/1240#discussion_r140335560
  
--- Diff: 
dcs/src/test/jdbc_test/src/test/java/org/trafodion/jdbc_test/TestForeignKey.java
 ---
@@ -74,12 +74,15 @@
public static void doTestSuiteSetup() throws Exception {
try{
_conn = DriverManager.getConnection(Utils.url, 
Utils.usr, Utils.pwd);
-   Statement stmt = _conn.createStatement();
-   
-   stmt.execute(strCreatePKTABLE1Query);
-   stmt.execute(strCreatePKTABLE2Query);
-   stmt.execute(strCreateFKTABLE1Query);
-   stmt.execute(strCreateFKTABLE2Query);
+try (
--- End diff --

Thanks for the change Weiqing. Learnt something new related to 
try-with-resource-statement from your change - it does reduce the earlier code 
change planned - thanks.

Could you please also take care of replacing DriverMagager.getConnection 
calls from *Blob*, *Clob*, TestGetIndexInfo and this file ? This would take 
care random non-existent schema errors seen.


---


[GitHub] incubator-trafodion pull request #1122: [TRAFODION-2646]mxosrvr change to AV...

2017-06-24 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:


https://github.com/apache/incubator-trafodion/pull/1122#discussion_r123890678
  
--- Diff: core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp ---
@@ -1680,47 +1683,49 @@ void __cdecl SRVR::ASTimerExpired(CEE_tag_def 
timer_tag)
if( tkn == NULL )
goto HandleNoTokens;
 
-   if( stricmp(tkn, "CONNECTING") && stricmp(tkn, 
"CONNECT_FAILED") && stricmp(tkn, "CONNECT_REJECTED") )  // Not in CONNECTING 
state
-   {
-   timeout = JULIANTIMESTAMP();
-   prevDialogueId = 0;
-   }
-   else
-   {
-   strcpy( state, tkn );
+enum {REG_CONNECTING, REG_CONNECT_FAILED, 
REG_CONNECT_REJECTED, REG_CONNECT_OTHER} reg_connection_state;
 
-   // Skip second token - Timestamp
-   tkn = strtok(NULL, ":");
-   if( tkn == NULL )
-   goto HandleNoTokens;
+// use numeric to represent the state since the state will 
used again,
+// and we don't want compare the string twice
+if (stricmp(tkn, "CONNECTING") == 0) {
+reg_connection_state = REG_CONNECTING;
+}
+else if (stricmp(tkn, "CONNECT_FAILED") == 0) {
+reg_connection_state = REG_CONNECT_FAILED;
+}
+else if (stricmp(tkn, "CONNECT_REJECTED") == 0) {
+reg_connection_state = REG_CONNECT_REJECTED;
+}
+else {
+reg_connection_state = REG_CONNECT_OTHER;
+prevDialogueId = 0;
+}
 
-   // Third token is dialogue ID
-   tkn = strtok(NULL, ":");
-   if( tkn == NULL )
-   goto HandleNoTokens;
+if (reg_connection_state != REG_CONNECT_OTHER) {
+strcpy(state, tkn);
 
-   currDialogueId = atoi(tkn);
+// Skip second token - Timestamp
+tkn = strtok(NULL, ":");
+if (tkn == NULL)
+goto HandleNoTokens;
 
-   if( prevDialogueId == 0 || 
prevDialogueId != currDialogueId )
-   {
-   prevDialogueId = currDialogueId;
-   timeout = JULIANTIMESTAMP();
-   }
+// Third token is dialogue ID
+tkn = strtok(NULL, ":");
+if (tkn == NULL)
+goto HandleNoTokens;
+
+currDialogueId = atoi(tkn);
+prevDialogueId = currDialogueId;
+
--- End diff --

Thanks for confirming. +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #1135: [TRAFODION-2659]update win ODBC/ODB ...

2017-06-22 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:


https://github.com/apache/incubator-trafodion/pull/1135#discussion_r123645766
  
--- Diff: win-odbc64/odbcclient/drvr35msg/DrvMsg35.rc ---
@@ -71,7 +71,7 @@ BEGIN
 VALUE "FileDescription", "TRAF ODBC Client Msg DLL"
 VALUE "FileVersion", "1.3.0.0"
--- End diff --

FileVersion and ProductVersion to be updated to 2.2 in this file too ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #1122: [TRAFODION-2646]mxosrvr change to AV...

2017-06-22 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:


https://github.com/apache/incubator-trafodion/pull/1122#discussion_r123644367
  
--- Diff: core/conn/odbc/src/odbc/nsksrvr/SrvrConnect.cpp ---
@@ -1680,47 +1683,49 @@ void __cdecl SRVR::ASTimerExpired(CEE_tag_def 
timer_tag)
if( tkn == NULL )
goto HandleNoTokens;
 
-   if( stricmp(tkn, "CONNECTING") && stricmp(tkn, 
"CONNECT_FAILED") && stricmp(tkn, "CONNECT_REJECTED") )  // Not in CONNECTING 
state
-   {
-   timeout = JULIANTIMESTAMP();
-   prevDialogueId = 0;
-   }
-   else
-   {
-   strcpy( state, tkn );
+enum {REG_CONNECTING, REG_CONNECT_FAILED, 
REG_CONNECT_REJECTED, REG_CONNECT_OTHER} reg_connection_state;
 
-   // Skip second token - Timestamp
-   tkn = strtok(NULL, ":");
-   if( tkn == NULL )
-   goto HandleNoTokens;
+// use numeric to represent the state since the state will 
used again,
+// and we don't want compare the string twice
+if (stricmp(tkn, "CONNECTING") == 0) {
+reg_connection_state = REG_CONNECTING;
+}
+else if (stricmp(tkn, "CONNECT_FAILED") == 0) {
+reg_connection_state = REG_CONNECT_FAILED;
+}
+else if (stricmp(tkn, "CONNECT_REJECTED") == 0) {
+reg_connection_state = REG_CONNECT_REJECTED;
+}
+else {
+reg_connection_state = REG_CONNECT_OTHER;
+prevDialogueId = 0;
+}
 
-   // Third token is dialogue ID
-   tkn = strtok(NULL, ":");
-   if( tkn == NULL )
-   goto HandleNoTokens;
+if (reg_connection_state != REG_CONNECT_OTHER) {
+strcpy(state, tkn);
 
-   currDialogueId = atoi(tkn);
+// Skip second token - Timestamp
+tkn = strtok(NULL, ":");
+if (tkn == NULL)
+goto HandleNoTokens;
 
-   if( prevDialogueId == 0 || 
prevDialogueId != currDialogueId )
-   {
-   prevDialogueId = currDialogueId;
-   timeout = JULIANTIMESTAMP();
-   }
+// Third token is dialogue ID
+tkn = strtok(NULL, ":");
+if (tkn == NULL)
+goto HandleNoTokens;
+
+currDialogueId = atoi(tkn);
+prevDialogueId = currDialogueId;
+
--- End diff --

Sorry for the delay Weiqing.

We don't seem to be using prevDialogueId now ? Earlier this was introduced 
for problems seen in doing multiple connects/disconnects via endurance test. If 
similar tests have been run to test this change then please go ahead and merge.
https://issues.apache.org/jira/browse/TRAFODION-156



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #666: [TRAFODION-1868] Compatibility with g...

2017-04-10 Thread arvind-narain
Github user arvind-narain closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/666


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #1036: [TRAFODION-2554]Convert into Maven p...

2017-03-30 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:


https://github.com/apache/incubator-trafodion/pull/1036#discussion_r109077021
  
--- Diff: core/conn/jdbc_type2/Makefile ---
@@ -57,7 +57,15 @@ T2_OBJS  = $(OUTDIR)/CommonDiags.o \
$(OUTDIR)/ResStatisticsStatement.o \
$(OUTDIR)/Vproc.o \
$(OUTDIR)/type2version.o
-
+CSES := org.trafodion.jdbc.t2.JdbcDebug \
+   org.trafodion.jdbc.t2.DataWrapper \
+   org.trafodion.jdbc.t2.SQLMXCallableStatement \
+   org.trafodion.jdbc.t2.SQLMXConnection \
+   org.trafodion.jdbc.t2.SQLMXDatabaseMetaData \
+   org.trafodion.jdbc.t2.T2Driver \
+   org.trafodion.jdbc.t2.SQLMXPreparedStatement \
+   org.trafodion.jdbc.t2.SQLMXResultSet \
+   org.trafodion.jdbc.t2.SQLMXStatement
--- End diff --

Would this change be needed if we touch the package name in T2 source to 
include apache ? Should we change the package name (org.apache.trafodion...) in 
the source and the file layout  to make it consistent ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #951: [TRAFODION-2314] MXOSRVR sometimes ex...

2017-02-09 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/951

[TRAFODION-2314] MXOSRVR sometimes exits abnormally with NAMutex assert

Fixes as suggested by @selvaganesang and @sandhyasun 

We were hitting the code to make heap thread safe repeatedly while running
jdbc and phoenix tests.

PROCESS_LOB flag was being set incorrectly in some cases.

Unlocking a mutex owned by a different thread lead to the assertion.

This could also result in heap corruption.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion namutex-core

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/951.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #951


commit 293dbd5736d43ebdffc67127fc57d6548bf34074
Author: Arvind Narain <narain.arv...@gmail.com>
Date:   2017-02-10T00:46:25Z

[TRAFODION-2314] MXOSRVR sometimes exits abnormally with NAMutex assert

Fixes as suggested by Selva and Sandhya.

We were hitting the code to make heap thread safe repeatedly while running
jdbc and phoenix tests.

PROCESS_LOB flag was being set incorrectly in some cases.

Unlocking a mutex owned by a different thread lead to the assertion.

This could also result in heap corruption.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #898: [TRAFODION-2420] RMS enhancements

2017-01-04 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/898#discussion_r94629541
  
--- Diff: core/sql/executor/ExStats.cpp ---
@@ -3678,9 +3292,8 @@ void 
ExPartitionAccessStats::getVariableStatsInfo(char * dataBuffer,
  "AnsiName: %s PhysName: %s BuffersSize: %u BuffersSent: %u 
BuffersRcvd: %u NumMessages: %Ld MsgBytes: %Ld StatsBytes: %Ld MsgBytesSent: 
%Ld MsgBytesRcvd: %Ld ",
  ansiName_, fileName_,
  bufferStats()->sendBufferSize(), 
bufferStats()->sentBuffers().entryCnt(), 
bufferStats()->recdBuffers().entryCnt(), 
- fsDp2MsgsStats()->getNumMessages(),
- fsDp2MsgsStats()->getMessageBytes(),
- fsDp2MsgsStats()->getStatsBytes(),
+ exeSEStats()->getNumIOCalls(),
+ exeSEStats()->getNumIOBytes(),
--- End diff --

Thanks Selva. Noticed that we have 10 format specifiers (including 
StatsBytes) and only 9 arguments hence the question. Line 4522 has similar 
logic ( though it's sprintf). Maybe I'm missing something here - will check on 
the code again as well as str_sprintf.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #898: [TRAFODION-2420] RMS enhancements

2017-01-03 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/898#discussion_r94497176
  
--- Diff: core/sql/executor/ExStats.cpp ---
@@ -3678,9 +3292,8 @@ void 
ExPartitionAccessStats::getVariableStatsInfo(char * dataBuffer,
  "AnsiName: %s PhysName: %s BuffersSize: %u BuffersSent: %u 
BuffersRcvd: %u NumMessages: %Ld MsgBytes: %Ld StatsBytes: %Ld MsgBytesSent: 
%Ld MsgBytesRcvd: %Ld ",
  ansiName_, fileName_,
  bufferStats()->sendBufferSize(), 
bufferStats()->sentBuffers().entryCnt(), 
bufferStats()->recdBuffers().entryCnt(), 
- fsDp2MsgsStats()->getNumMessages(),
- fsDp2MsgsStats()->getMessageBytes(),
- fsDp2MsgsStats()->getStatsBytes(),
+ exeSEStats()->getNumIOCalls(),
+ exeSEStats()->getNumIOBytes(),
--- End diff --

0 for StatsBytes ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #891: [TRAFODION-2411] Conn aborted when co...

2016-12-22 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/891

[TRAFODION-2411] Conn aborted when connecting with a reregisterd user

APIs used to clear compiler caches had changed, leading to syntax errors.

Modified the following -
DELETE ALL FROM TABLE(QUERYCACHE());
to
DELETE ALL FROM TABLE(QUERYCACHE('ALL','LOCAL'));


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion clearcache

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/891.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #891


commit 35e928be46167deb381faa5ad0318e99a2433c0a
Author: Arvind Narain <arvi...@apache.org>
Date:   2016-12-23T00:03:12Z

[TRAFODION-2411] Conn aborted when connecting with a reregisterd user

APIs used to clear compiler caches had changed, leading to syntax
errors.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #799: [TRAFODION-2308]JDBC T4 support read ...

2016-11-08 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/799#discussion_r87062988
  
--- Diff: core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp ---
@@ -6378,6 +6378,124 @@ odbc_SQLSrvr_FetchPerf_sme_(
 
 } // odbc_SQLSrvr_FetchPerf_sme_()
 
+extern "C" void
+odbc_SQLSrvr_ExtractLob_sme_(
+/* In*/ CEE_tag_def objtag_
+  , /* In*/ const CEE_handle_def *call_id_
+  , /* Out   */ odbc_SQLsrvr_ExtractLob_exc_ *exception_
+  , /* In*/ IDL_long extractLobAPI
+  , /* In*/ IDL_string lobHandle
+  , /* Out   */ IDL_long_long 
+  , /* Out   */ IDL_char *& lobDataValue
+  )
+{
+char LobExtractQuery[1000];
+char RequestError[200] = {0};
+SRVR_STMT_HDL  *QryLobExtractSrvrStmt = NULL;
+
+if ((QryLobExtractSrvrStmt = getSrvrStmt("", TRUE)) == NULL)
+{
+SendEventMsg(MSG_MEMORY_ALLOCATION_ERROR,
+ EVENTLOG_ERROR_TYPE,
+ srvrGlobal->nskProcessInfo.processId,
+ ODBCMX_SERVER,
+ srvrGlobal->srvrObjRef,
+ 2,
+ "EXTRACT LOB APIs",
+ "Allocate Statement");
+exception_->exception_nr = odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+exception_->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_UNABLE_TO_ALLOCATE_SQL_STMT;
+}
+
+snprintf(LobExtractQuery, sizeof(LobExtractQuery), "EXTRACT 
LOBLENGTH(LOB'%s') LOCATION %Ld", lobHandle, (Int64));
+
+try
+{
+
SQL_EXEC_SetParserFlagsForExSqlComp_Internal(INTERNAL_QUERY_FROM_EXEUTIL);
+
+short retcode = QryLobExtractSrvrStmt->ExecDirect(NULL, 
LobExtractQuery, EXTERNAL_STMT, TYPE_CALL, SQL_ASYNC_ENABLE_OFF, 0);
+
--- End diff --

You are right - we are not directly accessing the metadata here - we can 
skip setting the parser flag.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #799: [TRAFODION-2308]JDBC T4 support read ...

2016-11-03 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/799#discussion_r86427334
  
--- Diff: core/conn/odbc/src/odbc/nsksrvr/Interface/odbcs_srvr_res.cpp ---
@@ -642,6 +642,41 @@ odbc_SQLSrvr_EndTransaction_ts_res_(
 
 } // odbc_SQLSrvr_EndTransaction_ts_res_()
 
+CEE_status
+odbc_SQLSrvr_ExtractLob_ts_res_(
+/* In   */ CEE_tag_defobjtag_
+  , /* In   */ const CEE_handle_def *call_id_
+  , /* In   */ const struct odbc_SQLsrvr_ExtractLob_exc_ *exception_
+  , /* In   */ IDL_long_long  lobDataLen
+  , /* In   */ IDL_char   *lobDataValue
+  )
+{
+CInterface* pnode = (CInterface *)objtag_;
+
+CEE_status sts = CEE_SUCCESS;
+
+IDL_short error;
+CEERCV_IOMessage_reply_seq_ reply;
+
+char * buffer = NULL;
+UInt32 message_length = 0;
+
+odbc_SQLsrvr_ExtractLob_param_res_(
--- End diff --

If odbc_SQLsrvr_ExtractLob_param_res_ does return error ( CEE_ALLOCFAIL - 
previous comment ) then store the return status in sts here and check for the 
same.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #799: [TRAFODION-2308]JDBC T4 support read ...

2016-11-03 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/799#discussion_r86425065
  
--- Diff: core/conn/odbc/src/odbc/nsksrvr/Interface/marshalingsrvr_srvr.cpp 
---
@@ -2300,3 +2300,89 @@ MxoSrvr_ValidateToken_param_res_(
return CEE_SUCCESS;
 
 } // MxoSrvr_ValidateToken_param_res_()
+
+CEE_status
+odbc_SQLsrvr_ExtractLob_param_res_(
+CInterface * pnode
+  , char* 
+  , UInt32& message_length
+  , const struct odbc_SQLsrvr_ExtractLob_exc_ *exception_
+  , IDL_long_long lobDataLen
+  , IDL_char * lobDataValue
+)
+{
+IDL_long wlength = 0;
+char* curptr;
+
+IDL_long exceptionLength = 0;
+wlength += sizeof(HEADER);
+
+// calculate length of the buffer for each parameter
+
+// length of odbc_SQLsrvr_ExtractLob_exc_
+wlength += sizeof(exception_->exception_nr);
+wlength += sizeof(exception_->exception_detail);
+
+switch(exception_->exception_nr)
+{
+case odbc_SQLsrvr_ExtractLob_ParamError_exn_:
+wlength += sizeof(exceptionLength);
+if (exception_->u.ParamError.ParamDesc != NULL)
+{
+exceptionLength = 
strlen(exception_->u.ParamError.ParamDesc) + 1;
+wlength += exceptionLength;
+}
+break;
+case odbc_SQLSrvr_ExtractLob_SQLError_exn_:
+ERROR_DESC_LIST_length((ERROR_DESC_LIST_def 
*)_->u.SQLError.errorList, wlength);
+break;
+case odbc_SQLsrvr_ExtractLob_InvalidConnection_exn_:
+case odbc_SQLSrvr_ExtractLob_SQLInvalidhandle_exn_:
+break;
+default:
+break;
+}
+
+// length of IDL_long  LOB len
+wlength += sizeof(IDL_long);
+if (lobDataValue != NULL)
+{
+wlength += lobDataLen;
+}
+wlength += lobDataLen;
+
+// update the length of message
+message_length = wlength;
+
+buffer = pnode->w_allocate(message_length);
--- End diff --

You may want to return CEE_ALLOCFAIL if buffer is NULL.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #799: [TRAFODION-2308]JDBC T4 support read ...

2016-11-03 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/799#discussion_r86429803
  
--- Diff: core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp ---
@@ -6378,6 +6378,124 @@ odbc_SQLSrvr_FetchPerf_sme_(
 
 } // odbc_SQLSrvr_FetchPerf_sme_()
 
+extern "C" void
+odbc_SQLSrvr_ExtractLob_sme_(
+/* In*/ CEE_tag_def objtag_
+  , /* In*/ const CEE_handle_def *call_id_
+  , /* Out   */ odbc_SQLsrvr_ExtractLob_exc_ *exception_
+  , /* In*/ IDL_long extractLobAPI
+  , /* In*/ IDL_string lobHandle
+  , /* Out   */ IDL_long_long 
+  , /* Out   */ IDL_char *& lobDataValue
+  )
+{
+char LobExtractQuery[1000];
+char RequestError[200] = {0};
+SRVR_STMT_HDL  *QryLobExtractSrvrStmt = NULL;
+
+if ((QryLobExtractSrvrStmt = getSrvrStmt("", TRUE)) == NULL)
+{
+SendEventMsg(MSG_MEMORY_ALLOCATION_ERROR,
+ EVENTLOG_ERROR_TYPE,
+ srvrGlobal->nskProcessInfo.processId,
+ ODBCMX_SERVER,
+ srvrGlobal->srvrObjRef,
+ 2,
+ "EXTRACT LOB APIs",
+ "Allocate Statement");
+exception_->exception_nr = odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+exception_->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_UNABLE_TO_ALLOCATE_SQL_STMT;
+}
+
+snprintf(LobExtractQuery, sizeof(LobExtractQuery), "EXTRACT 
LOBLENGTH(LOB'%s') LOCATION %Ld", lobHandle, (Int64));
+
+try
+{
+
SQL_EXEC_SetParserFlagsForExSqlComp_Internal(INTERNAL_QUERY_FROM_EXEUTIL);
+
+short retcode = QryLobExtractSrvrStmt->ExecDirect(NULL, 
LobExtractQuery, EXTERNAL_STMT, TYPE_CALL, SQL_ASYNC_ENABLE_OFF, 0);
+
+if (retcode == SQL_ERROR)
+{
+ERROR_DESC_def *p_buffer = 
QryLobExtractSrvrStmt->sqlError.errorList._buffer; strncpy(RequestError, 
p_buffer->errorText, sizeof(RequestError) - 1);
+
+SendEventMsg(MSG_SQL_ERROR,
+ EVENTLOG_ERROR_TYPE,
+ srvrGlobal->nskProcessInfo.processId,
+ ODBCMX_SERVER,
+ srvrGlobal->srvrObjRef,
+ 2,
+ p_buffer->sqlcode,
+ RequestError);
+
+exception_->exception_nr = 
odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+exception_->u.SQLError.errorList._length = 
QryLobExtractSrvrStmt->sqlError.errorList._length;
+exception_->u.SQLError.errorList._buffer = 
QryLobExtractSrvrStmt->sqlError.errorList._buffer;
+exception_->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_EXECUTE_FAILED;
+}
+}
+catch (...)
+{
+SendEventMsg(MSG_PROGRAMMING_ERROR,
+EVENTLOG_ERROR_TYPE,
+srvrGlobal->nskProcessInfo.processId,
+ODBCMX_SERVER,
+srvrGlobal->srvrObjRef,
+1,
+"Exception in executing EXTRACT LOBLENGTH");
+
+exception_->exception_nr = odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+exception_->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_EXECDIRECT_FAILED;
+}
+
+lobDataValue = new IDL_char(lobDataLen + 1);
+memset(lobDataValue, 0, lobDataLen + 1);
+
+memset(LobExtractQuery, 0, sizeof(LobExtractQuery));
+
+snprintf(LobExtractQuery, sizeof(LobExtractQuery), "EXTRACT 
LOBTOBUFFER(LOB'%s', LOCATION %Ld, SIZE %Ld)", lobHandle, (Int64)lobDataValue, 
);
+
+if (exception_->exception_nr == 0)
+{
+try
+{
+short retcode = QryLobExtractSrvrStmt->ExecDirect(NULL, 
LobExtractQuery, EXTERNAL_STMT, TYPE_CALL, SQL_ASYNC_ENABLE_OFF, 0);
+if (retcode == SQL_ERROR)
+{
+ERROR_DESC_def *p_buffer = 
QryLobExtractSrvrStmt->sqlError.errorList._buffer;
+strncpy(RequestError, p_buffer->errorText, 
sizeof(RequestError) - 1);
+
+SendEventMsg(MSG_SQL_ERROR,
+EVENTLOG_ERROR_TYPE,
+srvrGlobal->nskProcessInfo.processId,
+ ODBCMX_SERVER,
+ srvrGlobal->srvrObjRef,
+ 2,
+ p_buffer->sqlcode,
+ RequestError);
+
+exception_->exception_nr = 
odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+  

[GitHub] incubator-trafodion pull request #799: [TRAFODION-2308]JDBC T4 support read ...

2016-11-03 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/799#discussion_r86428414
  
--- Diff: core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp ---
@@ -6378,6 +6378,124 @@ odbc_SQLSrvr_FetchPerf_sme_(
 
 } // odbc_SQLSrvr_FetchPerf_sme_()
 
+extern "C" void
+odbc_SQLSrvr_ExtractLob_sme_(
+/* In*/ CEE_tag_def objtag_
+  , /* In*/ const CEE_handle_def *call_id_
+  , /* Out   */ odbc_SQLsrvr_ExtractLob_exc_ *exception_
+  , /* In*/ IDL_long extractLobAPI
+  , /* In*/ IDL_string lobHandle
+  , /* Out   */ IDL_long_long 
+  , /* Out   */ IDL_char *& lobDataValue
+  )
+{
+char LobExtractQuery[1000];
+char RequestError[200] = {0};
+SRVR_STMT_HDL  *QryLobExtractSrvrStmt = NULL;
+
+if ((QryLobExtractSrvrStmt = getSrvrStmt("", TRUE)) == NULL)
--- End diff --

Could the corresponding statements for extract be prepared once with 
parameters and then executed ? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #799: [TRAFODION-2308]JDBC T4 support read ...

2016-11-03 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/799#discussion_r86430179
  
--- Diff: core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp ---
@@ -6378,6 +6378,124 @@ odbc_SQLSrvr_FetchPerf_sme_(
 
 } // odbc_SQLSrvr_FetchPerf_sme_()
 
+extern "C" void
+odbc_SQLSrvr_ExtractLob_sme_(
+/* In*/ CEE_tag_def objtag_
+  , /* In*/ const CEE_handle_def *call_id_
+  , /* Out   */ odbc_SQLsrvr_ExtractLob_exc_ *exception_
+  , /* In*/ IDL_long extractLobAPI
+  , /* In*/ IDL_string lobHandle
+  , /* Out   */ IDL_long_long 
+  , /* Out   */ IDL_char *& lobDataValue
+  )
+{
+char LobExtractQuery[1000];
+char RequestError[200] = {0};
+SRVR_STMT_HDL  *QryLobExtractSrvrStmt = NULL;
+
+if ((QryLobExtractSrvrStmt = getSrvrStmt("", TRUE)) == NULL)
+{
+SendEventMsg(MSG_MEMORY_ALLOCATION_ERROR,
+ EVENTLOG_ERROR_TYPE,
+ srvrGlobal->nskProcessInfo.processId,
+ ODBCMX_SERVER,
+ srvrGlobal->srvrObjRef,
+ 2,
+ "EXTRACT LOB APIs",
+ "Allocate Statement");
+exception_->exception_nr = odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+exception_->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_UNABLE_TO_ALLOCATE_SQL_STMT;
+}
+
+snprintf(LobExtractQuery, sizeof(LobExtractQuery), "EXTRACT 
LOBLENGTH(LOB'%s') LOCATION %Ld", lobHandle, (Int64));
+
+try
+{
+
SQL_EXEC_SetParserFlagsForExSqlComp_Internal(INTERNAL_QUERY_FROM_EXEUTIL);
+
+short retcode = QryLobExtractSrvrStmt->ExecDirect(NULL, 
LobExtractQuery, EXTERNAL_STMT, TYPE_CALL, SQL_ASYNC_ENABLE_OFF, 0);
+
--- End diff --

Do please first get the parser flag, save it and after each ExecDirect set 
it back to the saved parser flag.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #799: [TRAFODION-2308]JDBC T4 support read ...

2016-11-03 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/799#discussion_r86429324
  
--- Diff: core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp ---
@@ -6378,6 +6378,124 @@ odbc_SQLSrvr_FetchPerf_sme_(
 
 } // odbc_SQLSrvr_FetchPerf_sme_()
 
+extern "C" void
+odbc_SQLSrvr_ExtractLob_sme_(
+/* In*/ CEE_tag_def objtag_
+  , /* In*/ const CEE_handle_def *call_id_
+  , /* Out   */ odbc_SQLsrvr_ExtractLob_exc_ *exception_
+  , /* In*/ IDL_long extractLobAPI
+  , /* In*/ IDL_string lobHandle
+  , /* Out   */ IDL_long_long 
+  , /* Out   */ IDL_char *& lobDataValue
+  )
+{
+char LobExtractQuery[1000];
+char RequestError[200] = {0};
+SRVR_STMT_HDL  *QryLobExtractSrvrStmt = NULL;
+
+if ((QryLobExtractSrvrStmt = getSrvrStmt("", TRUE)) == NULL)
+{
+SendEventMsg(MSG_MEMORY_ALLOCATION_ERROR,
+ EVENTLOG_ERROR_TYPE,
+ srvrGlobal->nskProcessInfo.processId,
+ ODBCMX_SERVER,
+ srvrGlobal->srvrObjRef,
+ 2,
+ "EXTRACT LOB APIs",
+ "Allocate Statement");
+exception_->exception_nr = odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+exception_->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_UNABLE_TO_ALLOCATE_SQL_STMT;
+}
+
+snprintf(LobExtractQuery, sizeof(LobExtractQuery), "EXTRACT 
LOBLENGTH(LOB'%s') LOCATION %Ld", lobHandle, (Int64));
+
+try
+{
+
SQL_EXEC_SetParserFlagsForExSqlComp_Internal(INTERNAL_QUERY_FROM_EXEUTIL);
+
+short retcode = QryLobExtractSrvrStmt->ExecDirect(NULL, 
LobExtractQuery, EXTERNAL_STMT, TYPE_CALL, SQL_ASYNC_ENABLE_OFF, 0);
+
+if (retcode == SQL_ERROR)
+{
+ERROR_DESC_def *p_buffer = 
QryLobExtractSrvrStmt->sqlError.errorList._buffer; strncpy(RequestError, 
p_buffer->errorText, sizeof(RequestError) - 1);
+
+SendEventMsg(MSG_SQL_ERROR,
+ EVENTLOG_ERROR_TYPE,
+ srvrGlobal->nskProcessInfo.processId,
+ ODBCMX_SERVER,
+ srvrGlobal->srvrObjRef,
+ 2,
+ p_buffer->sqlcode,
+ RequestError);
+
+exception_->exception_nr = 
odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+exception_->u.SQLError.errorList._length = 
QryLobExtractSrvrStmt->sqlError.errorList._length;
+exception_->u.SQLError.errorList._buffer = 
QryLobExtractSrvrStmt->sqlError.errorList._buffer;
+exception_->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_EXECUTE_FAILED;
+}
+}
+catch (...)
+{
+SendEventMsg(MSG_PROGRAMMING_ERROR,
+EVENTLOG_ERROR_TYPE,
+srvrGlobal->nskProcessInfo.processId,
+ODBCMX_SERVER,
+srvrGlobal->srvrObjRef,
+1,
+"Exception in executing EXTRACT LOBLENGTH");
+
+exception_->exception_nr = odbc_SQLsrvr_ExtractLob_ParamError_exn_;
+exception_->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_EXECDIRECT_FAILED;
+}
+
--- End diff --

Would you like to check for exception_->exception_nr == 0 here ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #786: [TRAFODION-2313] dcscheck doesn't ret...

2016-10-27 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/786#discussion_r85284227
  
--- Diff: core/sqf/sql/scripts/dcscheck ---
@@ -138,15 +138,15 @@ if ( [ $sq_stat == 0 ] || [ $sq_stat == 1 ] ); then
   fi 
   echo
   if ( [ "$actual_dcsmaster_cnt" '!=' 0 ] && [ "$actual_dcsserver_cnt" 
'!=' 0 ] ); then
-   echo "ls $dcsznode"|$DCS_INSTALL_DIR/bin/dcs zkcli > $dcstmp
--- End diff --

Looks good. I remember there was some issue with a particular version of 
zookeeper where the command line argument to zkcli was not being processed, 
hence the echo approach was used instead. This should work.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #775: [TRAFODION 2295] Supporting SQL_WCHAR...

2016-10-27 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/775#discussion_r85281913
  
--- Diff: core/conn/odbc/src/odbc/nsksrvrcore/srvrothers.cpp ---
@@ -4556,6 +4556,8 @@ odbc_SQLSvc_GetSQLCatalogs_sme_(
  "cast(0 as smallint), cast(0 as 
smallint), cast(3 as smallint), cast(0 as smallint)),"
  "('BIGINT SIGNED', -5, 19, NULL, NULL, 
NULL, 1, 0, 2, 0, 0, 0, 'LARGEINT', NULL, NULL, 'SIGNED LARGEINT', 10, 19, 20, 
-402, NULL, NULL, 0, 0, 3, 0),"
  "('CHAR', 1, 32000, , , 'max 
length', 1, 1, 3, NULL, 0, NULL, 'CHARACTER', NULL, NULL, 'CHARACTER', NULL, 
-1, -1, 1, NULL, NULL, 0, 0, 3, 0),"
+ "('NCHAR', -8, 32000, , , 'max 
length', 1, 1, 3, NULL, 0, NULL, 'WCHAR', NULL, NULL, 'CHARACTER', NULL, -1, 
-1, -8, NULL, NULL, 0, 0, 3, 0),"
+ "('NCHAR VARYING', -9, 32000, , , 
'max length', 1, 1, 3, NULL, 0, NULL, 'WCHAR VARYING', NULL, NULL, 'CHARACTER', 
NULL, -1, -1, -9, NULL, NULL, 0, 0, 3, 0),"
--- End diff --

Changes look good to me. Do check if this should be 'VARCHAR' rather than 
'CHARACTER'


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #783: [TRAFODION-2309] Memory leak observed...

2016-10-25 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/783

[TRAFODION-2309] Memory leak observed in Repository context

Following changes:

1. Use REALLOCSQLMXHDLS() after each execute.
2. Avoid missing stats message in repository context
3. Handle memory leak in reprepare (delete of tmpSqlString)

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion reposleak

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/783.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #783


commit 7f286d27d1a3f46df0ba1cf10e4624399208a50a
Author: Arvind Narain <narain.arv...@gmail.com>
Date:   2016-10-25T22:07:04Z

[TRAFODION-2309] Memory leak observed in Repository context

Following changes:

1. Use REALLOCSQLMXHDLS() after each execute.
2. Avoid missing stats message in repository context
3. Handle memory leak in reprepare (delete of tmpSqlString




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #711: [TRAFODION-1755] - Additional changes...

2016-09-19 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/711

[TRAFODION-1755] - Additional changes to handle error 8887.

Changes in mxosrvr to handle null terminator in explain plan
as needed by the following pull request:

https://github.com/apache/incubator-trafodion/pull/694

Without these changes execution of queries with plans > 50K fail with error 
8887:

*** ERROR[8887] The provided buffer to retrieve generated code or explain 
data
is either null or not big enough. 


You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion expdiag

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/711.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #711






---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #666: [TRAFODION-1868] Compatibility with g...

2016-08-19 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/666

[TRAFODION-1868] Compatibility with gcc 4.8

Thanks to @narendragoyal , @svarnau, @traflm for the changes.

Pending work - 
1) check on QT toolkit - it's available as default on Centos 7
2) Still need to resolve some issue seen with install_local_hadoop during 
development testing - it may be specific to the development environment used.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion comp72

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/666.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #666


commit a6bc50a0dcb8397394faf9d84b8a0d2e6ea252a0
Author: Arvind Narain <arvind.nar...@esgyn.com>
Date:   2016-08-20T00:40:35Z

[TRAFODION-1868] Compatibility with gcc 4.8

Set of changes needed to compile with gcc 4.8.
Thanks to Narendra and Ming for the changes.

commit aa0b3a26cd91078e3c6e43cce7b641081ff45035
Author: Arvind Narain <arvind.nar...@esgyn.com>
Date:   2016-08-20T00:53:23Z

Merge branch 'master' of https://github.com/apache/incubator-trafodion into 
comp72

Conflicts:
core/sqf/conf/install_features




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request #389: [TRAFODION-1897] dcscheck may fail if...

2016-06-07 Thread arvind-narain
Github user arvind-narain closed the pull request at:

https://github.com/apache/incubator-trafodion/pull/389


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1916] dcscheck fails ...

2016-04-22 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/448

[TRAFODION-1916] dcscheck fails with cdh5.4.4 and hbase 1.0.0

Zookeeper jar file will now get installed in $DCS_INSTALL_DIR/lib
as was done before TRAFODION-1828. This is similar to how it's
currently been done for REST subsystem.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion 
trafodion-1916

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/448.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #448


commit 59910b8665355220f278a27ec7530392a58dff5b
Author: Arvind Narain <narain.arv...@gmail.com>
Date:   2016-04-22T07:16:31Z

[TRAFODION-1916] dcscheck fails with cdh5.4.4 and hbase 1.0.0

Zookeeper jar file will now get installed in $DCS_INSTALL_DIR/lib
as was done before TRAFODION-1828. This is similar to how it's
currently been done for REST subsystem.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1930] Phoenix T2 test...

2016-04-12 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/429

[TRAFODION-1930] Phoenix T2 tests failing with HDP during build phase

Change the repository URL to
http://repo.hortonworks.com/content/groups/public/

Note TRAFODION-1929 and TRAFODION-1930 will need a change in
testware to pass in the CLASSPATH till the root cause of Error 706
is known.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion pht2hdp

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/429.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #429


commit 96d1388718ec41049b31419dce87df352caf9bbf
Author: Arvind Narain <narain.arv...@gmail.com>
Date:   2016-04-12T22:40:57Z

[TRAFODION-1930] Phoenix T2 tests failing with HDP during build phase

Change the repository URL to
http://repo.hortonworks.com/content/groups/public/

Note TRAFODION-1929 and TRAFODION-1930 will need a change in
testware to pass in the CLASSPATH till the root cause of Error 706
is known.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: Phoenix T2 tests failing with CD...

2016-04-11 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/427

Phoenix T2 tests failing with CDH

Partial-Bug: [TRAFODION-1929]
Temporary disable running tests with maven till root cause is known.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion pht2cdh

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/427.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #427


commit 37bf65956a8c23df096a28c9be09d908b2bbc5bf
Author: Arvind Narain <narain.arv...@gmail.com>
Date:   2016-04-12T05:42:00Z

Phoenix T2 tests failing with CDH

Partial-Bug: [TRAFODION-1929]
Temporary disable running tests with maven till root cause is known.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1473] T4 support for ...

2016-04-05 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/417

[TRAFODION-1473] T4 support for new sqltypecode BLOB(-602) and CLOB(-…

…603)

Support in T2 and odbc drivers will be addressed in later checkin.
Automated tests for drivers will be checked in at that stage.

Please refer to LOB Interface document in the jira for ways to 
extract/update data from such columns. set/get lob interfaces will be supported 
in the next release.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion lob

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/417.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #417


commit 54171f4a1ae3a95d0b8baa995ef5a2c7e3d38b74
Author: Arvind Narain <narain.arv...@gmail.com>
Date:   2016-04-05T19:56:20Z

[TRAFODION-1473] T4 support for new sqltypecode BLOB(-602) and CLOB(-603)

Support in T2 and odbc drivers will be addressed in later checkin.
Automated tests for drivers will be checked in at that stage.




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: REST - Remove unneeded dependent...

2016-03-21 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/397#discussion_r56925011
  
--- Diff: core/rest/pom.xml ---
@@ -599,73 +523,6 @@
 
--- End diff --

looks good to me Venkat. Should these comments related to jackson be 
removed too ? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: Support for doing GC on LOB data...

2016-03-07 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/363#discussion_r55239271
  
--- Diff: core/sql/cli/Cli.cpp ---
@@ -9671,7 +9622,12 @@ Lng32 SQLCLI_LOBcliInterface
if (cliRC < 0)
  {
cliInterface->retrieveSQLDiagnostics(myDiags);
-   
+cliInterface->retrieveSQLDiagnostics(myDiags);
--- End diff --

This got duplicated - could be removed.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1765] trafci would th...

2016-02-23 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/335#discussion_r53833088
  
--- Diff: 
dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java ---
@@ -275,12 +275,10 @@ boolean buildConnectReply  (Header hdr, 
ConnectionContext cc, SocketAddress clie
 if (found == false || exceptionThrown == true){
 exception.exception_nr = 
ListenerConstants.DcsMasterNoSrvrHdl_exn; //no available servers
 replyException = true;
-if(LOG.isDebugEnabled()){
-if (found == false)
-LOG.info(clientSocketAddress + ": " + "No Available 
Servers");
-else
-LOG.info(clientSocketAddress + ": " + "No Available 
Servers - exception thrown");
-}
+if (found == false)
--- End diff --

Thanks Dave. Existing logic. Can I address this in the next checkin ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [[ TRAFODION 1800 ]] Changes for...

2016-02-09 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/302#discussion_r52347768
  
--- Diff: install/installer/traf_config_check ---
@@ -487,6 +487,18 @@ if [[ "$SUSE_LINUX" != "true" ]]; then
 fi
 }
 
+function checkBackupUser {
+
+if [ -z $BACKUP_USER ]; then
+   echo "***ERROR: BACKUP_USER variable not set in config file."
+   echo "***WARNING: BACKUP_USER will be set to trafodion."
+   sudo chmod 777 $TRAF_CONFIG
+   sudo "export BACKUP_USER=\"trafodion\"" >> $TRAF_CONFIG
+   sudo chmod 777 $TRAF_CONFIG
+fi
--- End diff --

Should "source $TRAF_CONFIG" be done here after setting BACKUP_USER ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1726]Support getIndex...

2016-02-01 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/243#discussion_r51490240
  
--- Diff: core/conn/jdbc_type2/native/SrvrCommon.cpp ---
@@ -1634,6 +1635,53 @@ short do_ExecSMD(
 tableParam[0], inputParam[0], inputParam[1],
 inputParam[2], inputParam[3]);
 break;
+   case SQL_API_SQLSTATISTICS:
+   if ((!checkIfWildCard(catalogNm, catalogNmNoEsc) || 
!checkIfWildCard(schemaNm, schemaNmNoEsc)
+   || !checkIfWildCard(tableNm, tableNmNoEsc)) && 
!metadataId)
+   {
+   executeException->exception_nr = 
odbc_SQLSvc_GetSQLCatalogs_ParamError_exn_;
+   executeException->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_WILDCARD_NOT_SUPPORTED;
+   
FUNCTION_RETURN_NUMERIC(EXECUTE_EXCEPTION,("EXECUTE_EXCEPTION"));
+   }
+
+   if (strcmp(catalogNm,"") == 0)
+   strcpy(tableName1,SEABASE_MD_CATALOG);
+   else
+   strcpy(tableName1, catalogNm);
+   tableParam[0] = tableName1;
+   convertWildcard(metadataId, TRUE, schemaNm, expSchemaNm);
+   convertWildcardNoEsc(metadataId, TRUE, schemaNm, 
schemaNmNoEsc);
+   convertWildcard(metadataId, TRUE, tableNm, expTableNm);
+   convertWildcardNoEsc(metadataId, TRUE, tableNm, 
tableNmNoEsc);
+   if( inputParam[5] != NULL )
+   {
+   sprintf(cunique, " and index.IS_UNIQUE=1");
+   }
+   inputParam[0] = schemaNmNoEsc;
+   inputParam[1] = expSchemaNm;
+   inputParam[2] = tableNmNoEsc;
+   inputParam[3] = expTableNm;
+   inputParam[4] = NULL;
+   snprintf((char *)sqlString->dataValue._buffer, totalSize,
+   "select "
+   "obj.CATALOG_NAME TABLE_CAT, obj.SCHEMA_NAME TABLE_SCHEM, 
obj.OBJECT_NAME TABLE_NAME,"
+   "cast((case when index.IS_UNIQUE=0 then 1 else 0 end) as 
smallint) NON_UNIQUE, "
+   "cast(NULL as varchar(32)) INDEX_QUALIFIER, 
idxobj.OBJECT_NAME INDEX_NAME, "
+   "cast(-2 as smallint) TYPE, cols.COLUMN_NUMBER 
ORDINAL_POSITION, "
+   "substr(cols.COLUMN_NAME,0,CHAR_LENGTH(cols.COLUMN_NAME)) 
COLUMN_NAME, "
+   "cast((case when keys.ORDERING=0 then 'A' else 'D' end) as 
varchar(4)) ASC_OR_DESC,"
+   "cast(-2 as int) CARDINALITY, cast(-2 as int) PAGES, 
cast(NULL as varchar(10)) FILTER_CONDITION "
--- End diff --

1. Sorry for the confusion and the delay Kevin. I was referring to the 
output when all tables (%) under a schema are specified. In my testing the 
query in the code returned some rows with empty index name and in some cases 
temporary table names etc. This can be fixed in a separate JIRA if needed.

 
   TRAFODION
   MTD
   MTD0
   0
   NULL
   NULL
   -2
   NULL
   NULL
   D
   -2
   -2
   NULL
 
 
   TRAFODION
   MTD
   __SCHEMA__
   0
   NULL
   NULL
   -2
   NULL
   NULL
   D
   -2
   -2
   NULL
 

2. I did look at the corresponding ODBC API. Ordinal position should start 
from 1, so please fix this one and I'll check this in. The following should be 
changed -

 cols.COLUMN_NUMBER ORDINAL_POSITION

to

   keys.KEYSEQ_NUMBER ORDINAL_POSITION

or with a cast if needed.

3. Also could you please create a separate enhancement JIRA - I think for  
column_class 'S' -  "DIVISION BY" column_name (_DIVISION_n) and SALT we  should 
have an optional column at the end - maybe "REMARKS" or some appropriate 
heading which should give the text from text.text - null for non-system columns 
(column_class <> 'S')


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request:

2016-01-29 Thread arvind-narain
Github user arvind-narain commented on the pull request:


https://github.com/apache/incubator-trafodion/commit/77581c107ea4b8dc650e7c4c130c9a94607e66f5#commitcomment-15775925
  
Sorry - wrong parameters to a script used to merge - so ignore "TRAFODION-" 
in the JIRA id. Code merged.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1680] Dcs needs to pr...

2016-01-07 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/251#discussion_r49146268
  
--- Diff: dcs/bin/scripts/dcsbind.sh ---
@@ -354,7 +354,7 @@ dcsEcho "gv_float_external_ip :" $gv_float_external_ip
 dcsEcho "gv_float_internal_ip :" $gv_float_internal_ip
 
 #Check if AWS_CLOUD environment variable defined
-if [[ -z $AWS_CLOUD ]]; then
+if [[ $AWS_CLOUD == "false" ]]; then
--- End diff --

wasn't the earlier check ok ? Does AWS_CLOUD get set to false also or just 
true/empty ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1726]Support getIndex...

2016-01-06 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/243#discussion_r49011034
  
--- Diff: 
dcs/src/main/java/org/trafodion/dcs/servermt/serverHandler/ServerApiGetCatalogs.java
 ---
@@ -353,7 +353,7 @@ else if (columnType == ServerConstants.SQL_ROWVER){
 case ServerConstants.SQL_API_SQLSTATISTICS:
 if(LOG.isDebugEnabled())
 LOG.debug(serverWorkerName + ". getIndexInfo 
(catalogNm :" + catalogNm + ", schemaNm :" + schemaNm + ", tableNm :" + tableNm 
+ ", uniqueness :" + ((uniqueness == 1)? true : false) + ", true)");
-rs = dbmd.getIndexInfo(catalogNm, schemaNm, 
tableNm, (uniqueness == 1)? true : false, true);
+rs = dbmd.getIndexInfo(catalogNm, schemaNm, 
tableNm, (uniqueness == ServerConstants.SQL_INDEX_ALL)? true : false, true);
--- End diff --

Thanks for the updates. Here shouldn't this be SQL_INDEX_UNIQUE (0 - like 
your previous change). You could update line 355 also.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1726]Support getIndex...

2016-01-05 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/243#discussion_r48915781
  
--- Diff: core/conn/jdbc_type2/native/SrvrCommon.cpp ---
@@ -1634,6 +1635,53 @@ short do_ExecSMD(
 tableParam[0], inputParam[0], inputParam[1],
 inputParam[2], inputParam[3]);
 break;
+   case SQL_API_SQLSTATISTICS:
+   if ((!checkIfWildCard(catalogNm, catalogNmNoEsc) || 
!checkIfWildCard(schemaNm, schemaNmNoEsc)
+   || !checkIfWildCard(tableNm, tableNmNoEsc)) && 
!metadataId)
+   {
+   executeException->exception_nr = 
odbc_SQLSvc_GetSQLCatalogs_ParamError_exn_;
+   executeException->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_WILDCARD_NOT_SUPPORTED;
+   
FUNCTION_RETURN_NUMERIC(EXECUTE_EXCEPTION,("EXECUTE_EXCEPTION"));
+   }
+
+   if (strcmp(catalogNm,"") == 0)
+   strcpy(tableName1,SEABASE_MD_CATALOG);
+   else
+   strcpy(tableName1, catalogNm);
+   tableParam[0] = tableName1;
+   convertWildcard(metadataId, TRUE, schemaNm, expSchemaNm);
+   convertWildcardNoEsc(metadataId, TRUE, schemaNm, 
schemaNmNoEsc);
+   convertWildcard(metadataId, TRUE, tableNm, expTableNm);
+   convertWildcardNoEsc(metadataId, TRUE, tableNm, 
tableNmNoEsc);
+   if( inputParam[5] != NULL )
+   {
+   sprintf(cunique, " and index.IS_UNIQUE=1");
+   }
+   inputParam[0] = schemaNmNoEsc;
+   inputParam[1] = expSchemaNm;
+   inputParam[2] = tableNmNoEsc;
+   inputParam[3] = expTableNm;
+   inputParam[4] = NULL;
+   snprintf((char *)sqlString->dataValue._buffer, totalSize,
+   "select "
+   "obj.CATALOG_NAME TABLE_CAT, obj.SCHEMA_NAME TABLE_SCHEM, 
obj.OBJECT_NAME TABLE_NAME,"
+   "cast((case when index.IS_UNIQUE=0 then 1 else 0 end) as 
smallint) NON_UNIQUE, "
+   "cast(NULL as varchar(32)) INDEX_QUALIFIER, 
idxobj.OBJECT_NAME INDEX_NAME, "
+   "cast(-2 as smallint) TYPE, cols.COLUMN_NUMBER 
ORDINAL_POSITION, "
+   "substr(cols.COLUMN_NAME,0,CHAR_LENGTH(cols.COLUMN_NAME)) 
COLUMN_NAME, "
+   "cast((case when keys.ORDERING=0 then 'A' else 'D' end) as 
varchar(4)) ASC_OR_DESC,"
+   "cast(-2 as int) CARDINALITY, cast(-2 as int) PAGES, 
cast(NULL as varchar(10)) FILTER_CONDITION "
--- End diff --

Are these defaults ok ( -2 for cardinality, pages, type ) - just checking - 
I'm sure you have checked what these should be as per the API.

The other request is to add a test case for this api and port the change to 
mxosrvr also.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1726]Support getIndex...

2016-01-05 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/243#discussion_r48916293
  
--- Diff: core/conn/jdbc_type2/native/SrvrCommon.cpp ---
@@ -1634,6 +1635,53 @@ short do_ExecSMD(
 tableParam[0], inputParam[0], inputParam[1],
 inputParam[2], inputParam[3]);
 break;
+   case SQL_API_SQLSTATISTICS:
+   if ((!checkIfWildCard(catalogNm, catalogNmNoEsc) || 
!checkIfWildCard(schemaNm, schemaNmNoEsc)
+   || !checkIfWildCard(tableNm, tableNmNoEsc)) && 
!metadataId)
+   {
+   executeException->exception_nr = 
odbc_SQLSvc_GetSQLCatalogs_ParamError_exn_;
+   executeException->u.ParamError.ParamDesc = 
SQLSVC_EXCEPTION_WILDCARD_NOT_SUPPORTED;
+   
FUNCTION_RETURN_NUMERIC(EXECUTE_EXCEPTION,("EXECUTE_EXCEPTION"));
+   }
+
+   if (strcmp(catalogNm,"") == 0)
+   strcpy(tableName1,SEABASE_MD_CATALOG);
+   else
+   strcpy(tableName1, catalogNm);
+   tableParam[0] = tableName1;
+   convertWildcard(metadataId, TRUE, schemaNm, expSchemaNm);
+   convertWildcardNoEsc(metadataId, TRUE, schemaNm, 
schemaNmNoEsc);
+   convertWildcard(metadataId, TRUE, tableNm, expTableNm);
+   convertWildcardNoEsc(metadataId, TRUE, tableNm, 
tableNmNoEsc);
+   if( inputParam[5] != NULL )
+   {
+   sprintf(cunique, " and index.IS_UNIQUE=1");
+   }
+   inputParam[0] = schemaNmNoEsc;
+   inputParam[1] = expSchemaNm;
+   inputParam[2] = tableNmNoEsc;
+   inputParam[3] = expTableNm;
+   inputParam[4] = NULL;
+   snprintf((char *)sqlString->dataValue._buffer, totalSize,
+   "select "
+   "obj.CATALOG_NAME TABLE_CAT, obj.SCHEMA_NAME TABLE_SCHEM, 
obj.OBJECT_NAME TABLE_NAME,"
+   "cast((case when index.IS_UNIQUE=0 then 1 else 0 end) as 
smallint) NON_UNIQUE, "
+   "cast(NULL as varchar(32)) INDEX_QUALIFIER, 
idxobj.OBJECT_NAME INDEX_NAME, "
+   "cast(-2 as smallint) TYPE, cols.COLUMN_NUMBER 
ORDINAL_POSITION, "
+   "substr(cols.COLUMN_NAME,0,CHAR_LENGTH(cols.COLUMN_NAME)) 
COLUMN_NAME, "
+   "cast((case when keys.ORDERING=0 then 'A' else 'D' end) as 
varchar(4)) ASC_OR_DESC,"
+   "cast(-2 as int) CARDINALITY, cast(-2 as int) PAGES, 
cast(NULL as varchar(10)) FILTER_CONDITION "
+   "from TRAFODION.\"_MD_\".OBJECTS obj "
+   "left join TRAFODION.\"_MD_\".INDEXES index on 
obj.object_uid=index.BASE_TABLE_UID "
+   "left join TRAFODION.\"_MD_\".OBJECTS idxobj on 
index.index_uid=idxobj.object_UID "
+   "left join TRAFODION.\"_MD_\".COLUMNS cols on 
cols.column_name<>'SYSKEY' and idxobj.object_uid=cols.object_uid "
+   "left join TRAFODION.\"_MD_\".KEYS keys on 
cols.object_uid=keys.object_uid and cols.COLUMN_NAME=keys.COLUMN_NAME and 
keys.column_name<>'SYSKEY' "
+   "where 1=1 %s"
+   " and (obj.SCHEMA_NAME = '%s' or trim(obj.SCHEMA_NAME) LIKE 
'%s' ESCAPE '\\')"
+   " and (obj.OBJECT_NAME = '%s' or trim(obj.OBJECT_NAME) LIKE 
'%s' ESCAPE '\\')"
+   " FOR READ UNCOMMITTED ACCESS order by INDEX_NAME, 
ORDINAL_POSITION;",
--- End diff --

should this be ordered by NON_UNIQUE, TYPE, INDEX_NAME, and 
ORDINAL_POSITION ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1726]Support getIndex...

2016-01-05 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/243#discussion_r48916325
  
--- Diff: 
dcs/src/main/java/org/trafodion/dcs/servermt/serverHandler/ServerApiGetCatalogs.java
 ---
@@ -353,7 +353,7 @@ else if (columnType == ServerConstants.SQL_ROWVER){
 case ServerConstants.SQL_API_SQLSTATISTICS:
 if(LOG.isDebugEnabled())
 LOG.debug(serverWorkerName + ". getIndexInfo 
(catalogNm :" + catalogNm + ", schemaNm :" + schemaNm + ", tableNm :" + tableNm 
+ ", uniqueness :" + ((uniqueness == 1)? true : false) + ", true)");
-rs = dbmd.getIndexInfo(catalogNm, schemaNm, 
tableNm, (uniqueness == 1)? true : false, true);
+rs = dbmd.getIndexInfo(catalogNm, schemaNm, 
tableNm, (uniqueness == 0)? true : false, true);
--- End diff --

Thanks for the catch. Could you use SQL_INDEX_UNIQUE(0) or SQL_INDEX_ALL(1) 
?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: TRAFODION 1547 and TRAFODION 147...

2015-12-09 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/217#discussion_r47122312
  
--- Diff: install/installer/traf_add_user ---
@@ -208,15 +208,26 @@ fi
 #=
 # Cycle through all nodes to create known_hosts file, even if only one node
 echo "***INFO: Creating known_hosts file for all nodes"
+NODES_SHORT=""
 for node in $NODE_LIST
-do
-sudo su $TRAF_USER --command "ssh -q -oStrictHostKeyChecking=no $node 
hostname"
-if [ $? -ne 0 ]; then
-echo "***ERROR: Unable to ssh to node $node"
-exit -1
-fi
+do 
+   newNode=$(ssh -q -n $node hostname -s) 
--- End diff --

should the passwordless ssh for $NODE_LIST be setup first?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1656]Remove DISCONNEC...

2015-12-03 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/202#discussion_r46635336
  
--- Diff: 
dcs/src/main/java/org/trafodion/dcs/master/listener/ConnectReply.java ---
@@ -163,29 +163,21 @@ boolean buildConnectReply  (Header hdr, 
ConnectionContext cc, SocketAddress clie
 for(int i=0; i < randomPicks; i++){
 while(true){
 index = random.nextInt();
-index = index > 0? index : -index;
+index = Math.abs(index);
 index %= length;
 if (indexArr[index] != index) break;
 }
 indexArr[index] = index;
-maxIndex = index > maxIndex ? index : maxIndex;
+maxIndex = Math.max(maxIndex, index);
 server = servers.get(index);
-if(LOG.isDebugEnabled())
-LOG.debug(clientSocketAddress + ": " + " index " + 
index + " server picked " + server );
-
 nodeRegisteredPath = registeredPath + "/" + server;
-stat = zkc.exists(nodeRegisteredPath,false);
-if(stat != null){
-data = zkc.getData(nodeRegisteredPath, false, stat);
-if (false == (new 
String(data)).startsWith("AVAILABLE:"))
-continue;
-else {
-found = true;
-break;
-}
-}
-else
-continue;
+if(LOG.isDebugEnabled())
+LOG.debug(clientSocketAddress + ": " + "server 
selected in search 1 " + server );
+data = isServerAvalible(nodeRegisteredPath);
--- End diff --

Thanks for the refactor Kevin. Code looks good now.
Question - Doesn't seem to be a difference between the new log message 
(175) for this case and the next case (191) - intentional ? I think earlier the 
index was being printed.

Code is good to be checked in. The next set of change (for disconnect) will 
allow tests to pass without holding onto the connections - thanks for that.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1519]Use free tool to...

2015-10-16 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/126#discussion_r42272791
  
--- Diff: win-odbc64/odbcclient/README.txt ---
@@ -17,68 +17,44 @@
 # specific language governing permissions and limitations
 # under the License.
 #
-# @@@ END COPYRIGHT @@@
-
-Prerequisite:
-
-openssl >= 0.9.8
-Microsoft Visual Studio >= 2010
-64bit odbccp32.lib from Microsoft Visual Studio 2008 or previous.
-InstallShield >= 2012
-git > 1.9
-
-Build steps
-
-1. In order to make the build script able to find these prerequisites,
-   some variables on the top of build_os.bat and pkg.bat need to be set 
accordingly.
-
-   Set variable OPENSSL_PATH to point to openssl binary folder, for 
example:
-   set OPENSSL_PATH=E:\OpenSSL101e_bin
-   The folder should have structure like this:
-   2013/10/31  18:13  .
-   2013/10/31  18:13  ..
-   2013/10/31  18:13  bin
-   2013/02/11  08:26   435,662 changes.txt
-   2013/10/31  18:13  exp
-   2013/02/11  08:2646,614 faq.txt
-   2013/10/31  18:13  include
-   2013/10/31  18:13  lib
-   2013/02/11  09:59 1,647,616 libeay32.dll
-   2013/02/11  09:59   351,744 libssl32.dll
-   2013/02/11  08:02 6,279 license.txt
-   2013/02/11  08:2627,423 news.txt
-   2004/05/10  16:2330,423 OpenSSLhelp.chm
-   2013/02/11  08:26 9,130 readme.txt
-   2013/02/11  09:59   351,744 ssleay32.dll
-   2013/10/31  18:1320,790 unins000.dat
-   2013/10/31  18:11   715,038 unins000.exe
-
-
-   Set variable ODBCCP32_64_PATH point to Visual Studio 8 PlatformSDK 
library amd64 folder, for example:
-   set ODBCCP32_64_PATH="E:\Program Files (x86)\Microsoft Visual Studio 
8\VC\PlatformSDK\Lib\amd64"
-
-   Set variable MSBUILD_PATH to point to msbuild system, for example:
-   set MSBUILD_PATH=C:\Windows\Microsoft.NET\Framework64\v4.0.30319
-
-   Set variable BUILDDIR to point to parent directory of win-odbc64 folder 
(Trafodion windows driver source directory).
-   For example:
-   set BUILDDIR=E:
-
-   Set variable GIT_BASH point to where git bash was installed.(from git 
install), for example:
-   set GIT_BASH="C:\Program Files (x86)\Git\bin\sh.exe"
-
-   The path for InstallShield needs to be set in pkg.bat
-
-   Set variable PACKDRIVER to conn folder of Trafodion source tree, for 
example:
-   set PACKDRIVER=E:
-
-   Set variable ISCMDBLD_PATH to InstallShield install folder, for example:
-   set ISCMDBLD_PATH="E:\Program Files (x86)\Installshield\2012\System"
-
-2. To build, open a cmd window, and type
-
-   cd E:\win-odbc64\odbcclient
-   build_os.bat
-   pkg.bat
-
-The final Win ODBC driver installer package can be found at 
%PACKDRIVER%\lib\x64\Release
+# @@@ END COPYRIGHT @@@
+
+Prerequisite:
+
+openssl >= 0.9.8
+zlib >= 1.2.8
+Microsoft Visual Studio >= 2013
+Inno Setup >= 5
+
+Build steps
+
+1. In order to make the build script able to find these prerequisites,
+   some variables on the top of build_os.bat and pkg.bat need to be set 
accordingly.
+
+   Set variable OPENSSL_LIB_PATH to point to openssl library files folder, 
for example:
+   set OPENSSL_PATH=C:\openssl-1.0.1e\lib
+
+   Set variable OPENSSL_INCLUDE_PATH to point to openssl header files 
folder, for example:
+set OPENSSL_INCLUDE_PATH=C:\openssl-1.0.1e\include
+
+   Set variable ZLIB_INCLUDE_PATH to point to zlib header files folder, 
for example:
+set ZLIB_INCLUDE_PATH=C:\zlib\include
+
+   Set variable ZLIB_LIB_PATH to point to zlib library files folder, for 
example:
+set ZLIB_LIB_PATH=C:\zlib\lib
+
+   Set variable MSBUILD_PATH to point to msbuild system, for example:
+ set MSBUILD_PATH=C:\Windows\Microsoft.NET\Framework64\v4.0.30319
+
+   Set variable PACKDIR to conn folder of Trafodion source tree, for 
example:
+ set PACKDIR=C:\Build\winodbc64
+
+   Set variable INNO_SETUP_PATH to inno setup install folder, for example:
+ set INNO_SETUP_PATH="C:\Program Files (x86)\Inno Setup 5"
+
+   Download vcredist_x64.exe from 
http://www.microsoft.com/en-us/download/details.aspx?id=40784 and copy it to 
C:\Build\winodbc64\redist
+
+2. To build, open a cmd window, change to win-odbc64\odbcclient and type
+   build_os.bat
+
+The final Win ODBC driver installer package can be found at %PACKDIR%
--- End diff --

Please test on a vanilla system to see if only the above step

[GitHub] incubator-trafodion pull request: [TRAFODION-1525]Locale for JDBCT...

2015-10-14 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/120#discussion_r42021375
  
--- Diff: core/conn/jdbc_type4/src/org/trafodion/jdbc/t4/HPT4Messages.java 
---
@@ -295,7 +292,7 @@ static HPT4Exception createSQLException(T4Properties 
t4props, Locale msgLocale,
if (messageArguments != null) {
message = message.concat(" With parameters: ");
while (true) {
-   message = 
message.concat(messageArguments[i++].toString());
+   message = 
message.concat(messageArguments[i++] + "");
--- End diff --

This is minor - do we need to make the same change on line 83 also ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1526]Incorrect messag...

2015-10-14 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/121#discussion_r42017420
  
--- Diff: 
core/conn/jdbc_type4/src/org/trafodion/jdbc/t4/TrafT4ResultSet.java ---
@@ -4299,12 +4299,10 @@ private BaseRow getCurrentRow() throws SQLException 
{
return insertRow_;
} else {
if (isBeforeFirst_) {
-   String cursorExpt = "The cursor is before the 
first row, therefore no data can be retrieved.";
-   throw 
HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), 
cursorExpt, null);
+   throw 
HPT4Messages.createSQLException(connection_.props_, connection_.getLocale(), 
"cursor_is_before_first_row", null);
--- End diff --

Hi Dave - change in pr 120 is with the message filename itself.

createSQLException takes in the string supplied and appends "_msg", 
"_sqlstate", "_sqlcode" to get the corresponding message, state and error code 
from the message file (now T4Messages)



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1519]Use free tool to...

2015-10-12 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/116#discussion_r41810575
  
--- Diff: win-odbc64/odbcclient/README.txt ---
@@ -1,84 +1,58 @@
 # @@@ START COPYRIGHT @@@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements.  See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership.  The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License.  You may obtain a copy of the License at
-#
-#   http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied.  See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
 # @@@ END COPYRIGHT @@@
 
 Prerequisite:
 
 openssl >= 0.9.8
-Microsoft Visual Studio >= 2010
-64bit odbccp32.lib from Microsoft Visual Studio 2008 or previous.
-InstallShield >= 2012
-git > 1.9
+zlib >= 1.2.8
+Microsoft Visual Studio >= 2013
+Inno Setup >= 5
 
 Build steps
 
 1. In order to make the build script able to find these prerequisites,
some variables on the top of build_os.bat and pkg.bat need to be set 
accordingly.
 
-   Set variable OPENSSL_PATH to point to openssl binary folder, for 
example:
-   set OPENSSL_PATH=E:\OpenSSL101e_bin
-   The folder should have structure like this:
-   2013/10/31  18:13  .
-   2013/10/31  18:13  ..
-   2013/10/31  18:13  bin
-   2013/02/11  08:26   435,662 changes.txt
-   2013/10/31  18:13  exp
-   2013/02/11  08:2646,614 faq.txt
-   2013/10/31  18:13  include
-   2013/10/31  18:13  lib
-   2013/02/11  09:59 1,647,616 libeay32.dll
-   2013/02/11  09:59   351,744 libssl32.dll
-   2013/02/11  08:02 6,279 license.txt
-   2013/02/11  08:2627,423 news.txt
-   2004/05/10  16:2330,423 OpenSSLhelp.chm
-   2013/02/11  08:26 9,130 readme.txt
-   2013/02/11  09:59   351,744 ssleay32.dll
-   2013/10/31  18:1320,790 unins000.dat
-   2013/10/31  18:11   715,038 unins000.exe
+   Set variable OPENSSL_LIB_PATH to point to openssl library files folder, 
for example:
+   set OPENSSL_PATH=C:\openssl-1.0.1e\lib
--- End diff --

do please build and test with > 1.0.1f - openssl bug.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: Adding .rat-excludes, readme for...

2015-10-10 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/115#discussion_r41702693
  
--- Diff: 
core/conn/trafci/src/org/trafodion/ci/Properties/trafciDefaultLookAndFeel.properties
 ---
@@ -1,3 +1,26 @@
+#
--- End diff --

I thought we had put this file in the exception list ? Code won't be able 
to handle the copyright comments


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1515] MT DCS - Suppor...

2015-10-08 Thread arvind-narain
GitHub user arvind-narain opened a pull request:

https://github.com/apache/incubator-trafodion/pull/111

[TRAFODION-1515] MT DCS - Support for multiple resultsets

Fixes for catalog APIs.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/arvind-narain/incubator-trafodion mtdcs

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/incubator-trafodion/pull/111.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #111


commit 661f4ad86f0048f55057fbbbe61d7cf686055659
Author: Arvind Narain <arvi...@dev02.trafodion.org>
Date:   2015-10-08T00:19:57Z

Delivering multithreaded code to support resultsets.

commit dd15115e81b16afea15e0d342c7ebf4e2d125bd4
Author: Arvind Narain <arvi...@dev02.trafodion.org>
Date:   2015-10-09T05:06:10Z

Removed commented code




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1498] install_local_h...

2015-09-25 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/93#discussion_r40475580
  
--- Diff: dcs/Makefile ---
@@ -0,0 +1,52 @@
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+# This Makefile is just a thin shell to Maven, which is used to do the 
real build
+
+include ../core/macros.gmk #top level
+BLD_TRAFODION_DCS_TARNAME   =dcs-$(TRAFODION_VER).tar.gz
+
+VFILE  =trafodion-dcs.jar.versions
+GENVERS=./genvers
+
+.NOTPARALLEL: all
+
+all: build_all
+
+build_all:  
+   $(MAKE) build_chk
+   echo "$(MAVEN) site package -DskipTests"
+   echo "### For full Maven output, see file build_dcs.log"
+   set -o pipefail && $(MAVEN) site package -DskipTests | tee 
build_dcs.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] 
B[Uu][Ii][Ll][Dd]' -e 'to compile'
+   mkdir -p ../../${DISTRIBUTION_DIR}
--- End diff --

should be just one level up ../${DISTRIBUTION_DIR}


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1498] install_local_h...

2015-09-25 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/93#discussion_r40475868
  
--- Diff: env.sh ---
@@ -0,0 +1,3 @@
+cd core/sqf
--- End diff --

Copyright text needed in this new file


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1498] install_local_h...

2015-09-25 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/93#discussion_r40475794
  
--- Diff: dcs/genvers ---
@@ -0,0 +1,3 @@
+#!/bin/sh
--- End diff --

Will need copyright text


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-1498] install_local_h...

2015-09-25 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/93#discussion_r40475712
  
--- Diff: dcs/Makefile ---
@@ -0,0 +1,52 @@
+# @@@ START COPYRIGHT @@@
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+#
+# @@@ END COPYRIGHT @@@
+
+# This Makefile is just a thin shell to Maven, which is used to do the 
real build
+
+include ../core/macros.gmk #top level
+BLD_TRAFODION_DCS_TARNAME   =dcs-$(TRAFODION_VER).tar.gz
+
+VFILE  =trafodion-dcs.jar.versions
+GENVERS=./genvers
+
+.NOTPARALLEL: all
+
+all: build_all
+
+build_all:  
+   $(MAKE) build_chk
+   echo "$(MAVEN) site package -DskipTests"
+   echo "### For full Maven output, see file build_dcs.log"
+   set -o pipefail && $(MAVEN) site package -DskipTests | tee 
build_dcs.log | grep --line-buffered -E -e '^\[[^WId]' -e '^\[INFO\] 
B[Uu][Ii][Ll][Dd]' -e 'to compile'
+   mkdir -p ../../${DISTRIBUTION_DIR}
+   cp -pf target/$(BLD_TRAFODION_DCS_TARNAME) ../${DISTRIBUTION_DIR}/
+   $(RM) $(VFILE)
+
+build_chk:
+   $(GENVERS) > $(VFILE)
+   @if [ $(GENVERS) -nt target/$(BLD_TRAFODION_DCS_TARNAME) ]; then echo 
"update manifest"; $(RM) -f target/$(BLD_TRAFODION_DCS_TARNAME); fi
+   @if [ $(MY_SQROOT)/export/include/SCMBuildStr.h -nt 
target/$(BLD_TRAFODION_DCS_TARNAME) ]; then echo "update manifest"; $(RM) -f 
target/$(BLD_TRAFODION_DCS_TARNAME); fi
+
+clean:
+   -$(MAVEN) clean | grep ERROR
+   $(RM) build_dcs.log
+   $(RM) $(VFILE)
+   $(RM) ../../${DISTRIBUTION_DIR}/$(BLD_TRAFODION_DCS_TARNAME)
--- End diff --

Same here .. $(RM) ../${DISTRIBUTION_DIR}/$..


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-353][TRAFODION-1200][...

2015-08-31 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/69#discussion_r38379061
  
--- Diff: core/sql/sqlcomp/PrivMgrPrivileges.cpp ---
@@ -4407,6 +4609,60 @@ static void getColRowsForGranteeGrantor(
 
 
 // 
*
+// * Function: hasAllDMLPrivs  
*
+// *   
*
+// *This function determines if a privilege bitmap has all the DML 
*
+// * privileges for a specified object type.   
*
+// *   
*
+// 
*
+// *   
*
+// *  Parameters:  
*
+// *   
*
+// *   ComObjectType  In   
*
+// *is the type of the object. 
*
+// *   
*
+// *   PrivObjectBitmap   In   
*
+// *is the bitmap representing the privileges. 
*
+// *   
*
+// 
*
+static bool hasAllDMLPrivs(
+   ComObjectType objectType,
+   PrivObjectBitmap privBitmap)
+
+{
+
+   switch (objectType)
+   {
+  case COM_BASE_TABLE_OBJECT:
+  case COM_VIEW_OBJECT:
+ if (privBitmap.test(DELETE_PRIV) && privBitmap.test(INSERT_PRIV) 
&&
+ privBitmap.test(REFERENCES_PRIV) && 
privBitmap.test(SELECT_PRIV) &&
+ privBitmap.test(UPDATE_PRIV))
+return true;
+ break;
+  case COM_LIBRARY_OBJECT:
+ if (privBitmap.test(UPDATE_PRIV) && privBitmap.test(USAGE_PRIV))
+return true;
+ break;  
+  case COM_STORED_PROCEDURE_OBJECT:
+  case COM_USER_DEFINED_ROUTINE_OBJECT:
+ if (privBitmap.test(EXECUTE_PRIV))
+return true;
+  case COM_SEQUENCE_GENERATOR_OBJECT:
--- End diff --

Is a break needed here ?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-353][TRAFODION-1200][...

2015-08-31 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/69#discussion_r38379188
  
--- Diff: core/sql/sqlcomp/PrivMgr.cpp ---
@@ -894,3 +918,49 @@ void PrivMgr::setFlags()
   
SQL_EXEC_SetParserFlagsForExSqlComp_Internal(INTERNAL_QUERY_FROM_EXEUTIL);
 }
 
+// 

+// method::log
+//
+// sends a message to log4cxx implementation designed by SQL
+//
+// Input:
+//filename - code file that is performing the request 
+//message  - the message to log
+//index- index for logging that loops through a list
+//
+// Background
+//   Privilege manager code sets up a message and calls this log method
+//   This method calls SQLMXLoggingArea::logPrivMgrInfo described in 
+//  sqlmxevents/logmxevent_traf (.h & .cpp)
+//   logPrivMgInfo is a wrapper class around qmscommon/QRLogger (.h & .cpp)
--- End diff --

logPrivMgrInfo - minor - can be touched later.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request:

2015-08-06 Thread arvind-narain
Github user arvind-narain commented on the pull request:


https://github.com/apache/incubator-trafodion/commit/d21c04b0794ef567d629cfc45c623098628e2f19#commitcomment-12576928
  
Thanks once again Suresh.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---


[GitHub] incubator-trafodion pull request: [TRAFODION-37] Prepare ROLLBACK...

2015-07-15 Thread arvind-narain
Github user arvind-narain commented on a diff in the pull request:

https://github.com/apache/incubator-trafodion/pull/28#discussion_r34718734
  
--- Diff: core/conn/jdbc_type2/native/CSrvrConnect.cpp ---
@@ -268,10 +268,10 @@ void SRVR_CONNECT_HDL::addSrvrStmt(SRVR_STMT_HDL 
*pSrvrStmt,BOOL internalStmt)
 mapOfInternalSrvrStmt[pSrvrStmt-stmtName]= pSrvrStmt;  // +++ map 
error
 }
 
-
 //End of Soln. No.: 10-100202-7923
 
 count++;
+//pSrvrStmt-myKey = count;
--- End diff --

Thanks for removing some unneeded comments. Is this particular one needed ? 
In general if it might be good to clean up the method being touched (remove sol 
numbers, commented out code if not needed or add more comments, remove any MFC 
related code etc)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---