trafodion-codereview mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From selvaganesang <...@git.apache.org>
Subject [GitHub] incubator-trafodion pull request #550: [TRAFODION-2074] Create index should ...
Date Mon, 20 Jun 2016 18:37:49 GMT
Github user selvaganesang commented on a diff in the pull request:

    https://github.com/apache/incubator-trafodion/pull/550#discussion_r67742763
  
    --- Diff: core/sql/generator/GenPreCode.cpp ---
    @@ -2824,44 +2823,33 @@ short DDLExpr::ddlXnsInfo(NABoolean &isDDLxn, NABoolean &xnCanBeStarted)
            (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
            (ddlNode->getOperatorType() == DDL_ALTER_TABLE_ALTER_COLUMN_DATATYPE) ||
            (ddlNode->getOperatorType() == DDL_DROP_TABLE)))
    -    {
    -      // transaction will be started and commited in called methods.
    -      xnCanBeStarted = FALSE;
    -    }
    -
    -  isDDLxn = FALSE;
    -  if ((ddlXns()) || 
    -      ((ddlNode && ddlNode->castToStmtDDLNode() &&
    -        ddlNode->castToStmtDDLNode()->ddlXns())))
    -    isDDLxn = TRUE;
    -
    -  // ddl transactions are on.
    -  // Following commands currently require transactions be started and
    -  // committed in the called methods.
    -  if ((ddlXns()) &&
    -      (
    -           (purgedataHbase()) ||
    -           (upgradeRepos())
    -       )
    -      )
    -    {
    -      // transaction will be started and commited in called methods.
    -      xnCanBeStarted = FALSE;
    -    }
    -
    -  // ddl transactions are on.
    -  // Cleanup and alter commands requires transactions to be started and commited
    -  // in the called method.
    -  if ((ddlNode && ddlNode->castToStmtDDLNode() &&
    -       ddlNode->castToStmtDDLNode()->ddlXns()) &&
    -      ((ddlNode->getOperatorType() == DDL_CLEANUP_OBJECTS) ||
    -       (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
    -       (ddlNode->getOperatorType() == DDL_ALTER_TABLE_ALTER_COLUMN_DATATYPE)))
    -    {
    -      // transaction will be started and commited in called methods.
    -      xnCanBeStarted = FALSE;
    -    }
    -
    +     {
    +        // transaction will be started and commited in called methods.
    +        xnCanBeStarted = FALSE;
    +     }
    +     isDDLxn = FALSE;
    +  }
    +  else  // When the DDL transaction is turned on
    +  {
    +     isDDLxn = FALSE;
    +     if (ddlNode && ddlNode->castToStmtDDLNode() &&
    +        ddlNode->castToStmtDDLNode()->ddlXns())
    +     isDDLxn = TRUE;
    +
    +     if (purgedataHbase() || upgradeRepos())
    +        // transaction will be started and commited in called methods.
    +        xnCanBeStarted = FALSE;
    +     if ((ddlNode && ddlNode->castToStmtDDLNode() &&
    +          ddlNode->castToStmtDDLNode()->ddlXns()) &&
    +            ((ddlNode->getOperatorType() == DDL_CLEANUP_OBJECTS) ||
    +             (ddlNode->getOperatorType() == DDL_ALTER_TABLE_DROP_COLUMN) ||
    +             (ddlNode->getOperatorType() == DDL_CREATE_INDEX) ||
    --- End diff --
    
    Good catch. I will check and fix it.


---
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