trafodion-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dbirds...@apache.org
Subject [1/3] incubator-trafodion git commit: [TRAFODION-2603] Remove obsolete utilities and component privileges
Date Wed, 03 May 2017 15:29:40 GMT
Repository: incubator-trafodion
Updated Branches:
  refs/heads/master 994bb621e -> f3e222c32


[TRAFODION-2603] Remove obsolete utilities and component privileges


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

Branch: refs/heads/master
Commit: 98413903adf4ef66f91b17a87d43f7450c36dccf
Parents: d0c4d73
Author: Dave Birdsall <dbirdsall@apache.org>
Authored: Tue May 2 21:53:56 2017 +0000
Committer: Dave Birdsall <dbirdsall@apache.org>
Committed: Tue May 2 21:53:56 2017 +0000

----------------------------------------------------------------------
 core/sql/generator/GenPreCode.cpp               |   1 -
 core/sql/optimizer/RelExeUtil.cpp               |   3 +-
 core/sql/optimizer/RelExeUtil.h                 |   7 +-
 core/sql/parser/AllStmtDDL.h                    |   1 -
 core/sql/parser/BindStmtDDL.cpp                 |  26 --
 core/sql/parser/ElemDDLNode.cpp                 |   6 -
 core/sql/parser/ElemDDLNode.h                   |   2 -
 core/sql/parser/ParKeyWords.cpp                 |   2 -
 core/sql/parser/StmtDDLNode.cpp                 | 195 +-------------
 core/sql/parser/StmtDDLPublish.h                | 269 -------------------
 core/sql/parser/sqlparser.y                     |  98 -------
 core/sql/regress/seabase/EXPECTED024            |   6 +-
 core/sql/regress/seabase/TEST024                |   2 -
 core/sql/sqlcomp/CmpSeabaseDDL.h                |   2 -
 core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp        |  74 -----
 core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp |   9 +
 16 files changed, 13 insertions(+), 690 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/generator/GenPreCode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/generator/GenPreCode.cpp b/core/sql/generator/GenPreCode.cpp
index cb0dbb6..438464a 100644
--- a/core/sql/generator/GenPreCode.cpp
+++ b/core/sql/generator/GenPreCode.cpp
@@ -2810,7 +2810,6 @@ short DDLExpr::ddlXnsInfo(NABoolean &isDDLxn, NABoolean &xnCanBeStarted)
        (dropMDViews()) ||
        (initAuthorization()) ||
        (dropAuthorization()) ||
-       (addSeqTable()) ||
        (createRepos()) ||
        (dropRepos()) ||
        (upgradeRepos()) ||

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/optimizer/RelExeUtil.cpp
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/RelExeUtil.cpp b/core/sql/optimizer/RelExeUtil.cpp
index 4282500..8cc7ab5 100644
--- a/core/sql/optimizer/RelExeUtil.cpp
+++ b/core/sql/optimizer/RelExeUtil.cpp
@@ -269,7 +269,6 @@ RelExpr * DDLExpr::copyTopNode(RelExpr *derivedNode, CollHeap* outHeap)
   result->dropHbase_ = dropHbase_;
   result->updateVersion_ = updateVersion_;
   result->purgedataHbase_ = purgedataHbase_;
-  result->addSeqTable_ = addSeqTable_;
   result->addSchemaObjects_ = addSchemaObjects_;
 
   result->returnStatus_ = returnStatus_;
@@ -4059,7 +4058,7 @@ RelExpr * DDLExpr::bindNode(BindWA *bindWA)
     hbaseDDLNoUserXn_ = TRUE;
   }
   else if (initHbase_ || dropHbase_ || createMDViews() || dropMDViews() ||
-      addSeqTable() || addSchemaObjects() || updateVersion())
+      addSchemaObjects() || updateVersion())
   {
     isHbase_ = TRUE;
     hbaseDDLNoUserXn_ = TRUE;

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/optimizer/RelExeUtil.h
----------------------------------------------------------------------
diff --git a/core/sql/optimizer/RelExeUtil.h b/core/sql/optimizer/RelExeUtil.h
index 3445ee6..af15c1b 100644
--- a/core/sql/optimizer/RelExeUtil.h
+++ b/core/sql/optimizer/RelExeUtil.h
@@ -242,7 +242,6 @@ public:
     purgedataHbase_(FALSE),
     initAuthorization_(FALSE),
     dropAuthorization_(FALSE),
-    addSeqTable_(FALSE),
     addSchemaObjects_(FALSE),
     minimal_(FALSE),
     returnStatus_(FALSE),
@@ -257,7 +256,7 @@ public:
  DDLExpr(NABoolean initHbase, NABoolean dropHbase,
 	 NABoolean createMDviews, NABoolean dropMDviews,
          NABoolean initAuthorization, NABoolean dropAuthorization,
-	 NABoolean addSeqTable, NABoolean updateVersion, NABoolean addSchemaObjects,
+	 NABoolean /* formerly addSeqTable */ dummy, NABoolean updateVersion, NABoolean addSchemaObjects,
          NABoolean minimal,
 	 char * ddlStmtText,
 	 CharInfo::CharSet ddlStmtTextCharSet,
@@ -283,7 +282,6 @@ public:
     purgedataHbase_(FALSE),
     initAuthorization_(initAuthorization),
     dropAuthorization_(dropAuthorization),
-    addSeqTable_(addSeqTable),
     addSchemaObjects_(addSchemaObjects),
     minimal_(minimal),
     returnStatus_(FALSE),
@@ -323,7 +321,6 @@ public:
     purgedataHbase_(purgedataHbase),
     initAuthorization_(FALSE),
     dropAuthorization_(FALSE),
-    addSeqTable_(FALSE),
     addSchemaObjects_(FALSE),
     minimal_(FALSE),
     returnStatus_(FALSE),
@@ -396,7 +393,6 @@ public:
   NABoolean purgedataHbase() { return purgedataHbase_; }
   NABoolean initAuthorization() { return initAuthorization_; }
   NABoolean dropAuthorization() { return dropAuthorization_; }
-  NABoolean addSeqTable() { return addSeqTable_; }
   NABoolean addSchemaObjects() { return addSchemaObjects_; }
   NABoolean minimal() { return minimal_; }
 
@@ -497,7 +493,6 @@ public:
   NABoolean purgedataHbase_;
   NABoolean initAuthorization_;
   NABoolean dropAuthorization_;
-  NABoolean addSeqTable_;
   NABoolean addSchemaObjects_;
   NABoolean minimal_;  // meaningful only when initHbase_ is true; if this is true,
                        // means create the metadata tables only (and not repository etc.)

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/parser/AllStmtDDL.h
----------------------------------------------------------------------
diff --git a/core/sql/parser/AllStmtDDL.h b/core/sql/parser/AllStmtDDL.h
index 873c3bf..d966f78 100644
--- a/core/sql/parser/AllStmtDDL.h
+++ b/core/sql/parser/AllStmtDDL.h
@@ -55,7 +55,6 @@
 #include "StmtDDLGrant.h"
 #include "StmtDDLGrantComponentPrivilege.h"
 #include "StmtDDLSchGrant.h"
-#include "StmtDDLPublish.h"
 #include "StmtDDLInitializeSQL.h"
 #include "StmtDDLRevoke.h"
 #include "StmtDDLRevokeComponentPrivilege.h"

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/parser/BindStmtDDL.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/BindStmtDDL.cpp b/core/sql/parser/BindStmtDDL.cpp
index b81b317..9680bd6 100644
--- a/core/sql/parser/BindStmtDDL.cpp
+++ b/core/sql/parser/BindStmtDDL.cpp
@@ -2275,32 +2275,6 @@ StmtDDLSchGrant::bindNode(BindWA * pBindWA)
   return this;
 }
 
-
-// -----------------------------------------------------------------------
-// definition of method bindNode() for class StmtDDLPublish
-// -----------------------------------------------------------------------
-
-//
-// a virtual function for performing name
-// binding within the Publish tree
-//
-ExprNode *
-StmtDDLPublish::bindNode(BindWA * pBindWA)
-{
-  ComASSERT(pBindWA);
-  //  objectQualName_.applyDefaults(pBindWA->getDefaultSchema());
-  if (applyDefaultsAndValidateObject(pBindWA, &objectQualName_))
-    {
-      pBindWA->setErrStatus();
-      return this;
-    }
-
-  objectName_ = objectQualName_.getQualifiedNameAsAnsiString();
-
-  markAsBound();
-  return this;
-}
-
 // -----------------------------------------------------------------------
 // definition of method bindNode() for class StmtDDLGiveAll
 // -----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/parser/ElemDDLNode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/ElemDDLNode.cpp b/core/sql/parser/ElemDDLNode.cpp
index fe917b4..9d7bd9a 100644
--- a/core/sql/parser/ElemDDLNode.cpp
+++ b/core/sql/parser/ElemDDLNode.cpp
@@ -1715,12 +1715,6 @@ ElemDDLNode::castToStmtDDLSchGrant()
   return NULL;
 }
 
-StmtDDLPublish *
-ElemDDLNode::castToStmtDDLPublish()
-{
-  return NULL;
-}
-
 StmtDDLGiveAll *
 ElemDDLNode::castToStmtDDLGiveAll()
 {

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/parser/ElemDDLNode.h
----------------------------------------------------------------------
diff --git a/core/sql/parser/ElemDDLNode.h b/core/sql/parser/ElemDDLNode.h
index e24ce22..c9ef18b 100644
--- a/core/sql/parser/ElemDDLNode.h
+++ b/core/sql/parser/ElemDDLNode.h
@@ -328,7 +328,6 @@ class StmtDDLGiveSchema;
 class StmtDDLGrant;
 class StmtDDLGrantComponentPrivilege;
 class StmtDDLSchGrant;
-class StmtDDLPublish;
 class StmtDDLInitializeSQL;
 class StmtDDLReInitializeSQL;
 class StmtDDLRevoke;
@@ -670,7 +669,6 @@ public:
   virtual StmtDDLGrant                  * castToStmtDDLGrant();
   virtual StmtDDLGrantComponentPrivilege * castToStmtDDLGrantComponentPrivilege();
   virtual StmtDDLSchGrant		* castToStmtDDLSchGrant();
-  virtual StmtDDLPublish                * castToStmtDDLPublish();
   virtual StmtDDLReInitializeSQL        * castToStmtDDLReInitializeSQL();
   virtual StmtDDLInitializeSQL          * castToStmtDDLInitializeSQL();
   virtual StmtDDLRevoke                 * castToStmtDDLRevoke();

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/parser/ParKeyWords.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/ParKeyWords.cpp b/core/sql/parser/ParKeyWords.cpp
index b13b128..a599ec5 100644
--- a/core/sql/parser/ParKeyWords.cpp
+++ b/core/sql/parser/ParKeyWords.cpp
@@ -832,7 +832,6 @@ ParKeyWord ParKeyWords::keyWords_[] = {
   ParKeyWord("PROTECTION",         TOK_PROTECTION,  NONRESTOKEN_),  
   ParKeyWord("PROTOTYPE",          TOK_PROTOTYPE,   COMPAQ_|RESWORD_),
   ParKeyWord("PUBLIC",             TOK_PUBLIC,      ANS_|RESWORD_),
-  ParKeyWord("PUBLISH",            TOK_PUBLISH,     NONRESTOKEN_),
   ParKeyWord("PURGEDATA",          TOK_PURGEDATA,   NONRESTOKEN_),
   ParKeyWord("QID",                TOK_QID,         NONRESTOKEN_),
   ParKeyWord("QID_INTERNAL",       TOK_QID_INTERNAL,  NONRESTOKEN_),
@@ -1154,7 +1153,6 @@ ParKeyWord ParKeyWords::keyWords_[] = {
   ParKeyWord("UNLOCK",             TOK_UNLOCK,      NONRESTOKEN_),
   ParKeyWord("UNNAMED",            TOK_UNNAMED,     NONRESTOKEN_),
   ParKeyWord("UNNEST",             TOK_UNNEST,      COMPAQ_|RESWORD_),
-  ParKeyWord("UNPUBLISH",          TOK_UNPUBLISH,   NONRESTOKEN_),
   ParKeyWord("UNREGISTER",         TOK_UNREGISTER,  NONRESTOKEN_),
   ParKeyWord("UNSIGNED",           TOK_UNSIGNED,    NONRESTOKEN_),
   ParKeyWord("UPDATE",             TOK_UPDATE,      FIRST_|ANS_|RESWORD_|MPWORD_),

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/parser/StmtDDLNode.cpp
----------------------------------------------------------------------
diff --git a/core/sql/parser/StmtDDLNode.cpp b/core/sql/parser/StmtDDLNode.cpp
index fe13797..e61beef 100644
--- a/core/sql/parser/StmtDDLNode.cpp
+++ b/core/sql/parser/StmtDDLNode.cpp
@@ -24,7 +24,7 @@
  * File:         StmtDDLNode.C
  * Description:  member functions for classes StmtDDLNode, StmtDDLGrant,
  *               StmtDDLGrantArray, StmtDDLInitializeSQL, StmtDDLRevoke,
- *		 StmtDDLSchRevoke, StmtDDLPublish 
+ *		 StmtDDLSchRevoke
  *
  * Created:      3/9/95
  * Language:     C++
@@ -45,7 +45,6 @@
 #include "StmtDDLGrantArray.h"
 #include "StmtDDLSchGrant.h"
 #include "StmtDDLSchGrantArray.h"
-#include "StmtDDLPublish.h"
 #include "StmtDDLInitializeSQL.h"
 #include "StmtDDLRevoke.h"
 #include "StmtDDLSchRevoke.h"
@@ -1518,198 +1517,6 @@ StmtDDLSchRevoke::getText() const
 
 // LCOV_EXCL_STOP
 
-
-// -----------------------------------------------------------------------
-// member functions for class StmtDDLPublish
-// -----------------------------------------------------------------------
-
-//
-// constructor
-//
-
-StmtDDLPublish::StmtDDLPublish(ElemDDLNode * pPrivileges,
-                               const QualifiedName & objectName,
-                               const NAString & synonymName,
-                               ComBoolean isRole,
-                               ElemDDLNode * pGranteeList,
-                               ComBoolean isPublish,
-                               CollHeap    * heap)
-: StmtDDLNode(DDL_PUBLISH), 
-  objectName_(heap),
-  objectQualName_(objectName, heap),
-  synonymName_(synonymName, heap),
-  isSynonymNameSpec_(FALSE),
-  isRoleList_(isRole),
-  isPublish_(isPublish),
-  isAllPrivileges_(FALSE),
-  privActArray_(heap),
-  granteeArray_(heap)
-{
-  setChild(PUBLISH_PRIVILEGES, pPrivileges);
-  setChild(PUBLISH_GRANTEE_LIST, pGranteeList);
-  objectName_ = objectQualName_.getQualifiedNameAsAnsiString();
-
-  if (!synonymName.isNull())
-    isSynonymNameSpec_ = TRUE;
-
-  //
-  // inserts pointers to parse nodes representing privilege
-  // actions to privActArray_ so the user can access the
-  // information about privilege actions easier.
-  //
-
-  ComASSERT(pPrivileges NEQ NULL);
-  ElemDDLPrivileges * pPrivsNode = pPrivileges->castToElemDDLPrivileges();
-  ComASSERT(pPrivsNode NEQ NULL);
-  if (pPrivsNode->isAllPrivileges())
-  {
-    isAllPrivileges_ = TRUE;
-  }
-  else
-  {
-    ElemDDLNode * pPrivActs = pPrivsNode->getPrivilegeActionList();
-    for (CollIndex i = 0; i < pPrivActs->entries(); i++)
-    {
-      ElemDDLPrivAct *pPrivAct = (*pPrivActs)[i]->castToElemDDLPrivAct();
-      privActArray_.insert(pPrivAct);
-    }
-  }
-
-  //
-  // copies pointers to parse nodes representing grantee
-  // to granteeArray_ so the user can access the information
-  // easier.
-  //
-
-  ComASSERT(pGranteeList NEQ NULL);
-  for (CollIndex i = 0; i < pGranteeList->entries(); i++)
-  {
-    granteeArray_.insert((*pGranteeList)[i]->castToElemDDLGrantee());
-  }
-
-} // StmtDDLPublish::StmtDDLPublish()
-
-// virtual destructor
-StmtDDLPublish::~StmtDDLPublish()
-{
-  // delete all children
-  for (Int32 i = 0; i < getArity(); i++)
-  {
-    delete getChild(i);
-  }
-}
-
-// cast
-StmtDDLPublish *
-StmtDDLPublish::castToStmtDDLPublish()
-{
-  return this;
-}
-
-//
-// accessors
-//
-
-Int32
-StmtDDLPublish::getArity() const
-{
-  return MAX_STMT_DDL_PUBLISH_ARITY;
-}
-
-ExprNode *
-StmtDDLPublish::getChild(Lng32 index)
-{
-  ComASSERT(index >= 0 AND index < getArity());
-  return children_[index];
-}
-
-//
-// mutators
-//
-
-void
-StmtDDLPublish::setChild(Lng32 index, ExprNode * pChildNode)
-{
-  ComASSERT(index >= 0 AND index < getArity());
-  if (pChildNode NEQ NULL)
-  {
-    ComASSERT(pChildNode->castToElemDDLNode() NEQ NULL);
-    children_[index] = pChildNode->castToElemDDLNode();
-  }
-  else
-  {
-    children_[index] = NULL;
-  }
-}
-
-//
-// methods for tracing
-//
-
-// LCOV_EXCL_START
-
-const NAString
-StmtDDLPublish::displayLabel1() const
-{
-  return NAString("Object name: ") + getObjectName();
-}
-
-NATraceList
-StmtDDLPublish::getDetailInfo() const
-{
-  NAString        detailText;
-  NATraceList detailTextList;
-
-  //
-  // object name
-  //
-
-  detailTextList.append(displayLabel1());   // object name
-
-  //
-  // privileges
-  //
-
-  StmtDDLPublish * localThis = (StmtDDLPublish *)this;
-
-  detailTextList.append(localThis->getChild(PUBLISH_PRIVILEGES)
-                                 ->castToElemDDLNode()
-                                 ->castToElemDDLPrivileges()
-                                 ->getDetailInfo());
-  // grantee list
-  //
-
-  const ElemDDLGranteeArray & granteeArray = getGranteeArray();
-
-  detailText = "Grantee list [";
-  detailText += LongToNAString((Lng32)granteeArray.entries());
-  detailText += " element(s)]";
-  detailTextList.append(detailText);
-
-  for (CollIndex i = 0; i < granteeArray.entries(); i++)
-  {
-    detailText = "[grantee ";
-    detailText += LongToNAString((Lng32)i);
-    detailText += "]";
-    detailTextList.append(detailText);
-
-    ComASSERT(granteeArray[i] NEQ NULL AND
-              granteeArray[i]->castToElemDDLGrantee() NEQ NULL);
-    detailTextList.append("    ", granteeArray[i]->castToElemDDLGrantee()
-                                                 ->getDetailInfo());
-  }
-  return detailTextList;
-
-} // StmtDDLPublish::getDetailInfo
-
-const NAString
-StmtDDLPublish::getText() const
-{
-  return "StmtDDLPublish";
-}
-
-// LCOV_EXCL_STOP
-
 // -----------------------------------------------------------------------
 // methods for class StmtDDLRegisterComponent
 // -----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/parser/StmtDDLPublish.h
----------------------------------------------------------------------
diff --git a/core/sql/parser/StmtDDLPublish.h b/core/sql/parser/StmtDDLPublish.h
deleted file mode 100644
index 3bfb4d9..0000000
--- a/core/sql/parser/StmtDDLPublish.h
+++ /dev/null
@@ -1,269 +0,0 @@
-#ifndef STMTDDLPUBLISH_H
-#define STMTDDLPUBLISH_H
-/* -*-C++-*-
- *****************************************************************************
- *
- * File:         StmtDDLPublish.h
- * Description:  class for parse nodes representing Publish DDL statements
- *
- *
- * Created:      6/3/2009
- * Language:     C++
- *
- *
-// @@@ START COPYRIGHT @@@
-//
-// Licensed to the Apache Software Foundation (ASF) under one
-// or more contributor license agreements.  See the NOTICE file
-// distributed with this work for additional information
-// regarding copyright ownership.  The ASF licenses this file
-// to you under the Apache License, Version 2.0 (the
-// "License"); you may not use this file except in compliance
-// with the License.  You may obtain a copy of the License at
-//
-//   http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing,
-// software distributed under the License is distributed on an
-// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-// KIND, either express or implied.  See the License for the
-// specific language governing permissions and limitations
-// under the License.
-//
-// @@@ END COPYRIGHT @@@
- *
- *
- *****************************************************************************
- */
-
-
-#include "ElemDDLGranteeArray.h"
-#include "ElemDDLPrivActions.h"
-#include "StmtDDLNode.h"
-
-// -----------------------------------------------------------------------
-// contents of this file
-// -----------------------------------------------------------------------
-class StmtDDLPublish;
-
-// -----------------------------------------------------------------------
-// forward references
-// -----------------------------------------------------------------------
-// None
-
-// -----------------------------------------------------------------------
-// definition of class StmtDDLPublish
-// -----------------------------------------------------------------------
-class StmtDDLPublish : public StmtDDLNode
-{
-
-public:
-
-  // constructor
-  StmtDDLPublish(ElemDDLNode * pPrivileges,
-               const QualifiedName & objectName,
-               const NAString & synonymName,
-               NABoolean isRole,
-               ElemDDLNode * pGranteeList,
-               NABoolean isPublish,
-               CollHeap    * heap = PARSERHEAP());
-  
-  // virtual destructor
-  virtual ~StmtDDLPublish();
-
-  // cast
-  virtual StmtDDLPublish * castToStmtDDLPublish();
-
-  //
-  // accessors
-  //
-
-  virtual Int32 getArity() const;
-  virtual ExprNode * getChild(Lng32 index);
-
-  inline const ElemDDLGranteeArray & getGranteeArray() const;
-  inline       ElemDDLGranteeArray & getGranteeArray();
-
-        // returns the array of pointers pointing to parse
-        // nodes representing grantees.  This array contains
-        // at least one element.
-
-  inline const QualifiedName & getGrantNameAsQualifiedName() const;
-  inline       QualifiedName & getGrantNameAsQualifiedName();   
-
-  inline NAString getObjectName() const;
-
-        // returns the name of the object appearing in the
-        // Publish/Unpublish statement
-
-  inline NAString getSynonymName() const;
-
-	// returns the name of the synonym appearing in the
-        // publish statement'
-
-  inline NABoolean isSynonymNameSpecified() const;
-
-        // returns TRUE if the AS or FOR option specified a synonym
-        // name in the Publish/Unpublish statement; returns FALSE otherwise.
-
-  inline const ElemDDLPrivActArray & getPrivilegeActionArray() const;
-  inline       ElemDDLPrivActArray & getPrivilegeActionArray();
-
-        // returns the array of pointer pointing to parse
-        // nodes representing privilege actions.  If the All
-        // Privileges phrase appears in the Publish/Unpublish statement,
-        // the returned array is empty.  The method
-        // isAllPrivileges() may be used to find out whether
-        // the All Privileges phrase appears or not.
- 
-  inline NAString getTableName() const;
-
-        // same as getObjectName() - returns the name of the
-        // object appearing in the Publish/Unpublish statement
-
-  inline NABoolean isAllPrivilegesSpecified() const;
-
-        // returns TRUE if the All Privileges phrase appears
-        // in the Publish/Unpublish statement; returns FALSE otherwise.
-        //
-        // Note that getPrivilegeActionArray() returns an
-        // empty array when the the All Privileges phrase
-        // appears in the Publish/Unpublish statement.
-
-  inline NABoolean isRoleListSpecified() const;
-
-        // returns TRUE if publishing to roles
-        // returns FALSE if publishing to users
-
-  inline NABoolean isPublish() const;
-
-  // mutator
-  virtual void setChild(Lng32 index, ExprNode * pChildNode);
-
-  // for processing
-  ExprNode * bindNode(BindWA *bindWAPtr);
-
-  // for tracing
-  virtual const NAString displayLabel1() const;
-  virtual NATraceList getDetailInfo() const;
-  virtual const NAString getText() const;
-
-
-private:
-
-  NAString objectName_;
-  QualifiedName objectQualName_;
-
-  NAString synonymName_;
-
-  // is synonym name specified?
-  NABoolean isSynonymNameSpec_;
-
-  // privilege actions
-  NABoolean isAllPrivileges_;
-  ElemDDLPrivActArray privActArray_;
-
-  // grantees
-  ElemDDLGranteeArray granteeArray_;
-
-  // roles or users?
-  NABoolean isRoleList_;
-
-  // publish or unpublish?
-  NABoolean isPublish_;
-
-  // pointers to child parse nodes
-
-  enum { PUBLISH_PRIVILEGES = 0,
-         PUBLISH_GRANTEE_LIST,
-         MAX_STMT_DDL_PUBLISH_ARITY };
-
-  ElemDDLNode * children_[MAX_STMT_DDL_PUBLISH_ARITY];
-
-}; // class StmtDDLPublish
-
-// -----------------------------------------------------------------------
-// definitions of inline methods for class StmtDDLPublish
-// -----------------------------------------------------------------------
-
-//
-// accessors
-//
-inline QualifiedName &
-StmtDDLPublish::getGrantNameAsQualifiedName()
-{
-  return objectQualName_;
-}
-
-inline const QualifiedName & 
-StmtDDLPublish::getGrantNameAsQualifiedName() const 
-{
-  return objectQualName_;
-}
-inline NAString
-StmtDDLPublish::getObjectName() const
-{
-  return objectName_;
-}
-
-inline NAString
-StmtDDLPublish::getSynonymName() const
-{
-  return synonymName_;
-}
-
-inline NABoolean
-StmtDDLPublish::isSynonymNameSpecified() const
-{
-  return isSynonymNameSpec_;
-}
-
-inline ElemDDLGranteeArray &
-StmtDDLPublish::getGranteeArray()
-{
-  return granteeArray_;
-}
-
-inline const ElemDDLGranteeArray &
-StmtDDLPublish::getGranteeArray() const
-{
-  return granteeArray_;
-}
-
-inline ElemDDLPrivActArray &
-StmtDDLPublish::getPrivilegeActionArray()
-{
-  return privActArray_;
-}
-
-inline const ElemDDLPrivActArray &
-StmtDDLPublish::getPrivilegeActionArray() const
-{
-  return privActArray_;
-}
-
-inline NAString
-StmtDDLPublish::getTableName() const
-{
-  return objectName_;
-}
-
-inline NABoolean
-StmtDDLPublish::isAllPrivilegesSpecified() const
-{
-  return isAllPrivileges_;
-}
-
-inline NABoolean
-StmtDDLPublish::isRoleListSpecified() const
-{
-  return isRoleList_;
-}
-
-inline NABoolean
-StmtDDLPublish::isPublish() const
-{
-  return isPublish_;
-}
-
-#endif // STMTDDLPUBLISH_H

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/parser/sqlparser.y
----------------------------------------------------------------------
diff --git a/core/sql/parser/sqlparser.y b/core/sql/parser/sqlparser.y
index 4dbf5c1..0ed6bc5 100755
--- a/core/sql/parser/sqlparser.y
+++ b/core/sql/parser/sqlparser.y
@@ -1360,8 +1360,6 @@ static void enableMakeQuotedStringISO88591Mechanism()
 %token <tokval> TOK_PRIVILEGE           /* HP extension non-reserved word */
 %token <tokval> TOK_PRIVILEGES
 %token <tokval> TOK_PUBLIC
-%token <tokval> TOK_PUBLISH             /* Tandem extension */
-%token <tokval> TOK_UNPUBLISH           /* Tandem extension */
 %token <tokval> TOK_PURGEDATA
 %token <tokval> TOK_RANGE               /* Tandem extension non-reserved word*/
 %token <tokval> TOK_RANGE_N             /* TD extension that HP wants to ignore */
@@ -2428,8 +2426,6 @@ static void enableMakeQuotedStringISO88591Mechanism()
 %type <boolean>                 optional_granted
  /*%type <boolean>                 admin_option_for*/
 %type <pElemDDL>                optional_granted_by
-%type <pStmtDDL>                publish_statement
-%type <pStmtDDL>                unpublish_statement
 %type <pStmtDDL>                create_component_privilege_stmt
 %type <pStmtDDL>                drop_component_privilege_stmt
 %type <pStmtDDL>                register_component_statement
@@ -2738,7 +2734,6 @@ static void enableMakeQuotedStringISO88591Mechanism()
 %type <accesstype>    		access_type
 %type <pStmtDDL>                create_synonym_stmt
 %type <pStmtDDL>                drop_synonym_stmt
-%type <boolean>                 synonym_grantee_type
 %type <pStmtDDL>                drop_sql
 %type <pStmtDDL>                drop_table_constraint_definition
 %type <pStmtDDL>                drop_module
@@ -14399,13 +14394,6 @@ sql_schema_definition_statement :
               | drop_component_privilege_stmt
                                 {
                                 }
-              | publish_statement
-                                {
-                                }
-
-              | unpublish_statement
-                                {
-                                }
 
               | register_component_statement
                                 {
@@ -16559,23 +16547,6 @@ exe_util_init_hbase : TOK_INITIALIZE TOK_TRAFODION
 		 $$ = mu;
 	       }
 
-             | TOK_INITIALIZE TOK_TRAFODION ',' TOK_CREATE TOK_SEQUENCE
-               {
-		 CharInfo::CharSet stmtCharSet = CharInfo::UnknownCharSet;
-		 NAString * stmt = getSqlStmtStr ( stmtCharSet  // out - CharInfo::CharSet &
-						   , PARSERHEAP() 
-	                                       );
-
-		 DDLExpr * de = new(PARSERHEAP()) DDLExpr(FALSE, FALSE, FALSE, FALSE,
-                                                          FALSE, FALSE,
-							  TRUE, FALSE, FALSE, FALSE,
-							  (char*)stmt->data(),
-							  stmtCharSet,
-							  PARSERHEAP());
-
-                 $$ = de;
-
-               }
              | TOK_INITIALIZE TOK_TRAFODION ',' TOK_CREATE TOK_SCHEMA TOK_OBJECTS
                {
 		 CharInfo::CharSet stmtCharSet = CharInfo::UnknownCharSet;
@@ -28700,69 +28671,11 @@ optional_by_auth_identifier : empty
                                   delete $2 /*authorization_identifier*/;
                                 }
 
-publish_statement : TOK_PUBLISH privileges TOK_ON ddl_qualified_name
-                    TOK_AS identifier
-                    TOK_TO synonym_grantee_type grantee_list
-                      {
-                        $$ = new (PARSERHEAP())
-                          StmtDDLPublish(
-                                $2 /*privileges*/,
-                                *$4 /*object*/,
-                                *$6 /*synonym_name*/,
-                                $8 /*grantee type*/,
-                                $9 /*grantee_list*/,
-                                TRUE /*isPublish*/);
-                        delete $4;
-                        delete $6;
-                      }
 
-                  | TOK_PUBLISH privileges TOK_ON ddl_qualified_name
-                    TOK_TO synonym_grantee_type grantee_list
-                      {
-                        NAString noSynonym;
-                        $$ = new (PARSERHEAP())
-                          StmtDDLPublish(
-                                $2 /*privileges*/,
-                                *$4 /*object*/,
-                                noSynonym /*synonym_name*/,
-                                $6 /*grantee type*/,
-                                $7 /*grantee_list*/,
-                                TRUE /*isPublish*/);
-                        delete $4;
-                      }
 
 
 
-unpublish_statement : TOK_UNPUBLISH privileges TOK_ON ddl_qualified_name
-                      TOK_FOR identifier
-                      TOK_FROM synonym_grantee_type grantee_list
-                        {
-                          $$ = new (PARSERHEAP())
-                            StmtDDLPublish(
-                                  $2 /*privileges*/,
-                                  *$4 /*object*/,
-                                  *$6 /*synonym_name*/,
-                                  $8 /*grantee type*/,
-                                  $9 /*grantee_list*/,
-                                  FALSE /*isPublish*/);
-                          delete $4;
-                          delete $6;
-                        }
 
-                    | TOK_UNPUBLISH privileges TOK_ON ddl_qualified_name
-                      TOK_FROM synonym_grantee_type grantee_list
-                        {
-                          NAString noSynonym;
-                          $$ = new (PARSERHEAP())
-                            StmtDDLPublish(
-                                  $2 /*privileges*/,
-                                  *$4 /*object*/,
-                                  noSynonym /*synonym_name*/,
-                                  $6 /*grantee type*/,
-                                  $7 /*grantee_list*/,
-                                  FALSE /*isPublish*/);
-                          delete $4;
-                        }
 /* type pQualName */
 constraint_name : ddl_qualified_name
 
@@ -33281,15 +33194,6 @@ create_synonym_stmt : TOK_CREATE TOK_SYNONYM
                                   delete $5 /*ddl_qualified_name*/;
                                }
 
-synonym_grantee_type : TOK_USER
-                     {
-                       $$ = FALSE;
-                     }
-                     | TOK_ROLE
-                     {
-                       $$ = TRUE;
-                     }
-
 /* type longint */
 options : /* empty */
              { $$ = 0x0000000E; }
@@ -33819,7 +33723,6 @@ nonreserved_word :      TOK_ABORT
                       | TOK_PROCESS
                       | TOK_PROGRESS
                       | TOK_PROMPT
-                      | TOK_PUBLISH
                       | TOK_QID
                       | TOK_QID_INTERNAL
 	              | TOK_QUERY
@@ -33953,7 +33856,6 @@ nonreserved_word :      TOK_ABORT
                       | TOK_UNLOCK
                       | TOK_UNLOAD
                       | TOK_UNNAMED
-                      | TOK_UNPUBLISH
                       | TOK_UNREGISTER
                       | TOK_UNSIGNED
                       | TOK_UPD

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/regress/seabase/EXPECTED024
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/EXPECTED024 b/core/sql/regress/seabase/EXPECTED024
index 385ebe0..82212b8 100644
--- a/core/sql/regress/seabase/EXPECTED024
+++ b/core/sql/regress/seabase/EXPECTED024
@@ -5,10 +5,6 @@
 
 --- SQL operation complete.
 >>obey TEST024(setup);
->>-- add sequence metadata, if  doesn't already exists
->>initialize trafodion, create sequence;
-
---- SQL operation complete.
 >>
 >>initialize trafodion, create metadata views;
 
@@ -757,7 +753,7 @@ CREATE SEQUENCE TRAFODION.SEQSCH.TEST024SEQ8
 >>invoke trafodion."_MD_".sequences_view;
 
 -- Definition of Trafodion view TRAFODION."_MD_".SEQUENCES_VIEW
--- Definition current  Sun May 31 00:41:24 2015
+-- Definition current  Tue May  2 20:12:05 2017
 
   (
     CATALOG_NAME                     VARCHAR(256 BYTES) CHARACTER SET UTF8

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/regress/seabase/TEST024
----------------------------------------------------------------------
diff --git a/core/sql/regress/seabase/TEST024 b/core/sql/regress/seabase/TEST024
index 8f07bac..f43dde3 100644
--- a/core/sql/regress/seabase/TEST024
+++ b/core/sql/regress/seabase/TEST024
@@ -55,8 +55,6 @@ drop table test024t2;
 drop schema seqsch cascade;
 
 ?section setup
--- add sequence metadata, if  doesn't already exists
-initialize trafodion, create sequence;
 
 initialize trafodion, create metadata views;
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/sqlcomp/CmpSeabaseDDL.h
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDL.h b/core/sql/sqlcomp/CmpSeabaseDDL.h
index 84506dc..f45f72d 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDL.h
+++ b/core/sql/sqlcomp/CmpSeabaseDDL.h
@@ -971,7 +971,6 @@ protected:
 
   short createMetadataViews(ExeCliInterface * cliInterface);
   short dropMetadataViews(ExeCliInterface * cliInterface);
-  short createSeqTable(ExeCliInterface * cliInterface);
  
   int addSchemaObject(
      ExeCliInterface & cliInterface,
@@ -1387,7 +1386,6 @@ protected:
   void dropSeabaseMD(NABoolean ddlXns);
   void createSeabaseMDviews();
   void dropSeabaseMDviews();
-  void createSeabaseSeqTable();
   void createSeabaseSchemaObjects();
   void updateVersion();
 

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
index c1339f7..9798c3e 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp
@@ -7697,75 +7697,6 @@ short CmpSeabaseDDL::createPrivMgrRepos(ExeCliInterface *cliInterface,
   return 0;
 }
 
-void CmpSeabaseDDL::createSeabaseSeqTable()
-{
-  Lng32 retcode = 0;
-  Lng32 cliRC = 0;
-
-  ExeCliInterface cliInterface(STMTHEAP, NULL, NULL,
-    CmpCommon::context()->sqlSession()->getParentQid());
-
-  if ((CmpCommon::context()->isUninitializedSeabase()) &&
-      (CmpCommon::context()->uninitializedSeabaseErrNum() == -1393))
-    {
-      *CmpCommon::diags() << DgSqlCode(-1393);
-      return;
-    }
-
-  if (createSeqTable(&cliInterface))
-    {
-      return;
-    }
-
-}
-
-short CmpSeabaseDDL::createSeqTable(ExeCliInterface *cliInterface)
-{
-  Lng32 retcode = 0;
-  Lng32 cliRC = 0;
-
-  char queryBuf[5000];
-
-  const QString * qs = NULL;
-  Int32 sizeOfqs = 0;
-  
-  qs = seabaseSeqGenDDL;
-  sizeOfqs = sizeof(seabaseSeqGenDDL);
-  
-  Int32 qryArraySize = sizeOfqs / sizeof(QString);
-  char * gluedQuery;
-  Lng32 gluedQuerySize;
-  glueQueryFragments(qryArraySize,  qs,
-                     gluedQuery, gluedQuerySize);
-  
-  param_[0] = getSystemCatalog();
-  param_[1] = SEABASE_MD_SCHEMA;
-
-  str_sprintf(queryBuf, gluedQuery,
-              param_[0], param_[1]);
-  NADELETEBASIC(gluedQuery, STMTHEAP);
-
-  NABoolean xnWasStartedHere = FALSE;
-  if (beginXnIfNotInProgress(cliInterface, xnWasStartedHere))
-    return -1;
-
-  cliRC = cliInterface->executeImmediate(queryBuf);
-  if (cliRC == -1390)  // already exists
-    {
-      // ignore error.
-      cliRC = 0;
-    }
-  else if (cliRC < 0)
-    {
-      cliInterface->retrieveSQLDiagnostics(CmpCommon::diags());
-    }
-  
-  if (endXnIfStartedHere(cliInterface, xnWasStartedHere, cliRC) < 0)
-    return -1;
-
-  return 0;
-}
-
 void  CmpSeabaseDDL::createSeabaseSequence(StmtDDLCreateSequence  * createSequenceNode,
                                            NAString &currCatName, NAString &currSchName)
 {
@@ -9010,7 +8941,6 @@ short CmpSeabaseDDL::executeSeabaseDDL(DDLExpr * ddlExpr, ExprNode *
ddlNode,
       ((ddlExpr->initHbase()) ||
        (ddlExpr->createMDViews()) ||
        (ddlExpr->dropMDViews()) ||
-       (ddlExpr->addSeqTable()) ||
        (ddlExpr->createRepos()) ||
        (ddlExpr->dropRepos()) ||
        (ddlExpr->upgradeRepos()) ||
@@ -9122,10 +9052,6 @@ short CmpSeabaseDDL::executeSeabaseDDL(DDLExpr * ddlExpr, ExprNode
* ddlNode,
     {
        dropSeabaseAuthorization(&cliInterface, TRUE);
     }
-  else if (ddlExpr->addSeqTable())
-    {
-      createSeabaseSeqTable();
-    }
   else if (ddlExpr->addSchemaObjects())
     {
       createSeabaseSchemaObjects();

http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/98413903/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp b/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp
index 1340d12..3fc4033 100644
--- a/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp
+++ b/core/sql/sqlcomp/PrivMgrComponentPrivileges.cpp
@@ -691,6 +691,15 @@ PrivStatus PrivMgrComponentPrivileges::grantPrivilege(
    for (size_t i = 0; i < operations.size(); i ++)
    {
       std::string operationName = operations[i];
+
+      // For the moment we are disabling DML_* privileges. We might remove
+      // them in the future. Note that it will still be possible to revoke 
+      // them. (Note: sizeof counts null terminator, hence the -1.)
+      if (strncmp(operationName.c_str(),"DML_",sizeof("DML_")-1) == 0)
+      {
+         *pDiags_ << DgSqlCode(-CAT_UNSUPPORTED_COMMAND_ERROR);
+         return STATUS_ERROR;
+      }
       
       //TODO: 
       // If we can't find an operation in the list, we give up.  No warnings or 



Mime
View raw message