trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DaveBirdsall <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request: JIRA TRAFODION-1798 (ddl xns) an...
Date Wed, 02 Mar 2016 00:38:46 GMT
Github user DaveBirdsall commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/346#discussion_r54662095
  
    --- Diff: core/sql/sqlcomp/CmpSeabaseDDLcommon.cpp ---
    @@ -8167,35 +8239,71 @@ short CmpSeabaseDDL::executeSeabaseDDL(DDLExpr * ddlExpr, ExprNode
* ddlNode,
         }
     
       NABoolean startXn = TRUE;
    -  if ((ddlExpr->dropHbase()) ||
    -      (ddlExpr->purgedataHbase()) ||
    -      (ddlExpr->initHbase()) ||
    -      (ddlExpr->createMDViews()) ||
    -      (ddlExpr->dropMDViews()) ||
    -      (ddlExpr->initAuthorization()) ||
    -      (ddlExpr->dropAuthorization()) ||
    -      (ddlExpr->addSeqTable()) ||
    -      (ddlExpr->createRepos()) ||
    -      (ddlExpr->dropRepos()) ||
    -      (ddlExpr->upgradeRepos()) ||
    -      (ddlExpr->addSchemaObjects()) ||
    -      (ddlExpr->updateVersion()) ||
    -      ((ddlNode) &&
    -      // TODO: When making ALTER TABLE/INDEX transactional, add cases here for them
    -       ((ddlNode->getOperatorType() == DDL_DROP_SCHEMA) ||
    -        (ddlNode->getOperatorType() == DDL_CLEANUP_OBJECTS) ||
    -        (ddlNode->getOperatorType() == DDL_ALTER_TABLE_ADD_CONSTRAINT_PRIMARY_KEY)
||
    -        (ddlNode->getOperatorType() ==  DDL_ALTER_TABLE_ALTER_COLUMN_SET_SG_OPTION)
||
    -        (ddlNode->getOperatorType() == DDL_CREATE_INDEX) ||
    -        (ddlNode->getOperatorType() == DDL_POPULATE_INDEX) ||
    -        (ddlNode->getOperatorType() == DDL_CREATE_TABLE) ||
    -        (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
    -        (ddlNode->getOperatorType() == DDL_DROP_TABLE))))
    +
    +  // no DDL transactions.
    +  if ((NOT ddlExpr->ddlXns()) &&
    +      ((ddlExpr->dropHbase()) ||
    +       (ddlExpr->purgedataHbase()) ||
    +       (ddlExpr->initHbase()) ||
    +       (ddlExpr->createMDViews()) ||
    +       (ddlExpr->dropMDViews()) ||
    +       (ddlExpr->initAuthorization()) ||
    +       (ddlExpr->dropAuthorization()) ||
    +       (ddlExpr->addSeqTable()) ||
    +       (ddlExpr->createRepos()) ||
    +       (ddlExpr->dropRepos()) ||
    +       (ddlExpr->upgradeRepos()) ||
    +       (ddlExpr->addSchemaObjects()) ||
    +       (ddlExpr->updateVersion())))
    +    {
    +      // transaction will be started and commited in called methods.
    +      startXn = FALSE;
    +    }
    +  
    +  // no DDL transactions
    +  if (((ddlNode) && (ddlNode->castToStmtDDLNode()) &&
    +       (NOT ddlNode->castToStmtDDLNode()->ddlXns())) &&
    +      ((ddlNode->getOperatorType() == DDL_DROP_SCHEMA) ||
    +       (ddlNode->getOperatorType() == DDL_CLEANUP_OBJECTS) ||
    +       (ddlNode->getOperatorType() == DDL_ALTER_TABLE_ADD_CONSTRAINT_PRIMARY_KEY)
||
    +       (ddlNode->getOperatorType() == DDL_ALTER_TABLE_ALTER_COLUMN_SET_SG_OPTION)
||
    +       (ddlNode->getOperatorType() == DDL_CREATE_INDEX) ||
    +       (ddlNode->getOperatorType() == DDL_POPULATE_INDEX) ||
    +       (ddlNode->getOperatorType() == DDL_CREATE_TABLE) ||
    +       (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
    +       (ddlNode->getOperatorType() == DDL_DROP_TABLE)))
    +    {
    --- End diff --
    
    Earlier I had asked about ALTER TABLE/INDEX ALTER HBASE_OPTIONS... maybe that one should
be here too.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message