1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-04-18 21:44:02 +03:00

Review fixes

This commit is contained in:
Denis Khalikov 2024-05-10 10:15:36 +00:00 committed by Leonid Fedorov
parent c17f24b90f
commit 254ced25cf
2 changed files with 24 additions and 34 deletions

View File

@ -541,6 +541,25 @@ int PackageHandler::clearTableAccess()
return 1;
}
CalpontSystemCatalog::ROPair PackageHandler::getTableRID(
boost::shared_ptr<execplan::CalpontSystemCatalog> fcsc,
execplan::CalpontSystemCatalog::TableName& tableName)
{
execplan::CalpontSystemCatalog::ROPair roPair;
try
{
roPair = fcsc->tableRID(tableName);
}
catch (...)
{
if (setupDec())
throw;
roPair = fcsc->tableRID(tableName);
}
return roPair;
}
void PackageHandler::run()
{
ResourceManager* frm = ResourceManager::instance();
@ -577,18 +596,7 @@ void PackageHandler::run()
CalpontSystemCatalog::TableName tableName;
tableName.schema = insertPkg.get_Table()->get_SchemaName();
tableName.table = insertPkg.get_Table()->get_TableName();
CalpontSystemCatalog::ROPair roPair;
try
{
roPair = fcsc->tableRID(tableName);
}
catch (...)
{
if (setupDec())
throw;
roPair = fcsc->tableRID(tableName);
}
CalpontSystemCatalog::ROPair roPair = getTableRID(fcsc, tableName);
fTableOid = roPair.objnum;
}
synchTable.setPackage(this, &insertPkg); // Blocks if another DML thread is using this fTableOid
@ -987,17 +995,7 @@ void PackageHandler::run()
CalpontSystemCatalog::TableName tableName;
tableName.schema = updatePkg->get_Table()->get_SchemaName();
tableName.table = updatePkg->get_Table()->get_TableName();
CalpontSystemCatalog::ROPair roPair;
try
{
roPair = fcsc->tableRID(tableName);
}
catch (...)
{
if (setupDec())
throw;
roPair = fcsc->tableRID(tableName);
}
CalpontSystemCatalog::ROPair roPair = getTableRID(fcsc, tableName);
fTableOid = roPair.objnum;
}
synchTable.setPackage(this,
@ -1057,17 +1055,7 @@ void PackageHandler::run()
CalpontSystemCatalog::TableName tableName;
tableName.schema = deletePkg->get_Table()->get_SchemaName();
tableName.table = deletePkg->get_Table()->get_TableName();
CalpontSystemCatalog::ROPair roPair;
try
{
roPair = fcsc->tableRID(tableName);
}
catch (...)
{
if (setupDec())
throw;
roPair = fcsc->tableRID(tableName);
}
CalpontSystemCatalog::ROPair roPair = getTableRID(fcsc, tableName);
fTableOid = roPair.objnum;
}
synchTable.setPackage(this,

View File

@ -205,6 +205,8 @@ class PackageHandler
joblist::DistributedEngineComm* fEc = joblist::DistributedEngineComm::instance(rm);
return fEc->Setup();
}
execplan::CalpontSystemCatalog::ROPair getTableRID(boost::shared_ptr<execplan::CalpontSystemCatalog> fcsc,
execplan::CalpontSystemCatalog::TableName& tableName);
messageqcpp::IOSocket fIos;
boost::shared_ptr<messageqcpp::ByteStream> fByteStream;