You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-29 08:21:15 +03:00
MCOL-641 1. Minor refactoring of decimalToString for int128_t.
2. Update unit tests for decimalToString. 3. Allow support for wide decimal in TupleConstantStep::fillInConstants().
This commit is contained in:
committed by
Roman Nozdrin
parent
2e8e7d52c3
commit
9b714274db
@ -815,24 +815,19 @@ uint8_t WE_DMLCommandProc::rollbackVersion(ByteStream& bs, std::string& err)
|
||||
uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::string& err, ByteStream::quadbyte& PMId)
|
||||
{
|
||||
int rc = 0;
|
||||
//cout << "processBatchInsert received bytestream length " << bs.length() << endl;
|
||||
|
||||
InsertDMLPackage insertPkg;
|
||||
ByteStream::quadbyte tmp32;
|
||||
bs >> tmp32;
|
||||
//cout << "processBatchInsert got transaction id " << tmp32 << endl;
|
||||
bs >> PMId;
|
||||
//cout << "processBatchInsert gor PMId " << PMId << endl;
|
||||
insertPkg.read( bs);
|
||||
uint32_t sessionId = insertPkg.get_SessionID();
|
||||
//cout << " processBatchInsert for session " << sessionId << endl;
|
||||
DMLTable* tablePtr = insertPkg.get_Table();
|
||||
bool isAutocommitOn = insertPkg.get_isAutocommitOn();
|
||||
|
||||
if (idbdatafile::IDBPolicy::useHdfs())
|
||||
isAutocommitOn = true;
|
||||
|
||||
//cout << "This session isAutocommitOn is " << isAutocommitOn << endl;
|
||||
BRM::TxnID txnid;
|
||||
txnid.id = tmp32;
|
||||
txnid.valid = true;
|
||||
@ -858,7 +853,7 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
try
|
||||
{
|
||||
ridList = systemCatalogPtr->columnRIDs(tableName, true);
|
||||
roPair = systemCatalogPtr->tableRID( tableName);
|
||||
roPair = systemCatalogPtr->tableRID(tableName);
|
||||
}
|
||||
catch (std::exception& ex)
|
||||
{
|
||||
@ -867,7 +862,6 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
return rc;
|
||||
}
|
||||
|
||||
|
||||
std::vector<OID> dctnryStoreOids(ridList.size()) ;
|
||||
std::vector<Column> columns;
|
||||
DctnryStructList dctnryList;
|
||||
@ -919,14 +913,10 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
if (i == 0)
|
||||
{
|
||||
rc = pDBRootExtentTracker->selectFirstSegFile(dbRootExtent, bFirstExtentOnThisPM, bEmptyPM, trkErrMsg);
|
||||
/* cout << "bEmptyPM = " << (int) bEmptyPM << " bFirstExtentOnThisPM= " << (int)bFirstExtentOnThisPM <<
|
||||
" oid:dbroot:hwm = " << ridList[i].objnum << ":"<<dbRootExtent.fDbRoot << ":"
|
||||
<<":"<<dbRootExtent.fLocalHwm << " err = " << trkErrMsg << endl; */
|
||||
}
|
||||
else
|
||||
pDBRootExtentTracker->assignFirstSegFile(*(dbRootExtTrackerVec[0].get()), dbRootExtent);
|
||||
|
||||
|
||||
colDBRootExtentInfo.push_back(dbRootExtent);
|
||||
|
||||
Column aColumn;
|
||||
@ -984,7 +974,7 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
std::vector<BRM::LBIDRange> rangeList;
|
||||
|
||||
// use of MetaFile for bulk rollback support
|
||||
if ( fIsFirstBatchPm && isAutocommitOn)
|
||||
if (fIsFirstBatchPm && isAutocommitOn)
|
||||
{
|
||||
//save meta data, version last block for each dbroot at the start of batch insert
|
||||
try
|
||||
@ -992,10 +982,8 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
fRBMetaWriter->init(tblOid, tableName.table);
|
||||
fRBMetaWriter->saveBulkRollbackMetaData(columns, dctnryStoreOids, dbRootHWMInfoColVec);
|
||||
|
||||
//cout << "Saved meta files" << endl;
|
||||
if (!bFirstExtentOnThisPM)
|
||||
{
|
||||
//cout << "Backing up hwm chunks" << endl;
|
||||
for (unsigned i = 0; i < dctnryList.size(); i++) //back up chunks for compressed dictionary
|
||||
{
|
||||
// @bug 5572 HDFS tmp file - Ignoring return flag, don't need in this context
|
||||
@ -1310,7 +1298,6 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
int error = NO_ERROR;
|
||||
|
||||
//fWriteEngine.setDebugLevel(WriteEngine::DEBUG_3);
|
||||
//cout << "Batch inserting a row with transaction id " << txnid.id << endl;
|
||||
if (colValuesList.size() > 0)
|
||||
{
|
||||
if (colValuesList[0].size() > 0)
|
||||
@ -1361,7 +1348,6 @@ uint8_t WE_DMLCommandProc::processBatchInsert(messageqcpp::ByteStream& bs, std::
|
||||
if ( isWarningSet && ( rc == NO_ERROR ) )
|
||||
{
|
||||
rc = dmlpackageprocessor::DMLPackageProcessor::IDBRANGE_WARNING;
|
||||
//cout << "Got warning" << endl;
|
||||
Message::Args args;
|
||||
string cols = "'" + colNames[0] + "'";
|
||||
|
||||
|
@ -154,10 +154,7 @@ void DmlReadThread::operator()()
|
||||
|
||||
case WE_SVR_BATCH_INSERT:
|
||||
{
|
||||
//timer.start("processBatchInsert");
|
||||
rc = fWeDMLprocessor->processBatchInsert(ibs, errMsg, PMId);
|
||||
//timer.stop("processBatchInsert");
|
||||
//cout << "fWeDMLprocessor " << fWeDMLprocessor << " is processing batchinsert ..." << endl;
|
||||
break;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user