new COMMENT-ON SQL statement: fix showddl schema error 1. fix error while showddl schema with comment
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/69c284c6 Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/69c284c6 Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/69c284c6 Branch: refs/heads/master Commit: 69c284c607fe965623ed16342df73f96200d38f5 Parents: 078ed10 Author: eedy <[email protected]> Authored: Thu Nov 2 18:02:41 2017 +0800 Committer: eedy <[email protected]> Committed: Thu Nov 2 18:02:41 2017 +0800 ---------------------------------------------------------------------- core/sql/sqlcomp/CmpSeabaseDDLschema.cpp | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/69c284c6/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp ---------------------------------------------------------------------- diff --git a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp index dd35222..3cc4c93 100644 --- a/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp +++ b/core/sql/sqlcomp/CmpSeabaseDDLschema.cpp @@ -445,7 +445,15 @@ Int16 status = ComUser::getAuthNameFromAuthID(objectOwner,username, output += catalogName.data(); output += "\".\""; output += schemaName.data(); -// Disaply Comment of schema + +// AUTHORIZATION clause is rarely used, but include it for replay. + output += "\" AUTHORIZATION \""; + output += username; + output += "\";"; + + outlines.push_back(output.data()); + + // Disaply Comment of schema { ComTdbVirtObjCommentInfo * objCommentInfo = NULL; cmpSBD.getSeabaseObjectComment(schemaUID, objectType, objCommentInfo); @@ -468,13 +476,6 @@ Int16 status = ComUser::getAuthNameFromAuthID(objectOwner,username, } -// AUTHORIZATION clause is rarely used, but include it for replay. - output += "\" AUTHORIZATION \""; - output += username; - output += "\";"; - - outlines.push_back(output.data()); - cmpSBD.switchBackCompiler(); return true;
