You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by sa...@apache.org on 2016/05/02 17:28:47 UTC
[1/3] incubator-trafodion git commit: Fix for Trafodion-1941 to allow
syntax for secifying length for blob/clob columns.iInvolves syntax changees
and ene runtime checks and a new testcase in executor/TEST130.
Repository: incubator-trafodion
Updated Branches:
refs/heads/master 64a68cf7a -> 58a4000a0
Fix for Trafodion-1941 to allow syntax for secifying length for blob/clob columns.iInvolves syntax changees and ene runtime checks and a new testcase in executor/TEST130.
Error handling fix related to JIRA TRAFODION-1943. The drop schema code will now exit as soon as there is an error and not continue executing.ALso fixed a problem in drop schema code where "if exists" was not specified correctly leading to syntax errors.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/2ce2d0d2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/2ce2d0d2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/2ce2d0d2
Branch: refs/heads/master
Commit: 2ce2d0d23b950e46c096719bf186200218333591
Parents: 611b12c
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Wed Apr 27 21:31:37 2016 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Wed Apr 27 21:31:37 2016 +0000
----------------------------------------------------------------------
core/sql/exp/ExpLOB.cpp | 33 +++++++----
core/sql/exp/ExpLOB.h | 4 +-
core/sql/exp/ExpLOBinterface.cpp | 4 +-
core/sql/generator/GenItemFunc.cpp | 1 +
core/sql/generator/GenPreCode.cpp | 13 +++--
core/sql/optimizer/ImplRule.cpp | 3 +
core/sql/parser/sqlparser.y | 20 +++----
core/sql/regress/executor/EXPECTED130 | 82 ++++++++++++++++-----------
core/sql/regress/executor/FILTER130 | 9 ++-
core/sql/regress/executor/TEST130 | 16 +++++-
core/sql/sqlcomp/CmpSeabaseDDLschema.cpp | 51 ++++++++++++++---
core/sql/sqlcomp/CmpSeabaseDDLtable.cpp | 3 +-
12 files changed, 165 insertions(+), 74 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/exp/ExpLOB.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOB.cpp b/core/sql/exp/ExpLOB.cpp
index 0662ec8..f1442b6 100644
--- a/core/sql/exp/ExpLOB.cpp
+++ b/core/sql/exp/ExpLOB.cpp
@@ -344,6 +344,7 @@ ExpLOBoper::ExpLOBoper(OperatorTypeEnum oper_type,
strcpy(lobHdfsServer_,"");
lobHdfsPort_ = -1;
descSchName_[0] = 0;
+ lobSize_ = 0;
lobMaxSize_ = 0;
lobMaxChunkMemSize_ = 0;
lobGCLimit_ = 0;
@@ -796,7 +797,13 @@ ex_expr::exp_return_type ExpLOBiud::insertDesc(char *op_data[],
lo = Lob_InsertDataSimple;
else
lo = Lob_InsertDesc;
-
+ Int64 lobMaxSize = 0;
+ if (getLobSize() > 0)
+ {
+ lobMaxSize = MINOF(getLobSize(), getLobMaxSize());
+ }
+ else
+ lobMaxSize = getLobMaxSize();
rc = ExpLOBInterfaceInsert
(getExeGlobals()->lobGlobal(),
@@ -815,7 +822,7 @@ ex_expr::exp_return_type ExpLOBiud::insertDesc(char *op_data[],
&cliError,
so,
waitedOp,
- lobData, lobLen, getLobMaxSize(), getLobMaxChunkMemSize(),getLobGCLimit());
+ lobData, lobLen, lobMaxSize, getLobMaxChunkMemSize(),getLobGCLimit());
if (rc == LOB_ACCESS_PREEMPT)
{
@@ -832,7 +839,7 @@ ex_expr::exp_return_type ExpLOBiud::insertDesc(char *op_data[],
ExRaiseSqlError(h, diagsArea,
(ExeErrorCode)(8442), NULL, &intParam1,
&cliError, NULL, (char*)"ExpLOBInterfaceInsert",
- getLobErrStr(intParam1));
+ (char*)"ExpLOBInterfaceInsert",getLobErrStr(intParam1));
return ex_expr::EXPR_ERROR;
}
@@ -997,7 +1004,7 @@ ex_expr::exp_return_type ExpLOBiud::insertData(Lng32 handleLen,
ExRaiseSqlError(h, diagsArea,
(ExeErrorCode)(8442), NULL, &intParam1,
&cliError, NULL, (char*)"ExpLOBInterfaceInsert",
- getLobErrStr(intParam1));
+ (char*)"ExpLOBInterfaceInsert",getLobErrStr(intParam1));
return ex_expr::EXPR_ERROR;
}
@@ -1115,7 +1122,7 @@ ex_expr::exp_return_type ExpLOBdelete::eval(char *op_data[],
ExRaiseSqlError(h, diagsArea,
(ExeErrorCode)(8442), NULL, &intParam1,
&cliError, NULL, (char*)"ExpLOBInterfaceDelete",
- getLobErrStr(intParam1));
+ (char*)"ExpLOBInterfaceDelete",getLobErrStr(intParam1));
return ex_expr::EXPR_ERROR;
}
@@ -1278,7 +1285,13 @@ ex_expr::exp_return_type ExpLOBupdate::eval(char *op_data[],
so = Lob_Foreign_Lob;
else if (fromBuffer())
so= Lob_Buffer;
-
+ Int64 lobMaxSize = 0;
+ if (getLobSize() > 0)
+ {
+ lobMaxSize = MINOF(getLobSize(), getLobMaxSize());
+ }
+ else
+ lobMaxSize = getLobMaxSize();
Lng32 waitedOp = 0;
#ifdef __EID
waitedOp = 0; // nowaited op from EID/TSE process
@@ -1323,7 +1336,7 @@ ex_expr::exp_return_type ExpLOBupdate::eval(char *op_data[],
data,
fromLobName, fromSchNameLen, fromSchName,
fromDescKey, fromDescTS,
- getLobMaxSize(), getLobMaxChunkMemSize(),getLobGCLimit());
+ lobMaxSize, getLobMaxChunkMemSize(),getLobGCLimit());
}
else
{
@@ -1346,7 +1359,7 @@ ex_expr::exp_return_type ExpLOBupdate::eval(char *op_data[],
data,
fromLobName, fromSchNameLen, fromSchName,
fromDescKey, fromDescTS,
- getLobMaxSize(), getLobMaxChunkMemSize(),getLobGCLimit());
+ lobMaxSize, getLobMaxChunkMemSize(),getLobGCLimit());
}
if (rc < 0)
@@ -1355,7 +1368,7 @@ ex_expr::exp_return_type ExpLOBupdate::eval(char *op_data[],
ExRaiseSqlError(h, diagsArea,
(ExeErrorCode)(8442), NULL, &intParam1,
&cliError, NULL, (char*)"ExpLOBInterfaceUpdate",
- getLobErrStr(intParam1));
+ (char*)"ExpLOBInterfaceUpdate",getLobErrStr(intParam1));
return ex_expr::EXPR_ERROR;
}
@@ -1549,7 +1562,7 @@ ex_expr::exp_return_type ExpLOBconvert::eval(char *op_data[],
ExRaiseSqlError(h, diagsArea,
(ExeErrorCode)(8442), NULL, &intParam1,
&cliError, NULL, (char*)"ExpLOBInterfaceSelect",
- getLobErrStr(intParam1));
+ (char*)"ExpLOBInterfaceSelect",getLobErrStr(intParam1));
return ex_expr::EXPR_ERROR;
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/exp/ExpLOB.h
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOB.h b/core/sql/exp/ExpLOB.h
index d71a1d9..015fcac 100644
--- a/core/sql/exp/ExpLOB.h
+++ b/core/sql/exp/ExpLOB.h
@@ -302,6 +302,8 @@ public:
virtual Lng32 initClause();
void setLobMaxSize(Int64 maxsize) { lobMaxSize_ = maxsize;}
Int64 getLobMaxSize() { return lobMaxSize_;}
+ void setLobSize(Int64 lobsize) { lobSize_ = lobsize;}
+ Int64 getLobSize() { return lobSize_;}
void setLobMaxChunkMemSize(Int64 maxsize) { lobMaxChunkMemSize_ = maxsize;}
Int64 getLobMaxChunkMemSize() { return lobMaxChunkMemSize_;}
void setLobGCLimit(Int64 gclimit) { lobGCLimit_ = gclimit;}
@@ -391,7 +393,7 @@ protected:
short descSchNameLen_;
char descSchName_[510];
-
+ Int64 lobSize_;
Int64 lobMaxSize_;
Int64 lobMaxChunkMemSize_;
Int64 lobGCLimit_;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/exp/ExpLOBinterface.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOBinterface.cpp b/core/sql/exp/ExpLOBinterface.cpp
index 188fed4..23a2083 100644
--- a/core/sql/exp/ExpLOBinterface.cpp
+++ b/core/sql/exp/ExpLOBinterface.cpp
@@ -746,7 +746,7 @@ Lng32 ExpLOBInterfaceSelect(void * lobGlob,
Ex_Lob_Error status;
Int64 dummyParam=0;
Int32 dummyParam2 = 0;
- Int64 cliError;
+ Int64 cliError=0;
LobsOper lo;
@@ -828,7 +828,7 @@ Lng32 ExpLOBInterfaceSelectCursor(void * lobGlob,
Int64 dummyParam = 0;
Int32 dummyParam2 = 0;
Ex_Lob_Error status;
- Int64 cliError;
+ Int64 cliError=0;
LobsOper lo;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/generator/GenItemFunc.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenItemFunc.cpp b/core/sql/generator/GenItemFunc.cpp
index d328900..a84f2e1 100644
--- a/core/sql/generator/GenItemFunc.cpp
+++ b/core/sql/generator/GenItemFunc.cpp
@@ -2708,6 +2708,7 @@ short LOBinsert::codeGen(Generator * generator)
li->lobNum() = lobNum();
li->setLobStorageType(lobStorageType());
li->setLobStorageLocation((char*)lobStorageLocation().data());
+ li->setLobSize(lobSize());
li->setLobMaxSize(getLobMaxSize());
li->setLobMaxChunkMemSize(getLobMaxChunkMemSize());
li->setLobGCLimit(getLobGCLimit());
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/generator/GenPreCode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenPreCode.cpp b/core/sql/generator/GenPreCode.cpp
index 66ae65f..ea8cd78 100644
--- a/core/sql/generator/GenPreCode.cpp
+++ b/core/sql/generator/GenPreCode.cpp
@@ -5411,7 +5411,7 @@ RelExpr * HbaseUpdate::preCodeGen(Generator * generator,
append(getTableDesc()->getNATable()->
getTableName().getSchemaName());
lu->updatedTableSchemaName() += "\"";
-
+ lu->lobSize() = col->getType()->getPrecision();
lu->lobNum() = col->lobNum();
lu->lobStorageType() = col->lobStorageType();
lu->lobStorageLocation() = col->lobStorageLocation();
@@ -5524,7 +5524,8 @@ RelExpr * HbaseInsert::preCodeGen(Generator * generator,
li->insertedTableSchemaName() += "\"";
// li->lobNum() = col->getPosition();
- li->lobSize() = srcValueId.getType().getPrecision();
+ // li->lobSize() = srcValueId.getType().getPrecision();
+ li->lobSize() = tgtValueId.getType().getPrecision();
li->lobFsType() = tgtValueId.getType().getFSDatatype();
li->lobNum() = col->lobNum();
@@ -5558,7 +5559,7 @@ RelExpr * HbaseInsert::preCodeGen(Generator * generator,
li->lobStorageType() = col->lobStorageType();
li->lobStorageLocation() = col->lobStorageLocation();
- li->lobSize() = srcValueId.getType().getPrecision();
+ li->lobSize() = tgtValueId.getType().getPrecision();
if (li->lobFsType() != tgtValueId.getType().getFSDatatype())
{
@@ -5582,7 +5583,8 @@ RelExpr * HbaseInsert::preCodeGen(Generator * generator,
getTableName().getSchemaName());
li->insertedTableSchemaName() += "\"";
- li->lobSize() = srcValueId.getType().getPrecision();
+ //li->lobSize() = srcValueId.getType().getPrecision();
+ li->lobSize() = tgtValueId.getType().getPrecision();
li->lobFsType() = tgtValueId.getType().getFSDatatype();
li->lobNum() = col->lobNum();
@@ -5596,7 +5598,7 @@ RelExpr * HbaseInsert::preCodeGen(Generator * generator,
} // lobinsert
GenAssert(li, "must have a LobInsert node");
-
+#ifdef __ignore
LOBload * ll = new(generator->wHeap())
LOBload(li->child(0), li->getObj());
ll->insertedTableObjectUID() = li->insertedTableObjectUID();
@@ -5607,6 +5609,7 @@ RelExpr * HbaseInsert::preCodeGen(Generator * generator,
ll->lobStorageLocation() = col->lobStorageLocation();
ll->bindNode(generator->getBindWA());
lobLoadExpr_.insert(ll->getValueId());
+#endif
} // lob
}
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/optimizer/ImplRule.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/ImplRule.cpp b/core/sql/optimizer/ImplRule.cpp
index 9f9f84a..35877a8 100644
--- a/core/sql/optimizer/ImplRule.cpp
+++ b/core/sql/optimizer/ImplRule.cpp
@@ -2134,6 +2134,9 @@ NABoolean HbaseDeleteRule::topMatch(RelExpr * relExpr, Context *context)
Delete * del = (Delete *) relExpr;
if (del->getTableDesc()->getNATable()->isHbaseTable() == FALSE)
return FALSE;
+
+ if (del->getTableDesc()->getNATable()->hasLobColumn())
+ return FALSE;
// HbaseDelete can only execute above DP2
if (context->getReqdPhysicalProperty()->executeInDP2())
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/parser/sqlparser.y
----------------------------------------------------------------------
diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y
index bef1ea4..36a8e5a 100755
--- a/core/sql/parser/sqlparser.y
+++ b/core/sql/parser/sqlparser.y
@@ -11441,29 +11441,27 @@ blob_type : TOK_BLOB blob_optional_left_len_right
}
}
-blob_optional_left_len_right: '(' TOK_LENGTH NUMERIC_LITERAL_EXACT_NO_SCALE optional_blob_unit ')'
+blob_optional_left_len_right: '(' NUMERIC_LITERAL_EXACT_NO_SCALE optional_blob_unit ')'
{
- Int64 longIntVal = atoInt64($3->data());
+ Int64 longIntVal = atoInt64($2->data());
if (longIntVal < 0)
{
// Error: Expected an unsigned integer
*SqlParser_Diags << DgSqlCode(-3017)
- << DgString0(*$3);
+ << DgString0(*$2);
}
- longIntVal = longIntVal * $4;
+ longIntVal = longIntVal * $3;
$$ = (Lng32)longIntVal;
- delete $3;
+ delete $2;
}
| empty
{
-
-
if (CmpCommon::getDefault(TRAF_BLOB_AS_VARCHAR) == DF_ON)
{
$$ = (Lng32)100000;
@@ -11471,15 +11469,15 @@ blob_optional_left_len_right: '(' TOK_LENGTH NUMERIC_LITERAL_EXACT_NO_SCALE opti
else
{
- $$ = (Lng32)CmpCommon::getDefaultNumeric(LOB_MAX_SIZE);
-
+ $$ = (Lng32)CmpCommon::getDefaultNumeric(LOB_MAX_SIZE)*1024*1024;
}
}
/* type int64 */
-optional_blob_unit : TOK_M {$$ = 1;}
- | TOK_G {$$ = 1024;}
+optional_blob_unit : TOK_K {$$ = 1024;}
+ | TOK_M {$$ = 1024*1024;}
+ | TOK_G {$$ = 1024*1024*1024;}
| empty {$$ = 1;}
/* type pCharLenSpec */
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/regress/executor/EXPECTED130
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/EXPECTED130 b/core/sql/regress/executor/EXPECTED130
index 635bf3f..89a7eb8 100644
--- a/core/sql/regress/executor/EXPECTED130
+++ b/core/sql/regress/executor/EXPECTED130
@@ -1,9 +1,8 @@
>>obey TEST130(setup);
+>>log;
>>create schema trafodion.lob130;
-*** ERROR[1022] Schema TRAFODION.LOB130 already exists.
-
---- SQL operation failed with errors.
+--- SQL operation complete.
>>set schema trafodion.lob130;
--- SQL operation complete.
@@ -55,9 +54,9 @@ C1
C1 C2
----------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------
- 1 LOBH00000200010160506607748957717919160506607754184039318212327892776672766020"TRAFODION"."LOB130"
- 2 LOBH00000200010160506607748957717919160506607754838939218212327892783226774020"TRAFODION"."LOB130"
- 3 LOBH00000200010160506607748957717919160506607755439166918212327892789099037020"TRAFODION"."LOB130"
+ 1 LOBH00000200010200982774330343097219200982774335666384818212328542081589586020"TRAFODION"."LOB130"
+ 2 LOBH00000200010200982774330343097219200982774336230243318212328542087163180020"TRAFODION"."LOB130"
+ 3 LOBH00000200010200982774330343097219200982774336733971718212328542092274951020"TRAFODION"."LOB130"
--- 3 row(s) selected.
>>
@@ -236,6 +235,13 @@ C1 (EXPR) (EXPR)
>>create table tlob130bin1 (c1 int not null, c2 blob, primary key (c1));
--- SQL operation complete.
+>>create table tlob130txt_limit50(c1 int not null, c2 clob(50), primary key (c1));
+
+--- SQL operation complete.
+>>create table tlob130bin_limit1K(c1 int not null, c2 blob(1 K), primary key (c1));
+
+--- SQL operation complete.
+>>
>>sh cp $scriptsdir/executor/deep.jpg $rundir/executor/;
>>sh cp $scriptsdir/executor/anoush.jpg $rundir/executor/;
>>sh cp $scriptsdir/executor/lob_input_* $rundir/executor/;
@@ -327,6 +333,18 @@ And the dish ran away with the fork !
--- 1 row(s) deleted.
>>
+>>--test limits
+>>
+>>insert into tlob130txt_limit50 values(1,filetolob('lob_input_e1.txt'));
+
+*** ERROR[8442] Unable to access ExpLOBInterfaceInsert interface. Call to ExpLOBInterfaceInsert returned error LOB_MAX_LIMIT_ERROR(560). Error detail 0.
+
+--- 0 row(s) inserted.
+>>insert into tlob130bin_limit1K values(1,filetolob('anoush.jpg'));
+
+*** ERROR[8442] Unable to access ExpLOBInterfaceInsert interface. Call to ExpLOBInterfaceInsert returned error LOB_MAX_LIMIT_ERROR(560). Error detail 0.
+
+--- 0 row(s) inserted.
>>--test extract
>>
>>log;
@@ -335,7 +353,7 @@ And the dish ran away with the fork !
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'tlob130_txt1.txt');/g" >> t130_extract_command;
>>
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200010160506607748961807619160506607793556765718212327893170320466020"TRAFODION"."LOB130"
' , 'tlob130_txt1.txt');
+>>extract lobtofile(LOB 'LOBH00000200010200982774330346590219200982774370093833718212328542425748115020"TRAFODION"."LOB130"
' , 'tlob130_txt1.txt');
Success. Targetfile :tlob130_txt1.txt Length : 19
--- SQL operation complete.
@@ -351,7 +369,7 @@ Success. Targetfile :tlob130_txt1.txt Length : 19
>>sh rm t130_extract_command;
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'tlob130_deep.jpg');/g" >> t130_extract_command;
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200010160506607748961871319160506607799384142018212327893228622566020"TRAFODION"."LOB130"
' , 'tlob130_deep.jpg');
+>>extract lobtofile(LOB 'LOBH00000200010200982774330346651219200982774376837892918212328542493209860020"TRAFODION"."LOB130"
' , 'tlob130_deep.jpg');
Success. Targetfile :tlob130_deep.jpg Length : 159018
--- SQL operation complete.
@@ -367,7 +385,7 @@ Success. Targetfile :tlob130_deep.jpg Length : 159018
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'tlob130_anoush.jpg');/g" >> t130_extract_command;
>>
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200010160506607748961871319160506607799384142018212327893228622566020"TRAFODION"."LOB130"
' , 'tlob130_anoush.jpg');
+>>extract lobtofile(LOB 'LOBH00000200010200982774330346651219200982774376837892918212328542493209860020"TRAFODION"."LOB130"
' , 'tlob130_anoush.jpg');
Success. Targetfile :tlob130_anoush.jpg Length : 230150
--- SQL operation complete.
@@ -486,7 +504,7 @@ And the dish ran away with the fork !
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'hdfs:\/\/\/lobs\/tlob130_txt2.txt');/g" >> t130_extract_command;
>>
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200010160506607748963384219160506607810848333618212327893343345213020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_txt2.txt');
+>>extract lobtofile(LOB 'LOBH00000200010200982774330347819519200982774383085167918212328542555756185020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_txt2.txt');
Success. Targetfile :hdfs:///lobs/tlob130_txt2.txt Length : 19
--- SQL operation complete.
@@ -502,7 +520,7 @@ Success. Targetfile :hdfs:///lobs/tlob130_txt2.txt Length : 19
>>sh rm t130_extract_command;
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'hdfs:\/\/\/lobs\/tlob130_deep.jpg');/g" >> t130_extract_command;
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200010160506607748963441819160506607816983409518212327893404603891020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_deep.jpg');
+>>extract lobtofile(LOB 'LOBH00000200010200982774330347890419200982774389242411018212328542617280373020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_deep.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_deep.jpg Length : 159018
--- SQL operation complete.
@@ -518,7 +536,7 @@ Success. Targetfile :hdfs:///lobs/tlob130_deep.jpg Length : 159018
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'hdfs:\/\/\/lobs\/tlob130_anoush.jpg');/g" >> t130_extract_command;
>>
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200010160506607748961871319160506607799384142018212327893228622566020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush.jpg');
+>>extract lobtofile(LOB 'LOBH00000200010200982774330346651219200982774376837892918212328542493209860020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_anoush.jpg Length : 230150
--- SQL operation complete.
@@ -537,7 +555,7 @@ Column Name : c2
Input a filename to extract to :
Output File Name : lobc2out.jpg
Extracting lob handle for column c2...
-LOB handle for c2: LOBH00000200010160506607748961871319160506607799384142018212327893228622566020"TRAFODION"."LOB130"
+LOB handle for c2: LOBH00000200010200982774330346651219200982774376837892918212328542493209860020"TRAFODION"."LOB130"
Extracting LOB data length for the above handle...
LOB data length :230150
Extracting lob data into file in chunks of 1000 ...
@@ -815,7 +833,7 @@ And the dish ran away with the spoon.
>>sh rm t130_extract_command;
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'tlob130_deep2.jpg');/g" >> t130_extract_command;
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200020160506607748966408219160506607839495747018212327893629846746020"TRAFODION"."LOB130"
' , 'tlob130_deep2.jpg');
+>>extract lobtofile(LOB 'LOBH00000200020200982774330349738319200982774400272091018212328542727572065020"TRAFODION"."LOB130"
' , 'tlob130_deep2.jpg');
Success. Targetfile :tlob130_deep2.jpg Length : 159018
--- SQL operation complete.
@@ -824,7 +842,7 @@ Success. Targetfile :tlob130_deep2.jpg Length : 159018
>>sh rm t130_extract_command;
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'hdfs:\/\/\/lobs\/tlob130_anoush2.jpg');/g" >> t130_extract_command;
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200030160506607748966408219160506607840033733218212327893635194706020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush2.jpg');
+>>extract lobtofile(LOB 'LOBH00000200030200982774330349738319200982774400783874418212328542732607600020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush2.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_anoush2.jpg Length : 230150
--- SQL operation complete.
@@ -851,7 +869,7 @@ Hey diddle diddle,
>>sh rm t130_extract_command;
>>sh grep "^LOBH" TMP130 | sed "s/^/extract lobtofile(LOB '/g" | sed "s/$/' , 'tlob130_anoush3.jpg',create,truncate);/g" >> t130_extract_command;
>>obey t130_extract_command;
->>extract lobtofile(LOB 'LOBH00000200030160506607748966808919160506607844025980618212327893675073401020"TRAFODION"."LOB130"
' , 'tlob130_anoush3.jpg',create,truncate);
+>>extract lobtofile(LOB 'LOBH00000200030200982774330350112719200982774404493754218212328542769759826020"TRAFODION"."LOB130"
' , 'tlob130_anoush3.jpg',create,truncate);
Success. Targetfile :tlob130_anoush3.jpg Length : 230150
--- SQL operation complete.
@@ -958,17 +976,17 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT
ColumnName : C2
Lob Location : /lobs
- LOB Data File: LOBP_01605066077489701952_0001
+ LOB Data File: LOBP_02009827743303525717_0001
LOB EOD : 15
LOB Used Len : 15
ColumnName : C3
Lob Location : /lobs
- LOB Data File: LOBP_01605066077489701952_0002
+ LOB Data File: LOBP_02009827743303525717_0002
LOB EOD : 15
LOB Used Len : 15
ColumnName : C4
Lob Location : /lobs
- LOB Data File: LOBP_01605066077489701952_0003
+ LOB Data File: LOBP_02009827743303525717_0003
LOB EOD : 45
LOB Used Len : 45
@@ -978,9 +996,9 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT
CATALOG_NAME SCHEMA_NAME OBJECT_NAME COLUMN_NAME
LOB_LOCATION LOB_DATA_FILE LOB_DATA_FILE_SIZE_EOD LOB_DATA_FILE_SIZE_USED
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- -----------------------
-TRAFODION LOB130 TLOB130GT C2
/lobs LOBP_01605066077489701952_0001 15 15
-TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_01605066077489701952_0002 15 15
-TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_01605066077489701952_0003 45 45
+TRAFODION LOB130 TLOB130GT C2
/lobs LOBP_02009827743303525717_0001 15 15
+TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_02009827743303525717_0002 15 15
+TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_02009827743303525717_0003 45 45
--- 3 row(s) selected.
>>delete from tlob130gt where c1=2;
@@ -997,17 +1015,17 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT
ColumnName : C2
Lob Location : /lobs
- LOB Data File: LOBP_01605066077489701952_0001
+ LOB Data File: LOBP_02009827743303525717_0001
LOB EOD : 30
LOB Used Len : 25
ColumnName : C3
Lob Location : /lobs
- LOB Data File: LOBP_01605066077489701952_0002
+ LOB Data File: LOBP_02009827743303525717_0002
LOB EOD : 31
LOB Used Len : 26
ColumnName : C4
Lob Location : /lobs
- LOB Data File: LOBP_01605066077489701952_0003
+ LOB Data File: LOBP_02009827743303525717_0003
LOB EOD : 71
LOB Used Len : 56
@@ -1017,13 +1035,13 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT
CATALOG_NAME SCHEMA_NAME OBJECT_NAME COLUMN_NAME
LOB_LOCATION LOB_DATA_FILE LOB_DATA_FILE_SIZE_EOD LOB_DATA_FILE_SIZE_USED
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
--------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ---------------------- -----------------------
-TRAFODION LOB130 TLOB130GT C2
/lobs LOBP_01605066077489701952_0001 30 25
-TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_01605066077489701952_0002 31 26
-TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_01605066077489701952_0003 71 56
+TRAFODION LOB130 TLOB130GT C2
/lobs LOBP_02009827743303525717_0001 30 25
+TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_02009827743303525717_0002 31 26
+TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_02009827743303525717_0003 71 56
--- 3 row(s) selected.
>>
->>-- test to snsure all lob delpendent tables and schemas containing lob tables
+>>-- test to ensure all lob dependent tables and schemas containing lob tables
>>-- get dropped cleanly.
>>obey TEST130(lob_drop_table_schema);
>>log;
@@ -1047,9 +1065,9 @@ TRAFODION
Tables in Schema TRAFODION.LOBSCH
=================================
-LOBDescChunks__01605066077489712291_0001
-LOBDescHandle__01605066077489712291_0001
-LOBMD__01605066077489712291
+LOBDescChunks__02009827743303536445_0001
+LOBDescHandle__02009827743303536445_0001
+LOBMD__02009827743303536445
SB_HISTOGRAMS
SB_HISTOGRAM_INTERVALS
TLOB130TS2
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/regress/executor/FILTER130
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/FILTER130 b/core/sql/regress/executor/FILTER130
index ec0ab5c..908d222 100755
--- a/core/sql/regress/executor/FILTER130
+++ b/core/sql/regress/executor/FILTER130
@@ -28,7 +28,10 @@ fi
sed "
s/LOBH[0-9]*/@LOBHANDLE@/
s/LOBP_[0-9]*/@LOBP@/
-s/LOBDescChunks__[0-9]*/@LOBDescChunks@
-s/LOBDescHandle__[0-9]*/@LOBDescHandle@
-s/LOBMD__[0-9]*/@LOBMD@
+s/LOBDescChunks__[0-9]*/@LOBDescChunks@/
+s/LOBDescChunks__[0-9]_[0-9]_[0-9]*/@LOBDescChunks_PK@/
+s/LOBDescHandle__[0-9]*/@LOBDescHandle@/
+s/LOBMD__[0-9]*/@LOBMD@/
+s/LOBMD__[0-9]_[0-9]_[0-9]*/@LOBMD_PK@/
+s/TLOBI30TS2_[0-9]_[0-9]*/@TLOB130TS2_PK@/
" $fil
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/regress/executor/TEST130
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/TEST130 b/core/sql/regress/executor/TEST130
index 96b75b7..f05be1d 100755
--- a/core/sql/regress/executor/TEST130
+++ b/core/sql/regress/executor/TEST130
@@ -53,6 +53,9 @@ drop table t130lob4 cascade;
?section setup
+log;
+drop schema trafodion.lob130 cascade;
+log LOG130;
create schema trafodion.lob130;
set schema trafodion.lob130;
create table t130lob1 (c1 blob);
@@ -144,6 +147,7 @@ obey TEST130(lob_local_cleanup);
log;
drop table tlob130txt1;
drop table tlob130bin1;
+drop table tlob130_limit50;
sh rm TMP130;
sh rm tlob130txt1;
sh rm tlob130_txt1.txt;
@@ -158,6 +162,9 @@ log LOG130;
sh echo "Test for file input and extract";
create table tlob130txt1 (c1 int not null, c2 clob, primary key (c1));
create table tlob130bin1 (c1 int not null, c2 blob, primary key (c1));
+create table tlob130txt_limit50(c1 int not null, c2 clob(50), primary key (c1));
+create table tlob130bin_limit1K(c1 int not null, c2 blob(1 K), primary key (c1));
+
sh cp $scriptsdir/executor/deep.jpg $rundir/executor/;
sh cp $scriptsdir/executor/anoush.jpg $rundir/executor/;
sh cp $scriptsdir/executor/lob_input_* $rundir/executor/;
@@ -192,6 +199,10 @@ select lobtostring(c2, 200 ) from tlob130txt1;
delete from tlob130txt1 where c1 =2;
delete from tlob130txt1 where c1 =3;
+--test limits
+
+insert into tlob130txt_limit50 values(1,filetolob('lob_input_e1.txt'));
+insert into tlob130bin_limit1K values(1,filetolob('anoush.jpg'));
--test extract
log;
@@ -453,7 +464,7 @@ insert into tlob130gt values (2, stringtolob('xxxxxxxxxxxxxxx'), stringtolob('yy
get lob stats for table tlob130gt;
select * from table(lob stats(tlob130gt));
--- test to snsure all lob delpendent tables and schemas containing lob tables
+-- test to ensure all lob dependent tables and schemas containing lob tables
-- get dropped cleanly.
obey TEST130(lob_drop_table_schema);
?section lob_drop_table_schema
@@ -483,8 +494,11 @@ sh rm deep.jpg;
sh rm anoush.jpg;
drop table tlob130txt1;
drop table tlob130bin1;
+drop table tlob130txt_limit50;
+drop table tlob130bin_limit1K;
sh rm TMP130;
sh rm tlob130txt1;
+
sh rm tlob130_txt*.txt;
sh rm tlob130_deep*.jpg;
sh rm tlob130_anoush*.jpg;
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
index d37306b..d981e3a 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
@@ -632,7 +632,12 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode)
cliRC = cliInterface.executeImmediate(buf);
if (cliRC < 0 && cliRC != -CAT_OBJECT_DOES_NOT_EXIST_IN_TRAFODION)
- someObjectsCouldNotBeDropped = true;
+ {
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
+ }
}
// Drop libraries in the schema
@@ -654,7 +659,12 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode)
cliRC = cliInterface.executeImmediate(buf);
if (cliRC < 0 && cliRC != -CAT_OBJECT_DOES_NOT_EXIST_IN_TRAFODION)
- someObjectsCouldNotBeDropped = true;
+ {
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
+ }
}
}
@@ -680,7 +690,12 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode)
if (dropOneTable(cliInterface,(char*)catName.data(),
(char*)schName.data(),(char*)objName.data(),
isVolatile, FALSE,dropSchemaNode->ddlXns()))
- someObjectsCouldNotBeDropped = true;
+ {
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
+ }
}
}
}
@@ -710,7 +725,12 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode)
if (dropOneTable(cliInterface,(char*)catName.data(),
(char*)schName.data(),(char*)objName.data(),
isVolatile,TRUE, dropSchemaNode->ddlXns()))
- someObjectsCouldNotBeDropped = true;
+ {
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
+ }
}
}
}
@@ -750,7 +770,12 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode)
cliRC = cliInterface.executeImmediate(buf);
if (cliRC < 0 && cliRC != -CAT_OBJECT_DOES_NOT_EXIST_IN_TRAFODION)
- someObjectsCouldNotBeDropped = true;
+ {
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
+ }
}
}
@@ -790,7 +815,12 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode)
cliRC = cliInterface.executeImmediate(buf);
if (cliRC < 0 && cliRC != -CAT_OBJECT_DOES_NOT_EXIST_IN_TRAFODION)
- someObjectsCouldNotBeDropped = true;
+ {
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
+ }
}
}
@@ -807,7 +837,12 @@ void CmpSeabaseDDL::dropSeabaseSchema(StmtDDLDropSchema * dropSchemaNode)
if (dropOneTable(cliInterface,(char*)catName.data(),
(char*)schName.data(),(char*)objName.data(),
isVolatile, FALSE, dropSchemaNode->ddlXns()))
- someObjectsCouldNotBeDropped = true;
+ {
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
+ }
}
}
@@ -1339,7 +1374,7 @@ Lng32 cliRC = 0;
str_sprintf(buf,"DROP EXTERNAL TABLE \"%s\" FOR \"%s\".\"%s\".\"%s\" CASCADE",
objectName,catalogName,schemaName,objectName);
else
- str_sprintf(buf,"DROP %s %s TABLE \"%s\".\"%s\".\"%s\" CASCADE",
+ str_sprintf(buf,"DROP %s TABLE %s \"%s\".\"%s\".\"%s\" CASCADE",
volatileString, ifExistsString, catalogName,schemaName,objectName);
ULng32 savedParserFlags = Get_SqlParser_Flags(0xFFFFFFFF);
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/2ce2d0d2/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp b/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
index 8b579f4..713828e 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLtable.cpp
@@ -2200,11 +2200,13 @@ short CmpSeabaseDDL::createSeabaseTable2(
short *lobTypList = new (STMTHEAP) short[numCols];
char **lobLocList = new (STMTHEAP) char*[numCols];
Lng32 j = 0;
+ Int64 lobMaxSize = CmpCommon::getDefaultNumeric(LOB_MAX_SIZE)*1024*1024;
for (Int32 i = 0; i < colArray.entries(); i++)
{
ElemDDLColDef *column = colArray[i];
Lng32 datatype = column->getColumnDataType()->getFSDatatype();
+
if ((datatype == REC_BLOB) ||
(datatype == REC_CLOB))
{
@@ -2228,7 +2230,6 @@ short CmpSeabaseDDL::createSeabaseTable2(
}
}
- Int64 lobMaxSize = CmpCommon::getDefaultNumeric(LOB_MAX_SIZE)*1024*1024;
const char *lobHdfsServer = CmpCommon::getDefaultString(LOB_HDFS_SERVER);
Int32 lobHdfsPort = (Lng32)CmpCommon::getDefaultNumeric(LOB_HDFS_PORT);
[3/3] incubator-trafodion git commit: Merge remote branch
'origin/pr/453/head' into merge_453
Posted by sa...@apache.org.
Merge remote branch 'origin/pr/453/head' into merge_453
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/58a4000a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/58a4000a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/58a4000a
Branch: refs/heads/master
Commit: 58a4000a0e748a6083254ba7ecb02fc83f841ca0
Parents: 64a68cf 48875d0
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Mon May 2 15:28:13 2016 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Mon May 2 15:28:13 2016 +0000
----------------------------------------------------------------------
core/sql/exp/ExpLOB.cpp | 33 +++++++----
core/sql/exp/ExpLOB.h | 4 +-
core/sql/exp/ExpLOBinterface.cpp | 4 +-
core/sql/generator/GenItemFunc.cpp | 1 +
core/sql/generator/GenPreCode.cpp | 13 +++--
core/sql/optimizer/ImplRule.cpp | 3 +
core/sql/parser/sqlparser.y | 20 +++----
core/sql/regress/executor/EXPECTED130 | 82 ++++++++++++++++-----------
core/sql/regress/executor/FILTER130 | 9 ++-
core/sql/regress/executor/TEST130 | 16 +++++-
core/sql/sqlcomp/CmpSeabaseDDLschema.cpp | 43 +++++++++++---
core/sql/sqlcomp/CmpSeabaseDDLtable.cpp | 3 +-
12 files changed, 156 insertions(+), 75 deletions(-)
----------------------------------------------------------------------
[2/3] incubator-trafodion git commit: Merge remote branch
'origin/master' into lob_get_trace
Posted by sa...@apache.org.
Merge remote branch 'origin/master' into lob_get_trace
Conflicts:
core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/48875d0c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/48875d0c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/48875d0c
Branch: refs/heads/master
Commit: 48875d0cc931f0a73e02cbf271a6e7023ebb2bf7
Parents: 2ce2d0d 64a68cf
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Fri Apr 29 16:42:13 2016 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Fri Apr 29 16:42:13 2016 +0000
----------------------------------------------------------------------
.rat-excludes | 2 +
NOTICE | 2 +-
README | 2 +-
core/conn/jdbc_type2/native/SqlInterface.cpp | 5 -
.../src/org/trafodion/jdbc/t4/BaseRow.java | 65 --
.../src/org/trafodion/jdbc/t4/InsertRow.java | 82 ---
.../trafodion/jdbc/t4/InterfaceResultSet.java | 30 +-
.../src/org/trafodion/jdbc/t4/ObjectArray.java | 86 +++
.../src/org/trafodion/jdbc/t4/Row.java | 233 --------
.../src/org/trafodion/jdbc/t4/SecPwd.java | 9 -
.../trafodion/jdbc/t4/T4DatabaseMetaData.java | 26 +-
.../jdbc/t4/TrafT4PreparedStatement.java | 2 +-
.../org/trafodion/jdbc/t4/TrafT4ResultSet.java | 435 +++-----------
.../org/trafodion/jdbc/t4/TrafT4Statement.java | 2 +-
core/conn/odb/odb.sln | 28 +
core/conn/odb/odb/odb.vcxproj | 165 ++++++
core/conn/odb/odb/odb.vcxproj.filters | 36 ++
core/conn/odb/odb/odb.vcxproj.user | 4 +
core/conn/odb/src/memcpy_wrapper.c | 2 +
core/conn/odb/src/odb.c | 1 +
core/conn/odb/src/verslib.h | 3 +
core/conn/odb/src/versodb.c | 2 +
.../java/org/trafodion/rest/ServerResource.java | 2 +-
core/sqf/conf/install_features | 1 +
core/sqf/sqenvcom.sh | 27 +-
core/sqf/sql/scripts/get_libhdfs_files | 6 +-
core/sqf/sql/scripts/ilh_cleanhb | 31 +-
core/sqf/sql/scripts/install_local_hadoop | 8 +-
core/sqf/sql/scripts/sqnodestatus | 4 +-
core/sqf/src/seatrans/.gitignore | 3 +
.../hbase/client/ClientScanner98.java.tmpl | 490 +++++++++++++++
.../client/TrafParallelClientScanner.java.tmpl | 325 ++++++++++
.../hbase/client/transactional/RMInterface.java | 4 +-
.../transactional/SsccTransactionalTable.java | 8 +-
.../transactional/TransactionManager.java | 85 +--
.../transactional/TransactionalTable.java | 8 +-
.../transactional/TransactionalTableClient.java | 3 +-
.../regionserver/transactional/IdTmId.java | 10 -
core/sql/arkcmp/CmpContext.cpp | 4 +
core/sql/arkcmp/CmpContext.h | 1 +
core/sql/arkcmp/NATableSt.cpp | 30 +-
core/sql/bin/SqlciErrors.txt | 4 +-
core/sql/cli/CliExtern.cpp | 2 +-
core/sql/cli/Context.cpp | 8 +-
core/sql/cli/SQLCLIdev.h | 7 -
core/sql/cli/Statement.cpp | 7 +-
core/sql/cli/sqlcli.h | 6 +
core/sql/comexe/ComTdbHbaseAccess.h | 4 +
core/sql/common/CharType.cpp | 19 +-
core/sql/common/CharType.h | 5 +-
core/sql/common/ComResWords.cpp | 1 -
core/sql/common/arkcmp_proc.cpp | 24 +-
core/sql/executor/ExExeUtil.h | 4 +-
core/sql/executor/ExExeUtilVolTab.cpp | 26 +-
core/sql/executor/ExHbaseIUD.cpp | 6 +-
core/sql/executor/ExHbaseSelect.cpp | 3 +
core/sql/executor/ExHdfsScan.cpp | 12 +-
core/sql/executor/HBaseClient_JNI.cpp | 5 +-
core/sql/executor/HBaseClient_JNI.h | 1 +
core/sql/executor/ex_transaction.cpp | 7 +-
core/sql/exp/ExpErrorEnums.h | 1 +
core/sql/exp/ExpHbaseInterface.cpp | 4 +-
core/sql/exp/ExpHbaseInterface.h | 2 +
core/sql/exp/exp_clause.cpp | 12 +
core/sql/exp/exp_datetime.cpp | 28 +-
core/sql/exp/exp_datetime.h | 3 +-
core/sql/exp/exp_eval.cpp | 2 +-
core/sql/exp/exp_function.h | 2 +
core/sql/generator/GenExplain.cpp | 7 +
core/sql/generator/GenPreCode.cpp | 5 +
core/sql/generator/GenRelDCL.cpp | 4 +
core/sql/generator/GenRelScan.cpp | 76 ++-
core/sql/generator/Generator.cpp | 3 +
core/sql/generator/Generator.h | 2 +-
.../java/org/trafodion/libmgmt/FileMgmt.java | 1 +
core/sql/nskgmake/Makerules.mk | 6 +-
core/sql/optimizer/BindItemExpr.cpp | 6 +-
core/sql/optimizer/NATable.cpp | 23 +-
core/sql/optimizer/NATable.h | 4 +
core/sql/optimizer/RelScan.h | 5 +-
core/sql/optimizer/SchemaDB.cpp | 4 +
core/sql/parser/ParKeyWords.cpp | 1 -
core/sql/regress/compGeneral/TEST004 | 6 +-
core/sql/regress/core/EXPECTED005.SB | 8 +-
core/sql/regress/core/EXPECTED037.SB | 9 +-
core/sql/regress/core/FILTER116 | 1 +
core/sql/regress/core/TEST005 | 2 +-
core/sql/regress/executor/EXPECTED013.SB | 1 -
core/sql/regress/executor/EXPECTED140 | 440 +++++++++++++-
core/sql/regress/executor/TEST140 | 28 +-
core/sql/regress/fullstack2/EXPECTED062 | 3 -
core/sql/regress/fullstack2/EXPECTED062.RELEASE | 3 -
core/sql/regress/hive/EXPECTED009 | 2 +-
core/sql/regress/hive/TEST009 | 2 +-
core/sql/regress/seabase/EXPECTED010 | 460 ++++++--------
core/sql/regress/seabase/EXPECTED011 | 1 -
core/sql/regress/seabase/EXPECTED016 | 7 -
core/sql/regress/seabase/EXPECTED030 | 18 +-
core/sql/regress/seabase/TEST030 | 2 +
core/sql/regress/tools/sbdefs | 2 +-
core/sql/sqlci/SqlciEnv.cpp | 8 +-
core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp | 4 +-
core/sql/sqlcomp/CmpSeabaseDDLschema.cpp | 111 +++-
core/sql/sqlcomp/DefaultConstants.h | 5 +
core/sql/sqlcomp/nadefaults.cpp | 25 +-
.../java/org/trafodion/sql/HTableClient.java | 7 +-
dcs/src/assembly/all.xml | 1 +
docs/src/site/markdown/index.md | 2 +-
docs/src/site/resources/css/site.css | 5 +
docs/src/site/site.xml | 6 +-
install/Makefile | 2 +-
install/installer/acceptKeys | 61 ++
install/installer/traf_add_sudoAccess | 10 +-
install/installer/traf_apache_mods | 247 ++++++++
install/installer/traf_cloudera_mods | 397 +++++++++++++
install/installer/traf_cloudera_mods98 | 418 -------------
install/installer/traf_config_check | 92 ++-
install/installer/traf_config_setup | 307 ++++++++--
install/installer/traf_getHadoopNodes | 1 -
install/installer/traf_getMultiHadoopNodes | 145 +++++
install/installer/traf_hortonworks_mods | 572 ++++++++++++++++++
install/installer/traf_hortonworks_mods98 | 592 -------------------
install/installer/traf_package_setup | 2 +-
install/installer/trafodion_install | 35 +-
.../odbcclient/DSNConverter/DSNConverter.def | 2 +-
win-odbc64/odbcclient/Drvr35Res/Drvr35Res.rc | 2 +-
.../TranslationDll/TranslationDll.def | 2 +-
.../odbcclient/TranslationDll/TranslationDll.rc | 2 +-
win-odbc64/odbcclient/drvr35/TCPIPV4/TCPIPV4.RC | 2 +-
win-odbc64/odbcclient/drvr35/TCPIPV6/TCPIPV6.RC | 2 +-
win-odbc64/odbcclient/drvr35/drvr35.rc | 2 +-
win-odbc64/odbcclient/drvr35adm/drvr35adm.rc | 2 +-
win-odbc64/odbcclient/drvr35msg/DrvMsg35.rc | 2 +-
133 files changed, 4253 insertions(+), 2439 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/48875d0c/core/sql/generator/GenPreCode.cpp
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/48875d0c/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
----------------------------------------------------------------------
diff --cc core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
index d981e3a,c103714..56f6e11
--- a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp
@@@ -633,10 -632,8 +632,11 @@@ void CmpSeabaseDDL::dropSeabaseSchema(S
cliRC = cliInterface.executeImmediate(buf);
if (cliRC < 0 && cliRC != -CAT_OBJECT_DOES_NOT_EXIST_IN_TRAFODION)
{
+ appendErrorObjName(errorObjs, objName);
- someObjectsCouldNotBeDropped = true;
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
}
}
@@@ -660,10 -657,8 +660,12 @@@
if (cliRC < 0 && cliRC != -CAT_OBJECT_DOES_NOT_EXIST_IN_TRAFODION)
{
+ appendErrorObjName(errorObjs, objName);
- someObjectsCouldNotBeDropped = true;
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
++
}
}
}
@@@ -691,10 -686,8 +693,11 @@@
(char*)schName.data(),(char*)objName.data(),
isVolatile, FALSE,dropSchemaNode->ddlXns()))
{
+ appendErrorObjName(errorObjs, objName.data());
- someObjectsCouldNotBeDropped = true;
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
}
}
}
@@@ -726,10 -719,8 +729,11 @@@
(char*)schName.data(),(char*)objName.data(),
isVolatile,TRUE, dropSchemaNode->ddlXns()))
{
+ appendErrorObjName(errorObjs, objName.data());
- someObjectsCouldNotBeDropped = true;
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
}
}
}
@@@ -770,11 -761,9 +774,13 @@@
cliRC = cliInterface.executeImmediate(buf);
if (cliRC < 0 && cliRC != -CAT_OBJECT_DOES_NOT_EXIST_IN_TRAFODION)
- {
+ {
+ appendErrorObjName(errorObjs, objName);
- someObjectsCouldNotBeDropped = true;
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
++
}
}
}
@@@ -816,10 -805,8 +822,12 @@@
if (cliRC < 0 && cliRC != -CAT_OBJECT_DOES_NOT_EXIST_IN_TRAFODION)
{
+ appendErrorObjName(errorObjs, objName);
- someObjectsCouldNotBeDropped = true;
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
++
}
}
}
@@@ -838,10 -825,8 +846,12 @@@
(char*)schName.data(),(char*)objName.data(),
isVolatile, FALSE, dropSchemaNode->ddlXns()))
{
+ appendErrorObjName(errorObjs, objName.data());
- someObjectsCouldNotBeDropped = true;
++
+ if (dropSchemaNode->ddlXns())
+ goto label_error;
+ else
+ someObjectsCouldNotBeDropped = true;
}
}
}