You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafodion.apache.org by db...@apache.org on 2016/06/21 15:37:33 UTC
[5/6] incubator-trafodion git commit: [TRAFODION-2074] Create index
should avoid populating the index within a transaction
[TRAFODION-2074] Create index should avoid populating the index within a transaction
Project: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/commit/cb579fc2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/tree/cb579fc2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-trafodion/diff/cb579fc2
Branch: refs/heads/master
Commit: cb579fc2bb84ef13f77478d4999e7d8bb218fda6
Parents: c351da3
Author: selvaganesang <se...@esgyn.com>
Authored: Tue Jun 21 07:17:31 2016 +0000
Committer: selvaganesang <se...@esgyn.com>
Committed: Tue Jun 21 07:17:31 2016 +0000
----------------------------------------------------------------------
core/sql/sqlcomp/CmpSeabaseDDLindex.cpp | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-trafodion/blob/cb579fc2/core/sql/sqlcomp/CmpSeabaseDDLindex.cpp
----------------------------------------------------------------------
diff --git a/core/sql/sqlcomp/CmpSeabaseDDLindex.cpp b/core/sql/sqlcomp/CmpSeabaseDDLindex.cpp
index b6bed23..2993e3b 100644
--- a/core/sql/sqlcomp/CmpSeabaseDDLindex.cpp
+++ b/core/sql/sqlcomp/CmpSeabaseDDLindex.cpp
@@ -1313,6 +1313,7 @@ void CmpSeabaseDDL::populateSeabaseIndex(
}
const NAFileSetList &indexList = naTable->getIndexList();
+ NABoolean xnWasStartedHere = FALSE;
for (Int32 i = 0; i < indexList.entries(); i++)
{
const NAFileSet * naf = indexList[i];
@@ -1383,7 +1384,11 @@ void CmpSeabaseDDL::populateSeabaseIndex(
processReturn();
goto purgedata_return;
}
-
+ if (beginXnIfNotInProgress(&cliInterface, xnWasStartedHere))
+ {
+ processReturn();
+ goto purgedata_return;
+ }
if (updateObjectValidDef(&cliInterface,
catalogNamePart, schemaNamePart, objectNamePart,
COM_INDEX_OBJECT_LIT,
@@ -1392,6 +1397,7 @@ void CmpSeabaseDDL::populateSeabaseIndex(
processReturn();
goto purgedata_return;
}
+ endXnIfStartedHere(&cliInterface, xnWasStartedHere, 0);
}
} // for
@@ -1399,6 +1405,7 @@ void CmpSeabaseDDL::populateSeabaseIndex(
processReturn();
return;
purgedata_return:
+ endXnIfStartedHere(&cliInterface, xnWasStartedHere, -1);
updateObjectAuditAttr(&cliInterface,
catalogNamePart, schemaNamePart, objectNamePart,
TRUE, COM_INDEX_OBJECT_LIT);