trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sand...@apache.org
Subject [1/2] incubator-trafodion git commit: [TRAFODION-2202] in mode_special_4, sequence function is broken
Date Fri, 02 Sep 2016 21:24:23 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master f7ed14f03 -> c7bcf3050


[TRAFODION-2202] in mode_special_4, sequence function is broken


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

Branch: refs/heads/master
Commit: 8d75967c8bbb123f9c87718528c18d6a21143742
Parents: c581a16
Author: Liu Ming <ovis_poly@sina.com>
Authored: Fri Sep 2 14:10:31 2016 +0000
Committer: Liu Ming <ovis_poly@sina.com>
Committed: Fri Sep 2 14:10:31 2016 +0000

----------------------------------------------------------------------
 core/sql/cli/Cli.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/8d75967c/core/sql/cli/Cli.cpp
----------------------------------------------------------------------
diff --git a/core/sql/cli/Cli.cpp b/core/sql/cli/Cli.cpp
index d39eb51..24e8c4a 100644
--- a/core/sql/cli/Cli.cpp
+++ b/core/sql/cli/Cli.cpp
@@ -11599,7 +11599,7 @@ static Lng32 SeqGenCliInterfaceUpdAndValidate(
   if (! cliInterfaceArr[SEQ_PROCESS_QRY_IDX])
     {
       cliRC = SeqGenCliInterfacePrepQry(
-                                        "select  case when cast(? as largeint not null) =
1 then t.startVal else t.nextVal end, t.redefTS from (update %s.\"%s\".%s set next_value =
(case when cast(? as largeint not null) = 1 then start_value + cast(? as largeint not null)
else (case when next_value + cast(? as largeint not null) > max_value then max_value+1
else next_value + cast(? as largeint not null) end) end), num_calls = num_calls + 1 where
seq_uid = %Ld return old.start_value, old.next_value, old.redef_ts) t(startVal, nextVal, redefTS);",
+                                        "select  case when cast(? as largeint not null) =
1 then t.startVal else t.nextValue end, t.redefTS from (update %s.\"%s\".%s set next_value
= (case when cast(? as largeint not null) = 1 then start_value + cast(? as largeint not null)
else (case when next_value + cast(? as largeint not null) > max_value then max_value+1
else next_value + cast(? as largeint not null) end) end), num_calls = num_calls + 1 where
seq_uid = %Ld return old.start_value, old.next_value, old.redef_ts) t(startVal, nextValue,
redefTS);",
                                         SEQ_PROCESS_QRY_IDX,
                                         "SEQ_PROCESS_QRY_IDX",
                                         cliInterfaceArr, sga, myDiags, currContext, diags,
exHeap);


Mime
View raw message