You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by hz...@apache.org on 2018/06/19 20:30:34 UTC
[1/2] trafodion git commit: [TRAFODION-3109] comment can not transfer
single quote normally in comment string
Repository: trafodion
Updated Branches:
refs/heads/master 7aa5eec47 -> 7bd498cb3
[TRAFODION-3109] comment can not transfer single quote normally in comment string
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/ffb9416d
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/ffb9416d
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/ffb9416d
Branch: refs/heads/master
Commit: ffb9416dba18beceeae2ff40cc09e63d052395b7
Parents: 1ee3de7
Author: zlei929 <z_...@163.com>
Authored: Fri Jun 15 17:30:56 2018 +0800
Committer: zlei929 <z_...@163.com>
Committed: Fri Jun 15 17:30:58 2018 +0800
----------------------------------------------------------------------
core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafodion/blob/ffb9416d/core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp b/core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp
index cc4b00e..411560d 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp
@@ -354,16 +354,21 @@ void CmpSeabaseDDL::doSeabaseCommentOn(StmtDDLCommentOn *commentOnNode,
if (comment.length() > 0)
{
+
+ //'removeConsecutiveQuotes' was done at the beginning of lexical analysis.
+ // so we should recovery it("'" ==> "''") in there to make insert successfully.
+ NAString quotedComment;
+ ToQuotedString(quotedComment, comment, FALSE);
+
//add or modify comment
char query[2048];
-
str_sprintf(query, "insert into %s.\"%s\".%s values (%ld, %d, %d, %d, 0, '%s') ; ",
getSystemCatalog(), SEABASE_MD_SCHEMA, SEABASE_TEXT,
objUID,
textType,
subID,
0,
- comment.data());
+ quotedComment.data());
cliRC = cliInterface.executeImmediate(query);
if (cliRC < 0)
[2/2] trafodion git commit: Merge [TRAFODION-3109] comment can not transfer single quote normally in co… PR-1610
Posted by hz...@apache.org.
Merge [TRAFODION-3109] comment can not transfer single quote normally in co… PR-1610
Project: http://git-wip-us.apache.org/repos/asf/trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafodion/commit/7bd498cb
Tree: http://git-wip-us.apache.org/repos/asf/trafodion/tree/7bd498cb
Diff: http://git-wip-us.apache.org/repos/asf/trafodion/diff/7bd498cb
Branch: refs/heads/master
Commit: 7bd498cb3229b7b61e64d851cae9841f2c2dc9e2
Parents: 7aa5eec ffb9416
Author: Hans Zeller <hz...@apache.org>
Authored: Tue Jun 19 20:30:09 2018 +0000
Committer: Hans Zeller <hz...@apache.org>
Committed: Tue Jun 19 20:30:09 2018 +0000
----------------------------------------------------------------------
core/sql/sqlcomp/CmpSeabaseDDLcommentOn.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------