You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2018/02/07 17:35:08 UTC
[1/2] trafodion git commit: fix Trafodion-2937
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 <87...@qq.com>
Authored: Wed Jan 31 09:39:59 2018 +0800
Committer: SuJinpei <87...@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 */
[2/2] trafodion git commit: Merge [TRAFODION-2937] PR 1425 Fix issue
with copying data from MySQL to Traf
Posted by db...@apache.org.
Merge [TRAFODION-2937] PR 1425 Fix issue with copying data from MySQL to Traf
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/84bb7c03
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/84bb7c03
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/84bb7c03
Branch: refs/heads/master
Commit: 84bb7c03c600c1b3622ad1c2b3c4b4d5e57b8000
Parents: 8d3f7ed 7e05a82
Author: Dave Birdsall <db...@apache.org>
Authored: Wed Feb 7 17:34:04 2018 +0000
Committer: Dave Birdsall <db...@apache.org>
Committed: Wed Feb 7 17:34:04 2018 +0000
----------------------------------------------------------------------
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/84bb7c03/core/conn/odb/src/odb.c
----------------------------------------------------------------------