Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 64ace98a2 -> 160ac1c5a


[TRAFODION-2034] write failed row to bad record file when load with parameter 
bad


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

Branch: refs/heads/master
Commit: 0f28ece37e5bb85de1777df0ff29e499dd4c0b2d
Parents: f4d9910
Author: Zale <[email protected]>
Authored: Thu Jun 30 10:56:44 2016 -0700
Committer: Zale <[email protected]>
Committed: Thu Jun 30 10:56:44 2016 -0700

----------------------------------------------------------------------
 core/conn/odb/src/odb.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/0f28ece3/core/conn/odb/src/odb.c
----------------------------------------------------------------------
diff --git a/core/conn/odb/src/odb.c b/core/conn/odb/src/odb.c
index c37196b..3e5ca71 100644
--- a/core/conn/odb/src/odb.c
+++ b/core/conn/odb/src/odb.c
@@ -11467,7 +11467,9 @@ static void prec(char type, unsigned char *podbc, int 
eid)
 
     if ( type == 'L' ) {
         gpar = etab[eid].parent;
-        nfields = (unsigned int)etab[gpar].sp ;
+        /* nfields = (unsigned int)etab[gpar].sp ; */
+        /* fix jira 2034, write to bad_record if load with parameter 'bad', 
etab[gpar].sp equals 0 always */
+        nfields = (unsigned int)etab[eid].sp ;
     }
     MutexLock(&etab[gpar].pmutex);      /* lock mutex */
     if ( !(etab[gpar].flg2 & 0200) ) {

Reply via email to