trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/2] trafodion git commit: fix Trafodion-2937
Date Wed, 07 Feb 2018 17:35:08 GMT
Repository: trafodion
Updated Branches:
  refs/heads/master 8d3f7edc8 -> 84bb7c03c


fix Trafodion-2937


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

Branch: refs/heads/master
Commit: 7e05a8251ae81c401bd7845275a82061e99455b5
Parents: 622e67b
Author: SuJinpei <873118042@qq.com>
Authored: Wed Jan 31 09:39:59 2018 +0800
Committer: SuJinpei <873118042@qq.com>
Committed: Wed Jan 31 09:39:59 2018 +0800

----------------------------------------------------------------------
 core/conn/odb/Makefile  |  2 +-
 core/conn/odb/src/odb.c | 16 +++++++++++++---
 2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/7e05a825/core/conn/odb/Makefile
----------------------------------------------------------------------
diff --git a/core/conn/odb/Makefile b/core/conn/odb/Makefile
index 1911d47..893da0b 100644
--- a/core/conn/odb/Makefile
+++ b/core/conn/odb/Makefile
@@ -48,7 +48,7 @@ INCPATH_64luo = -I/use/include \
 		-I$(JAVA_HOME)/include/linux \
 		-I$(TRAF_HOME)/export/include
 
-LIBS_64luo = -lodbc -lodbcinst -lz -ldl
+LIBS_64luo = -lodbc -lodbcinst -lz -ldl -lpthread
 EXEC_64luo = odb64luo
 ODBBLD_64luo = "\"linux, amd64, gcc generic m64, uodbc, mreadline, dynamic gzip, dynamic
libhdfs, dynamic libxml2\""
 vpath %.c src

http://git-wip-us.apache.org/repos/asf/trafodion/blob/7e05a825/core/conn/odb/src/odb.c
----------------------------------------------------------------------
diff --git a/core/conn/odb/src/odb.c b/core/conn/odb/src/odb.c
index 5f8db45..d203c1f 100755
--- a/core/conn/odb/src/odb.c
+++ b/core/conn/odb/src/odb.c
@@ -3382,6 +3382,7 @@ Please note the fixed length '6' in strmicmp: SELECT/UPDATET/DELETE/INSERT
have
         case SQL_WCHAR:
             if ( etab[eid].dbt != VERTICA ) /* Vertica's CHAR field length is in bytes (not
chars) */
                 Ors[j] *= etab[eid].bpwc;
+            /* FALLTHRU */
         case SQL_CHAR:
             if ( etab[eid].dbt != VERTICA ) /* Vertica's CHAR field length is in bytes (not
chars) */
                 Ors[j] *= etab[eid].bpc;
@@ -3399,6 +3400,7 @@ Please note the fixed length '6' in strmicmp: SELECT/UPDATET/DELETE/INSERT
have
         case SQL_WLONGVARCHAR:
             if ( etab[eid].dbt != VERTICA ) /* Vertica's CHAR field length is in bytes (not
chars) */
                 Ors[j] *= etab[eid].bpwc;
+            /* FALLTHRU */
         case SQL_VARCHAR:
         case SQL_LONGVARCHAR:
             if ( etab[eid].dbt != VERTICA ) /* Vertica's CHAR field length is in bytes (not
chars) */
@@ -3984,6 +3986,7 @@ static void *Oruncmd(void *tid)
                         MutexUnlock(&dlbmutex);
                         continue ;
                     }
+                    /* FALLTHRU */
                 default:
                     if ( etab[eid].tbe != 1 ) {
                         MutexUnlock(&dlbmutex);
@@ -4036,7 +4039,8 @@ static void *Oruncmd(void *tid)
                     ret = Oloadbuff( eid );
                     if ( ret ) {
                         if ( f & 020000 ) 
-                            fprintf(stderr, "odb [Oruncmd(%d)] - Oloadbuff[%d] returned %d\n",
__LINE__, eid, ret);fflush(stdout);
+                            fprintf(stderr, "odb [Oruncmd(%d)] - Oloadbuff[%d] returned %d\n",
__LINE__, eid, ret);
+                        fflush(stdout);
                         /* Disconnect */
                         if (!SQL_SUCCEEDED(Oret=SQLDisconnect(thps[etab[eid].id].Oc)))
                             Oerr(0, 0, __LINE__, thps[etab[eid].id].Oc, SQL_HANDLE_DBC);
@@ -4063,7 +4067,8 @@ static void *Oruncmd(void *tid)
                     ret = Ocopy( eid );
                     if ( ret  && etab[eid].roe ) {
                         if ( f & 020000 ) 
-                            fprintf(stderr, "odb [Oruncmd(%d)] - OCopy returned %d\n", __LINE__,
ret);fflush(stdout);
+                            fprintf(stderr, "odb [Oruncmd(%d)] - OCopy returned %d\n", __LINE__,
ret);
+                        fflush(stdout);
                         /* Disconnect */
                         if (!SQL_SUCCEEDED(Oret=SQLDisconnect(thps[etab[eid].id].Oc)))
                             Oerr(0, 0, __LINE__, thps[etab[eid].id].Oc, SQL_HANDLE_DBC);
@@ -4310,6 +4315,7 @@ static void gclean(void)
             break;
         case 'F':               /* ...(F) allocated during -S/-P */
             free(etab[i].run);
+            /* FALLTHRU */
         case 'f':
         case 'I':
             if ( etab[i].ns != ns )     /* nullstr allocated */
@@ -10479,6 +10485,7 @@ static void Oextract(int eid)
                         cmdl += strmcat ( (char *) Ocmd, ")", cl, 0);
                         break;
                     }
+                    /* FALLTHRU */
                 case SQL_VARCHAR:
                 case SQL_WVARCHAR:
                 case SQL_LONGVARCHAR:
@@ -10867,7 +10874,7 @@ static int Ocopy(int eid)
     }
 
     /* Build Extract Command */
-    if ( etab[eid].ps ) {
+    if ( etab[eid].ps > 1 ) {
         if ( etab[eid].flg2 & 040000 ) {    /* custom parallel SQL */
             /* Set initial Ocmd */
             strmcpy((char *)Ocmd, etab[eid].sql, cl);
@@ -13856,6 +13863,7 @@ static int Otcol(int eid, SQLHDBC *Ocn)
                 } else {                        /* param with value */
                     o = 1;
                 }
+                /* FALLTHRU */
             case 1: /* looking for value */
                 if ( str[j+1] == '[' ) {
                     j++; 
@@ -13883,6 +13891,7 @@ static int Otcol(int eid, SQLHDBC *Ocn)
                     str[j]='\0';
                 }
                 o = 2;
+                /* FALLTHRU */
             case 2: /* fill etab structure */
                 if ( str[l] == '=' ) {
                     str[l++] = '\0';
@@ -14371,6 +14380,7 @@ static char *parsehdfs(int eid, char *hdfs)
     switch ( hdfs[i] ) {
     case ',' :
         uf = 1 ;    /* optional user string present */
+        /* FALLTHRU */
     case '.':
         hdfs[i] = '\0' ;        /* replace ',' with NULL to terminate hdfsport */
         etab[eid].hdfsport = (tPort)atoi(s);    /* save hdfsport */


Mime
View raw message