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:49 UTC
[4/5] incubator-trafodion git commit: Improve error message for lob
functions called on invalid LOB types.
Improve error message for lob functions called on invalid LOB types.
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/5d5aa1f1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/5d5aa1f1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/5d5aa1f1
Branch: refs/heads/master
Commit: 5d5aa1f1e0baf6b09f951ddcb6d3187c44f405bb
Parents: 6c63255
Author: Sandhya Sundaresan <sa...@apache.org>
Authored: Thu May 12 18:02:28 2016 +0000
Committer: Sandhya Sundaresan <sa...@apache.org>
Committed: Thu May 12 18:02:28 2016 +0000
----------------------------------------------------------------------
core/sql/bin/SqlciErrors.txt | 1 +
core/sql/exp/ExpLOB.cpp | 5 +--
core/sql/regress/executor/EXPECTED130 | 60 +++++++++++++++---------------
3 files changed, 33 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5d5aa1f1/core/sql/bin/SqlciErrors.txt
----------------------------------------------------------------------
diff --git a/core/sql/bin/SqlciErrors.txt b/core/sql/bin/SqlciErrors.txt
index 198a5d9..cf532fe 100644
--- a/core/sql/bin/SqlciErrors.txt
+++ b/core/sql/bin/SqlciErrors.txt
@@ -1549,6 +1549,7 @@ $1~String1 --------------------------------
8431 22026 99999 BEGINNER MINOR LOGONLY The string parameters have different length, they must be equal (IsBitwiseAndTrue function).
8432 22003 99999 BEGINNER MINOR LOGONLY A negative value cannot be converted to an unsigned numeric datatype.$0~string0
8433 22003 99999 BEGINNER MINOR LOGONLY Invalid $0~string0 character encountered in $1~string1.
+8434 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Invalid target column for LOB function. The column needs to be blob/clob type.
8440 ZZZZZ 99999 BEGINNER MAJOR DBADMIN The size of the history buffer is too small to execute one or more of the OLAP Windowed Functions in the query.
8441 ZZZZZ 99999 BEGINNER MAJOR DBADMIN one or more of the OLAP Windowed Functions in the query may require overflow which is not supported yet.
8442 ZZZZZ 99999 BEGINNER MAJOR DBADMIN Unable to access $0~string0 interface. Call to $1~string1 returned error $2~string2($0~int0). Error detail $1~int1.
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5d5aa1f1/core/sql/exp/ExpLOB.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/ExpLOB.cpp b/core/sql/exp/ExpLOB.cpp
index 6b68cda..1d28e76 100644
--- a/core/sql/exp/ExpLOB.cpp
+++ b/core/sql/exp/ExpLOB.cpp
@@ -715,10 +715,9 @@ ex_expr::exp_return_type ExpLOBiud::insertDesc(char *op_data[],
{
Int32 intparam = LOB_PTR_ERROR;
Int32 detailError = 0;
+
ExRaiseSqlError(h, diagsArea,
- (ExeErrorCode)(8442), NULL, &intparam,
- &detailError, NULL, (char*)"ExpLOB",
- (char*)"ExpLOB",getLobErrStr(intparam));
+ (ExeErrorCode)(8434));
return ex_expr::EXPR_ERROR;
}
char tgtLobNameBuf[100];
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/5d5aa1f1/core/sql/regress/executor/EXPECTED130
----------------------------------------------------------------------
diff --git a/core/sql/regress/executor/EXPECTED130 b/core/sql/regress/executor/EXPECTED130
index 539520d..559ab3d 100644
--- a/core/sql/regress/executor/EXPECTED130
+++ b/core/sql/regress/executor/EXPECTED130
@@ -53,9 +53,9 @@ C1
C1 C2
----------- ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
----------------------------------------
- 1 LOBH00000200010174411644515655873419174411644521336869718212329621953026085020"TRAFODION"."LOB130"
- 2 LOBH00000200010174411644515655873419174411644521959458518212329621959347628020"TRAFODION"."LOB130"
- 3 LOBH00000200010174411644515655873419174411644522523598418212329621965032495020"TRAFODION"."LOB130"
+ 1 LOBH0000020001004189324641697287771841893246425245100618212329831345920804020"TRAFODION"."LOB130"
+ 2 LOBH0000020001004189324641697287771841893246425934955118212329831352829499020"TRAFODION"."LOB130"
+ 3 LOBH0000020001004189324641697287771841893246426607595418212329831359482435020"TRAFODION"."LOB130"
--- 3 row(s) selected.
>>
@@ -136,12 +136,12 @@ inserted row13
>>
>>values (filetolob('./myfile.txt'));
-*** ERROR[8442] Unable to access ExpLOB interface. Call to ExpLOB returned error LOB_PTR_ERROR(532). Error detail 0.
+*** ERROR[8434] Invalid target column for LOB function. The column needs to be blob/clob type.
--- 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.
+*** ERROR[8434] Invalid target column for LOB function. The column needs to be blob/clob type.
--- 0 row(s) selected.
>>
@@ -405,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 'LOBH00000200010174411644515659844819174411644560592935118212329622345767176020"TRAFODION"."LOB130"
' , 'tlob130_txt1.txt');
+>>extract lobtofile(LOB 'LOBH0000020001004189324641697728661841893246469679111318212329831790039318020"TRAFODION"."LOB130"
' , 'tlob130_txt1.txt');
Success. Targetfile :tlob130_txt1.txt Length : 19
--- SQL operation complete.
@@ -421,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 'LOBH00000200010174411644515659901219174411644566666650118212329622406368505020"TRAFODION"."LOB130"
' , 'tlob130_deep.jpg');
+>>extract lobtofile(LOB 'LOBH0000020001004189324641697740091841893246476763912418212329831861079469020"TRAFODION"."LOB130"
' , 'tlob130_deep.jpg');
Success. Targetfile :tlob130_deep.jpg Length : 159018
--- SQL operation complete.
@@ -437,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 'LOBH00000200010174411644515659901219174411644566666650118212329622406368505020"TRAFODION"."LOB130"
' , 'tlob130_anoush.jpg');
+>>extract lobtofile(LOB 'LOBH0000020001004189324641697740091841893246476763912418212329831861079469020"TRAFODION"."LOB130"
' , 'tlob130_anoush.jpg');
Success. Targetfile :tlob130_anoush.jpg Length : 230150
--- SQL operation complete.
@@ -557,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 'LOBH00000200010174411644515661071419174411644573078226018212329622470474042020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_txt2.txt');
+>>extract lobtofile(LOB 'LOBH0000020001004189324641697881271841893246483969435618212329831933168721020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_txt2.txt');
Success. Targetfile :hdfs:///lobs/tlob130_txt2.txt Length : 19
--- SQL operation complete.
@@ -573,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 'LOBH00000200010174411644515661134919174411644578658056718212329622526374024020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_deep.jpg');
+>>extract lobtofile(LOB 'LOBH0000020001004189324641697887901841893246489966084418212329831993222472020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_deep.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_deep.jpg Length : 159018
--- SQL operation complete.
@@ -589,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 'LOBH00000200010174411644515659901219174411644566666650118212329622406368505020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush.jpg');
+>>extract lobtofile(LOB 'LOBH0000020001004189324641697740091841893246476763912418212329831861079469020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_anoush.jpg Length : 230150
--- SQL operation complete.
@@ -608,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: LOBH00000200010174411644515659901219174411644566666650118212329622406368505020"TRAFODION"."LOB130"
+LOB handle for c2: LOBH0000020001004189324641697740091841893246476763912418212329831861079469020"TRAFODION"."LOB130"
Extracting LOB data length for the above handle...
LOB data length :230150
Extracting lob data into file in chunks of 1000 ...
@@ -887,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 'LOBH00000200020174411644515663207219174411644593292373218212329622672767293020"TRAFODION"."LOB130"
' , 'tlob130_deep2.jpg');
+>>extract lobtofile(LOB 'LOBH0000020002004189324641698186921841893246513487795918212329832228396943020"TRAFODION"."LOB130"
' , 'tlob130_deep2.jpg');
Success. Targetfile :tlob130_deep2.jpg Length : 159018
--- SQL operation complete.
@@ -896,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 'LOBH00000200030174411644515663207219174411644593791498318212329622677670087020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush2.jpg');
+>>extract lobtofile(LOB 'LOBH0000020003004189324641698186921841893246514064150018212329832234149116020"TRAFODION"."LOB130"
' , 'hdfs:///lobs/tlob130_anoush2.jpg');
Success. Targetfile :hdfs:///lobs/tlob130_anoush2.jpg Length : 230150
--- SQL operation complete.
@@ -923,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 'LOBH00000200030174411644515663628119174411644597843356218212329622718269346020"TRAFODION"."LOB130"
' , 'tlob130_anoush3.jpg',create,truncate);
+>>extract lobtofile(LOB 'LOBH0000020003004189324641698240701841893246519888633218212329832292490829020"TRAFODION"."LOB130"
' , 'tlob130_anoush3.jpg',create,truncate);
Success. Targetfile :tlob130_anoush3.jpg Length : 230150
--- SQL operation complete.
@@ -1030,17 +1030,17 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT
ColumnName : C2
Lob Location : /lobs
- LOB Data File: LOBP_01744116445156660578_0001
+ LOB Data File: LOBP_00418932464169854392_0001
LOB EOD : 15
LOB Used Len : 15
ColumnName : C3
Lob Location : /lobs
- LOB Data File: LOBP_01744116445156660578_0002
+ LOB Data File: LOBP_00418932464169854392_0002
LOB EOD : 15
LOB Used Len : 15
ColumnName : C4
Lob Location : /lobs
- LOB Data File: LOBP_01744116445156660578_0003
+ LOB Data File: LOBP_00418932464169854392_0003
LOB EOD : 45
LOB Used Len : 45
@@ -1050,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_01744116445156660578_0001 15 15
-TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_01744116445156660578_0002 15 15
-TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_01744116445156660578_0003 45 45
+TRAFODION LOB130 TLOB130GT C2
/lobs LOBP_00418932464169854392_0001 15 15
+TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_00418932464169854392_0002 15 15
+TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_00418932464169854392_0003 45 45
--- 3 row(s) selected.
>>delete from tlob130gt where c1=2;
@@ -1069,17 +1069,17 @@ Lob Information for table: "TRAFODION".LOB130.TLOB130GT
ColumnName : C2
Lob Location : /lobs
- LOB Data File: LOBP_01744116445156660578_0001
+ LOB Data File: LOBP_00418932464169854392_0001
LOB EOD : 30
LOB Used Len : 25
ColumnName : C3
Lob Location : /lobs
- LOB Data File: LOBP_01744116445156660578_0002
+ LOB Data File: LOBP_00418932464169854392_0002
LOB EOD : 31
LOB Used Len : 26
ColumnName : C4
Lob Location : /lobs
- LOB Data File: LOBP_01744116445156660578_0003
+ LOB Data File: LOBP_00418932464169854392_0003
LOB EOD : 71
LOB Used Len : 56
@@ -1089,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_01744116445156660578_0001 30 25
-TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_01744116445156660578_0002 31 26
-TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_01744116445156660578_0003 71 56
+TRAFODION LOB130 TLOB130GT C2
/lobs LOBP_00418932464169854392_0001 30 25
+TRAFODION LOB130 TLOB130GT C3
/lobs LOBP_00418932464169854392_0002 31 26
+TRAFODION LOB130 TLOB130GT C4
/lobs LOBP_00418932464169854392_0003 71 56
--- 3 row(s) selected.
>>
@@ -1120,9 +1120,9 @@ TRAFODION
Tables in Schema TRAFODION.LOBSCH
=================================
-LOBDescChunks__01744116445156670910_0001
-LOBDescHandle__01744116445156670910_0001
-LOBMD__01744116445156670910
+LOBDescChunks__00418932464169867513_0001
+LOBDescHandle__00418932464169867513_0001
+LOBMD__00418932464169867513
SB_HISTOGRAMS
SB_HISTOGRAM_INTERVALS
TLOB130TS2