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

Merge branch 'develop-1.1' into 1.1-merge-up-2018-12-20b

This commit is contained in:
Andrew Hutchings
2018-12-20 20:55:00 +00:00
9 changed files with 41 additions and 44 deletions

View File

@ -83,6 +83,14 @@ INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/build/releasenum DESTINATION ${INSTALL
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h.in ${CMAKE_CURRENT_SOURCE_DIR}/columnstoreversion.h)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
exec_program("git"
${CMAKE_CURRENT_SOURCE_DIR}
ARGS "describe --match=NeVeRmAtCh --always --dirty"
OUTPUT_VARIABLE GIT_VERSION)
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/gitversionEngine.in ${CMAKE_CURRENT_BINARY_DIR}/gitversionEngine IMMEDIATE)
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/gitversionEngine DESTINATION ${INSTALL_ENGINE} COMPONENT platform)
INCLUDE(bison.cmake)
FIND_PROGRAM(LEX_EXECUTABLE flex DOC "path to the flex executable")

1
gitversionEngine.in Normal file
View File

@ -0,0 +1 @@
@GIT_VERSION@

View File

@ -3236,7 +3236,7 @@ void Oam::SuspendWrites(GRACEFUL_FLAG gracefulflag, ACK_FLAG ackflag)
switch (returnStatus)
{
case API_SUCCESS:
cout << endl << "Suspend Calpont Database Writes Request successfully completed" << endl;
cout << endl << "Suspend MariaDB Columnstore Database Writes Request successfully completed" << endl;
break;
case API_FAILURE_DB_ERROR:
@ -10821,7 +10821,7 @@ bool Oam::waitForSystem(PROC_MGT_MSG_REQUEST request, messageqcpp::IOSocket& ios
}
catch (...)
{
writeLog("Communication with calpont console failed while waiting for transactions", LOG_TYPE_ERROR);
writeLog("Communication with MariaDB ColumnStore Admin console failed while waiting for transactions", LOG_TYPE_ERROR);
}
// writeLog("Returning from wait with value " + itoa(ret), LOG_TYPE_INFO );

View File

@ -4436,30 +4436,13 @@ int processCommand(string* arguments)
try
{
SystemProcessStatus systemprocessstatus;
BRM::DBRM dbrm;
dbrm.setSystemSuspended(false);
oam.getProcessStatus(systemprocessstatus);
for ( unsigned int i = 0 ; i < systemprocessstatus.processstatus.size(); i++)
{
if (systemprocessstatus.processstatus[i].ProcessName == "DMLProc")
{
oam.setProcessStatus(systemprocessstatus.processstatus[i].ProcessName, systemprocessstatus.processstatus[i].Module, ACTIVE, 1);
}
if (systemprocessstatus.processstatus[i].ProcessName == "DDLProc")
{
oam.setProcessStatus(systemprocessstatus.processstatus[i].ProcessName, systemprocessstatus.processstatus[i].Module, ACTIVE, 1);
}
if (systemprocessstatus.processstatus[i].ProcessName == "WriteEngineServer")
{
oam.setProcessStatus(systemprocessstatus.processstatus[i].ProcessName, systemprocessstatus.processstatus[i].Module, ACTIVE, 1);
}
}
oam.setSystemStatus(ACTIVE);
cout << endl << "Resume MariaDB ColumnStore Database Writes Request successfully completed" << endl;

View File

@ -1873,8 +1873,7 @@ inline bool StringStore::isNullValue(uint64_t off) const
if (mc->data[offset + 4] == 0) // "" = NULL string for some reason...
return true;
return (*((uint64_t*) &mc->data[offset] + 4) == *((uint64_t*) joblist::CPNULLSTRMARK.c_str()));
return (memcmp(&mc->data[offset+4], joblist::CPNULLSTRMARK.c_str(), 8) == 0);
}
inline bool StringStore::equals(const std::string& str, uint64_t off) const

View File

@ -1880,11 +1880,11 @@ int DBRM::deletePartition(const std::vector<OID_t>& oids,
{
TRACER_WRITENOW("deletePartition");
std::ostringstream oss;
oss << "partitionNum: "
oss << "partitionNum: ";
std::set<LogicalPartition>::const_iterator partIt;
for (partIt = partitionNums.begin(); partIt != partitionNums.end(); ++partIt)
oss << (*it) << " "
oss << (*partIt) << " ";
oss << "; OIDS: ";
std::vector<OID_t>::const_iterator it;
@ -1939,11 +1939,11 @@ int DBRM::markPartitionForDeletion(const std::vector<OID_t>& oids,
{
TRACER_WRITENOW("markPartitionForDeletion");
std::ostringstream oss;
oss << "partitionNum: "
oss << "partitionNum: ";
std::set<LogicalPartition>::const_iterator partIt;
for (partIt = partitionNums.begin(); partIt != partitionNums.end(); ++partIt)
oss << (*it) << " "
oss << (*partIt) << " ";
oss << "; OIDS: ";
std::vector<OID_t>::const_iterator it;
@ -2045,11 +2045,11 @@ int DBRM::restorePartition(const std::vector<OID_t>& oids,
{
TRACER_WRITENOW("restorePartition");
std::ostringstream oss;
oss << "partitionNum: "
oss << "partitionNum: ";
std::set<LogicalPartition>::const_iterator partIt;
for (partIt = partitionNums.begin(); partIt != partitionNums.end(); ++partIt)
oss << (*it) << " "
oss << (*partIt) << " ";
oss << "; OIDS: ";
std::vector<OID_t>::const_iterator it;

View File

@ -59,7 +59,6 @@ namespace bi = boost::interprocess;
#include "IDBDataFile.h"
#include "IDBPolicy.h"
#ifdef BRM_INFO
#error BRM_INFO is broken right now
#include "tracer.h"
#include "configcpp.h"
#endif
@ -4603,12 +4602,12 @@ void ExtentMap::setLocalHWM(int OID, uint32_t partitionNum,
{
makeUndoRecord(&fExtentMap[oldHWMExtentIndex], sizeof(EMEntry));
fExtentMap[oldHWMExtentIndex].HWM = 0;
#ifdef BRM_DEBUG
#ifdef BRM_INFO
addedAnExtent = true;
#endif
}
#ifdef BRM_DEBUG
#ifdef BRM_INFO
if (firstNode)
{
@ -4921,10 +4920,9 @@ void ExtentMap::deletePartition(const set<OID_t>& oids,
TRACER_WRITENOW("deletePartition");
ostringstream oss;
set<LogicalPartition>::const_iterator partIt;
oss << "partitionNums: "
for (partIt = partitionNums.begin(); it != partitionNums.end(); ++it)
oss << (*it) << " ";
oss << "partitionNums: ";
for (partIt=partitionNums.begin(); partIt!=partitionNums.end(); ++partIt)
oss << (*partIt) << " ";
oss << endl;
oss << "OIDS: ";
@ -5026,10 +5024,9 @@ void ExtentMap::markPartitionForDeletion(const set<OID_t>& oids,
TRACER_WRITENOW("markPartitionForDeletion");
ostringstream oss;
set<LogicalPartition>::const_iterator partIt;
oss << "partitionNums: "
for (partIt = partitionNums.begin(); it != partitionNums.end(); ++it)
oss << (*it) << " ";
oss << "partitionNums: ";
for (partIt=partitionNums.begin(); partIt!=partitionNums.end(); ++partIt)
oss << (*partIt) << " ";
oss << endl;
oss << "OIDS: ";
@ -5193,10 +5190,9 @@ void ExtentMap::restorePartition(const set<OID_t>& oids,
TRACER_WRITENOW("restorePartition");
ostringstream oss;
set<LogicalPartition>::const_iterator partIt;
oss << "partitionNums: "
for (partIt = partitionNums.begin(); it != partitionNums.end(); ++it)
oss << (*it) << " ";
oss << "partitionNums: ";
for (partIt=partitionNums.begin(); partIt!=partitionNums.end(); ++partIt)
oss << (*partIt) << " ";
oss << endl;
oss << "OIDS: ";
@ -5365,7 +5361,7 @@ bool ExtentMap::isDBRootEmpty(uint16_t dbroot)
if (fDebug)
{
TRACER_WRITELATER("isDBRootEmpty");
TRACER_ADDINPUT(OID);
TRACER_ADDINPUT(dbroot);
TRACER_WRITE;
}

View File

@ -30,6 +30,8 @@
#include <ctime>
#endif
#include <unistd.h>
#define TRACER_DLLEXPORT
#include "tracer.h"
#undef TRACER_DLLEXPORT

View File

@ -637,6 +637,7 @@ int WriteEngineWrapper::fillColumn(const TxnID& txnid, const OID& dataOid,
// refColOp.reset(colOpRefCol);
// dctnry.reset(dctOp);
uint16_t dbRoot = 1; //not to be used
int newDataWidth = dataWidth;
//Convert HWM of the reference column for the new column
//Bug 1703,1705
bool isToken = false;
@ -661,10 +662,17 @@ int WriteEngineWrapper::fillColumn(const TxnID& txnid, const OID& dataOid,
isToken = true;
}
newDataWidth = colOpNewCol->getCorrectRowWidth(dataType, dataWidth);
// MCOL-1347 CS doubles the width for ALTER TABLE..ADD COLUMN
if ( dataWidth < 4 && dataType == CalpontSystemCatalog::VARCHAR )
{
newDataWidth >>= 1;
}
Convertor::convertColType(refColDataType, refColType, isToken);
refColOp->setColParam(refCol, 0, refColOp->getCorrectRowWidth(refColDataType, refColWidth),
refColDataType, refColType, (FID)refColOID, refCompressionType, dbRoot);
colOpNewCol->setColParam(newCol, 0, colOpNewCol->getCorrectRowWidth(dataType, dataWidth),
colOpNewCol->setColParam(newCol, 0, newDataWidth,
dataType, newColType, (FID)dataOid, compressionType, dbRoot);
int size = sizeof(Token);