You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by se...@apache.org on 2018/04/06 16:07:36 UTC

[6/7] trafodion git commit: Changes to report the error -1571 and -1572 correctly.

Changes to report the error -1571 and -1572 correctly.


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

Branch: refs/heads/master
Commit: c9b09aab38970fd4875ac940ec6624f74ebe9d37
Parents: 3b54b36
Author: selvaganesang <se...@esgyn.com>
Authored: Fri Apr 6 06:32:30 2018 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Fri Apr 6 06:32:30 2018 +0000

----------------------------------------------------------------------
 core/sql/exp/exp_function.cpp | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafodion/blob/c9b09aab/core/sql/exp/exp_function.cpp
----------------------------------------------------------------------
diff --git a/core/sql/exp/exp_function.cpp b/core/sql/exp/exp_function.cpp
index 75ffcf9..9a1e332 100644
--- a/core/sql/exp/exp_function.cpp
+++ b/core/sql/exp/exp_function.cpp
@@ -2238,21 +2238,21 @@ Lng32 ex_function_position::errorChecks(Lng32 startPos, Lng32 occurrence,
   // startPos is 1 based. Cannot be <= 0
   if (startPos < 0)
     {
-      ExRaiseSqlError(heap, diagsArea, (ExeErrorCode)1572);
+      ExRaiseSqlError(heap, diagsArea, -1572);
       *(*diagsArea) << DgString0("START POSITION") << DgString1("INSTR function"); 
       return -1;
     }
   
   if (startPos == 0)
     {
-      ExRaiseSqlError(heap, diagsArea, (ExeErrorCode)1571);
+      ExRaiseSqlError(heap, diagsArea, -1571);
       *(*diagsArea) << DgString0("START POSITION") << DgString1("INSTR function"); 
       return -1;
     }
   
   if (occurrence < 0)
     {
-      ExRaiseSqlError(heap, diagsArea, (ExeErrorCode)1572);
+      ExRaiseSqlError(heap, diagsArea, -1572);
       *(*diagsArea) << DgString0("OCCURRENCE") << DgString1("INSTR function"); 
 
       return -1;
@@ -2260,7 +2260,7 @@ Lng32 ex_function_position::errorChecks(Lng32 startPos, Lng32 occurrence,
   
   if (occurrence == 0)
     {
-      ExRaiseSqlError(heap, diagsArea, (ExeErrorCode)1571);
+      ExRaiseSqlError(heap, diagsArea, -1571);
       *(*diagsArea) << DgString0("OCCURRENCE") << DgString1("INSTR function"); 
 
       return -1;