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/13 07:37:48 UTC
[3/5] incubator-trafodion git commit: Better error message and test
addition in regressions.
Better error message and test addition in regressions.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/6c632551
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/6c632551
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/6c632551
Branch: refs/heads/master
Commit: 6c632551c26e9a2719efd795f475c52f4d194580
Parents: eb407a9
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Tue May 10 16:10:09 2016 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Tue May 10 16:10:09 2016 +0000
----------------------------------------------------------------------
core/sql/exp/ExpLOB.cpp | 3 +-
core/sql/regress/executor/EXPECTED130 | 77 +++++++++++++++++++-----------
core/sql/regress/executor/TEST130 | 3 +-
3 files changed, 51 insertions(+), 32 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/6c632551/core/sql/exp/ExpLOB.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOB.cpp b/core/sql/exp/ExpLOB.cpp
index 1a51628..6b68cda 100644
--- a/core/sql/exp/ExpLOB.cpp
+++ b/core/sql/exp/ExpLOB.cpp
@@ -714,9 +714,10 @@ ex_expr::exp_return_type ExpLOBiud::insertDesc(char *op_data[],
if (lobNum() == -1)
{
Int32 intparam = LOB_PTR_ERROR;
+ Int32 detailError = 0;
ExRaiseSqlError(h, diagsArea,
(ExeErrorCode)(8442), NULL, &intparam,
- NULL, NULL, (char*)"ExpLOB",
+ &detailError, NULL, (char*)"ExpLOB",
(char*)"ExpLOB",getLobErrStr(intparam));
return ex_expr::EXPR_ERROR;
}
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/6c632551/core/sql/regress/executor/EXPECTED130
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/EXPECTED130 b/core/sql/regress/executor/EXPECTED130
index bf7d45f..539520d 100644
--- a/core/sql/regress/executor/EXPECTED130
+++ b/core/sql/regress/executor/EXPECTED130
@@ -53,9 +53,9 @@ C1
C1 C2
----------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------
- 1 LOBH00000200010669695009493408479919669695009498814985418212329581527003582020"TRAFODION"."LOB130"
- 2 LOBH00000200010669695009493408479919669695009499452607918212329581533443121020"TRAFODION"."LOB130"
- 3 LOBH00000200010669695009493408479919669695009500088291418212329581539790325020"TRAFODION"."LOB130"
+ 1 LOBH00000200010174411644515655873419174411644521336869718212329621953026085020"TRAFODION"."LOB130"
+ 2 LOBH00000200010174411644515655873419174411644521959458518212329621959347628020"TRAFODION"."LOB130"
+ 3 LOBH00000200010174411644515655873419174411644522523598418212329621965032495020"TRAFODION"."LOB130"
--- 3 row(s) selected.
>>
@@ -91,6 +91,16 @@ C1 (EXPR)
--- 3 row(s) selected.
>>
+>>--test values clause
+>>values((select * from t130lob1));
+
+C1
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
---------------------------
+
+?
+
+--- 1 row(s) selected.
+>>
>>
>>?section dml_join
>>insert into t130lob3 values (1,stringtolob('inserted row21a'),stringtolob('inserted row21b'));
@@ -124,7 +134,16 @@ inserted row13
--- 3 row(s) selected.
>>
->>
+>>values (filetolob('./myfile.txt'));
+
+*** ERROR[8442] Unable to access ExpLOB interface. Call to ExpLOB returned error LOB_PTR_ERROR(532). Error detail 0.
+
+--- 0 row(s) selected.
+>>values( stringtolob('xxxxxx'));
+
+*** ERROR[8442] Unable to access ExpLOB interface. Call to ExpLOB returned error LOB_PTR_ERROR(532). Error detail 0.
+
+--- 0 row(s) selected.
>>
>>?section dml_update
>>
@@ -386,7 +405,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 'LOBH00000200010669695009493412345019669695009536909968118212329581908062051020"TRAFODION"."LOB130"
' , 'tlob130_txt1.txt');
+>>extract lobtofile(LOB 'LOBH00000200010174411644515659844819174411644560592935118212329622345767176020"TRAFODION"."LOB130"
' , 'tlob130_txt1.txt');
Success. Targetfile :tlob130_txt1.txt Length : 19
--- SQL operation complete.
@@ -402,7 +421,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 'LOBH00000200010669695009493412404519669695009543226997218212329581971119639020"TRAFODION"."LOB130"
' , 'tlob130_deep.jpg');
+>>extract lobtofile(LOB 'LOBH00000200010174411644515659901219174411644566666650118212329622406368505020"TRAFODION"."LOB130"
' , 'tlob130_deep.jpg');
Success. Targetfile :tlob130_deep.jpg Length : 159018
--- SQL operation complete.
@@ -418,7 +437,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 'LOBH00000200010669695009493412404519669695009543226997218212329581971119639020"TRAFODION"."LOB130"
' , 'tlob130_anoush.jpg');
+>>extract lobtofile(LOB 'LOBH00000200010174411644515659901219174411644566666650118212329622406368505020"TRAFODION"."LOB130"
' , 'tlob130_anoush.jpg');
Success. Targetfile :tlob130_anoush.jpg Length : 230150
--- SQL operation complete.
@@ -538,7 +557,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 'LOBH00000200010669695009493413536419669695009549202243618212329582030992428020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_txt2.txt');
+>>extract lobtofile(LOB 'LOBH00000200010174411644515661071419174411644573078226018212329622470474042020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_txt2.txt');
Success. Targetfile :hdfs:///lobs/tlob130_txt2.txt Length : 19
--- SQL operation complete.
@@ -554,7 +573,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 'LOBH00000200010669695009493413599619669695009555279429118212329582091774912020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_deep.jpg');
+>>extract lobtofile(LOB 'LOBH00000200010174411644515661134919174411644578658056718212329622526374024020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_deep.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_deep.jpg Length : 159018
--- SQL operation complete.
@@ -570,7 +589,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 'LOBH00000200010669695009493412404519669695009543226997218212329581971119639020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush.jpg');
+>>extract lobtofile(LOB 'LOBH00000200010174411644515659901219174411644566666650118212329622406368505020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_anoush.jpg Length : 230150
--- SQL operation complete.
@@ -589,7 +608,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: LOBH00000200010669695009493412404519669695009543226997218212329581971119639020"TRAFODION"."LOB130"
+LOB handle for c2: LOBH00000200010174411644515659901219174411644566666650118212329622406368505020"TRAFODION"."LOB130"
Extracting LOB data length for the above handle...
LOB data length :230150
Extracting lob data into file in chunks of 1000 ...
@@ -868,7 +887,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 'LOBH00000200020669695009493415412319669695009566298720718212329582202018367020"TRAFODION"."LOB130"
' , 'tlob130_deep2.jpg');
+>>extract lobtofile(LOB 'LOBH00000200020174411644515663207219174411644593292373218212329622672767293020"TRAFODION"."LOB130"
' , 'tlob130_deep2.jpg');
Success. Targetfile :tlob130_deep2.jpg Length : 159018
--- SQL operation complete.
@@ -877,7 +896,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 'LOBH00000200030669695009493415412319669695009566813234018212329582207185399020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush2.jpg');
+>>extract lobtofile(LOB 'LOBH00000200030174411644515663207219174411644593791498318212329622677670087020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush2.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_anoush2.jpg Length : 230150
--- SQL operation complete.
@@ -904,7 +923,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 'LOBH00000200030669695009493415804519669695009570711099518212329582246227037020"TRAFODION"."LOB130"
' , 'tlob130_anoush3.jpg',create,truncate);
+>>extract lobtofile(LOB 'LOBH00000200030174411644515663628119174411644597843356218212329622718269346020"TRAFODION"."LOB130"
' , 'tlob130_anoush3.jpg',create,truncate);
Success. Targetfile :tlob130_anoush3.jpg Length : 230150
--- SQL operation complete.
@@ -1011,17 +1030,17 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT
ColumnName : C2
Lob Location : /lobs
- LOB Data File: LOBP_06696950094934183379_0001
+ LOB Data File: LOBP_01744116445156660578_0001
LOB EOD : 15
LOB Used Len : 15
ColumnName : C3
Lob Location : /lobs
- LOB Data File: LOBP_06696950094934183379_0002
+ LOB Data File: LOBP_01744116445156660578_0002
LOB EOD : 15
LOB Used Len : 15
ColumnName : C4
Lob Location : /lobs
- LOB Data File: LOBP_06696950094934183379_0003
+ LOB Data File: LOBP_01744116445156660578_0003
LOB EOD : 45
LOB Used Len : 45
@@ -1031,9 +1050,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_06696950094934183379_0001 15 15
-TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_06696950094934183379_0002 15 15
-TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_06696950094934183379_0003 45 45
+TRAFODION LOB130 TLOB130GT C2
/lobs LOBP_01744116445156660578_0001 15 15
+TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_01744116445156660578_0002 15 15
+TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_01744116445156660578_0003 45 45
--- 3 row(s) selected.
>>delete from tlob130gt where c1=2;
@@ -1050,17 +1069,17 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT
ColumnName : C2
Lob Location : /lobs
- LOB Data File: LOBP_06696950094934183379_0001
+ LOB Data File: LOBP_01744116445156660578_0001
LOB EOD : 30
LOB Used Len : 25
ColumnName : C3
Lob Location : /lobs
- LOB Data File: LOBP_06696950094934183379_0002
+ LOB Data File: LOBP_01744116445156660578_0002
LOB EOD : 31
LOB Used Len : 26
ColumnName : C4
Lob Location : /lobs
- LOB Data File: LOBP_06696950094934183379_0003
+ LOB Data File: LOBP_01744116445156660578_0003
LOB EOD : 71
LOB Used Len : 56
@@ -1070,9 +1089,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_06696950094934183379_0001 30 25
-TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_06696950094934183379_0002 31 26
-TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_06696950094934183379_0003 71 56
+TRAFODION LOB130 TLOB130GT C2
/lobs LOBP_01744116445156660578_0001 30 25
+TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_01744116445156660578_0002 31 26
+TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_01744116445156660578_0003 71 56
--- 3 row(s) selected.
>>
@@ -1101,9 +1120,9 @@ TRAFODION
Tables in Schema TRAFODION.LOBSCH
=================================
-LOBDescChunks__06696950094934193691_0001
-LOBDescHandle__06696950094934193691_0001
-LOBMD__06696950094934193691
+LOBDescChunks__01744116445156670910_0001
+LOBDescHandle__01744116445156670910_0001
+LOBMD__01744116445156670910
SB_HISTOGRAMS
SB_HISTOGRAM_INTERVALS
TLOB130TS2
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/6c632551/core/sql/regress/executor/TEST130
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/TEST130 b/core/sql/regress/executor/TEST130
index 74e0cbb..e592526 100755
--- a/core/sql/regress/executor/TEST130
+++ b/core/sql/regress/executor/TEST130
@@ -75,7 +75,7 @@ select lobtostring(c2,2) from t130lob2;
select c1,lobtostring(c2,100) from t130lob2;
--test values clause
-values((select * from tlob130lob2));
+values((select * from t130lob1));
?section dml_join
@@ -91,7 +91,6 @@ select c1, lobtostring(c2,25), lobtostring(c3,25) from t130lob3;
select lobtostring(t130lob2.c2,30) from t130lob2, t130lob3 where t130lob2.c1 = t130lob3.c1;
-values(lobtostring(t130lob2.c2));
values (filetolob('./myfile.txt'));
values( stringtolob('xxxxxx'));