1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-29 08:21:15 +03:00

clang format apply

This commit is contained in:
Leonid Fedorov
2022-01-21 16:43:49 +00:00
parent 6b6411229f
commit 04752ec546
1376 changed files with 393460 additions and 412662 deletions

View File

@ -30,85 +30,85 @@ using namespace logging;
namespace ddlpackageprocessor
{
DropIndexProcessor::DDLResult DropIndexProcessor::processPackage(ddlpackage::DropIndexStatement& dropIndexStmt)
DropIndexProcessor::DDLResult DropIndexProcessor::processPackage(
ddlpackage::DropIndexStatement& dropIndexStmt)
{
SUMMARY_INFO("DropIndexProcessor::processPackage");
SUMMARY_INFO("DropIndexProcessor::processPackage");
boost::shared_ptr<CalpontSystemCatalog> sysCatalogPtr = CalpontSystemCatalog::makeCalpontSystemCatalog( dropIndexStmt.fSessionID );
CalpontSystemCatalog::IndexName indexName;
CalpontSystemCatalog::IndexOID indexOID;
boost::shared_ptr<CalpontSystemCatalog> sysCatalogPtr =
CalpontSystemCatalog::makeCalpontSystemCatalog(dropIndexStmt.fSessionID);
CalpontSystemCatalog::IndexName indexName;
CalpontSystemCatalog::IndexOID indexOID;
BRM::TxnID txnID;
txnID.id = fTxnid.id;
txnID.valid = fTxnid.valid;
BRM::TxnID txnID;
txnID.id = fTxnid.id;
txnID.valid = fTxnid.valid;
DDLResult result;
result.result = NO_ERROR;
DDLResult result;
result.result = NO_ERROR;
int err = 0;
int err = 0;
VERBOSE_INFO(dropIndexStmt);
VERBOSE_INFO(dropIndexStmt);
SQLLogger logger(dropIndexStmt.fSql, fDDLLoggingId, dropIndexStmt.fSessionID, txnID.id);
SQLLogger logger(dropIndexStmt.fSql, fDDLLoggingId, dropIndexStmt.fSessionID, txnID.id);
indexName.schema = dropIndexStmt.fIndexName->fSchema;
indexName.index = dropIndexStmt.fIndexName->fName;
//Look up table name from indexname. Oracle will error out if same constraintname or indexname exists.
CalpontSystemCatalog::TableName tableName = sysCatalogPtr->lookupTableForIndex (dropIndexStmt.fIndexName->fName, dropIndexStmt.fIndexName->fSchema );
indexName.table = tableName.table;
indexOID = sysCatalogPtr->lookupIndexNbr(indexName);
indexName.schema = dropIndexStmt.fIndexName->fSchema;
indexName.index = dropIndexStmt.fIndexName->fName;
// Look up table name from indexname. Oracle will error out if same constraintname or indexname exists.
CalpontSystemCatalog::TableName tableName =
sysCatalogPtr->lookupTableForIndex(dropIndexStmt.fIndexName->fName, dropIndexStmt.fIndexName->fSchema);
indexName.table = tableName.table;
indexOID = sysCatalogPtr->lookupIndexNbr(indexName);
VERBOSE_INFO("Removing the SYSINDEX meta data");
removeSysIndexMetaData(dropIndexStmt.fSessionID, txnID.id, result, *dropIndexStmt.fIndexName);
VERBOSE_INFO("Removing the SYSINDEX meta data");
removeSysIndexMetaData(dropIndexStmt.fSessionID, txnID.id, result, *dropIndexStmt.fIndexName);
if (result.result != NO_ERROR)
{
DETAIL_INFO("writeSysIndexMetaData failed");
goto rollback;
}
if (result.result != NO_ERROR)
{
DETAIL_INFO("writeSysIndexMetaData failed");
goto rollback;
}
VERBOSE_INFO("Removing the SYSINDEXCOL meta data");
removeSysIndexColMetaData(dropIndexStmt.fSessionID, txnID.id, result, *dropIndexStmt.fIndexName);
VERBOSE_INFO("Removing the SYSINDEXCOL meta data");
removeSysIndexColMetaData(dropIndexStmt.fSessionID, txnID.id, result, *dropIndexStmt.fIndexName);
if (result.result != NO_ERROR)
{
DETAIL_INFO("writeSysIndexMetaData failed");
goto rollback;
}
if (result.result != NO_ERROR)
{
DETAIL_INFO("writeSysIndexMetaData failed");
goto rollback;
}
VERBOSE_INFO("Removing the index files");
err = fWriteEngine.dropIndex(txnID.id, indexOID.objnum, indexOID.listOID);
VERBOSE_INFO("Removing the index files");
err = fWriteEngine.dropIndex(txnID.id, indexOID.objnum, indexOID.listOID);
if (err)
{
DETAIL_INFO("WriteEngine dropIndex failed");
goto rollback;
}
if (err)
{
DETAIL_INFO("WriteEngine dropIndex failed");
goto rollback;
}
// Log the DDL statement
logging::logDDL(dropIndexStmt.fSessionID, txnID.id, dropIndexStmt.fSql, dropIndexStmt.fOwner);
// Log the DDL statement
logging::logDDL(dropIndexStmt.fSessionID, txnID.id, dropIndexStmt.fSql, dropIndexStmt.fOwner);
// register the changes
err = fWriteEngine.commit(txnID.id);
// register the changes
err = fWriteEngine.commit( txnID.id );
if (err)
{
DETAIL_INFO("Failed to commit the drop index transaction");
goto rollback;
}
if (err)
{
DETAIL_INFO("Failed to commit the drop index transaction");
goto rollback;
}
fSessionManager.committed(txnID);
//fObjectIDManager.returnOID(indexOID.objnum);
//fObjectIDManager.returnOID(indexOID.listOID);
return result;
fSessionManager.committed(txnID);
// fObjectIDManager.returnOID(indexOID.objnum);
// fObjectIDManager.returnOID(indexOID.listOID);
return result;
rollback:
fWriteEngine.rollbackTran(txnID.id, dropIndexStmt.fSessionID);
fSessionManager.rolledback(txnID);
return result;
fWriteEngine.rollbackTran(txnID.id, dropIndexStmt.fSessionID);
fSessionManager.rolledback(txnID);
return result;
}
} // namespace ddlpackageprocessor
} // namespace ddlpackageprocessor