You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-07-30 19:23:07 +03:00
Merge branch 'develop-1.0' into 1.0-merge-up
This commit is contained in:
@ -112,7 +112,7 @@ ParseTree* replaceRefCol(ParseTree*& n, CalpontSelectExecutionPlan::ReturnedColu
|
||||
else if (rc)
|
||||
{
|
||||
SimpleColumn* sc = dynamic_cast<SimpleColumn*>(rc);
|
||||
if (sc)
|
||||
if (sc && (sc->colPosition() > -1))
|
||||
{
|
||||
ReturnedColumn* tmp = derivedColList[sc->colPosition()]->clone();
|
||||
delete sc;
|
||||
|
@ -38,6 +38,7 @@
|
||||
#include <cerrno>
|
||||
#include <cstring>
|
||||
#include <time.h>
|
||||
//#define NDEBUG
|
||||
#include <cassert>
|
||||
#include <vector>
|
||||
#include <map>
|
||||
@ -2289,6 +2290,8 @@ CalpontSystemCatalog::ColType colType_MysqlToIDB (const Item* item)
|
||||
{
|
||||
if (ct.colWidth < 20)
|
||||
ct.colWidth = 20; // for infinidb date length
|
||||
if (ct.colWidth > 65535)
|
||||
ct.colWidth = 65535;
|
||||
}
|
||||
// @bug5083. MySQL gives string type for date/datetime column.
|
||||
// need to adjust here.
|
||||
|
@ -2811,8 +2811,6 @@ namespace oam
|
||||
// Get Server Type Install ID
|
||||
|
||||
serverTypeInstall = atoi(sysConfig->getConfig("Installation", "ServerTypeInstall").c_str());
|
||||
|
||||
sysConfig;
|
||||
}
|
||||
catch (...) {}
|
||||
|
||||
|
@ -1488,7 +1488,7 @@ namespace oam
|
||||
* @param DeviceNetworkConfig the Modules added
|
||||
* @param password Host Root Password
|
||||
*/
|
||||
EXPORT void addModule(DeviceNetworkList devicenetworklist, const std::string password, const std::string mysqlpw);
|
||||
EXPORT void addModule(DeviceNetworkList devicenetworklist, const std::string password);
|
||||
|
||||
/** @brief remove Module
|
||||
*
|
||||
|
@ -502,6 +502,8 @@ static void startMgrProcessThread()
|
||||
ModuleTypeConfig PMSmoduletypeconfig;
|
||||
ALARMManager aManager;
|
||||
|
||||
int waitTime = 90;
|
||||
|
||||
int waitTime = 180;
|
||||
|
||||
log.writeLog(__LINE__, "startMgrProcessThread launched", LOG_TYPE_DEBUG);
|
||||
|
@ -500,6 +500,11 @@ public:
|
||||
int changeMyCnf(std::string type);
|
||||
|
||||
|
||||
/**
|
||||
*@brief run MariaDB Command Line script
|
||||
*/
|
||||
int runMariaDBCommandLine(std::string command);
|
||||
|
||||
/**
|
||||
*@brief run MariaDB Command Line script
|
||||
*/
|
||||
|
@ -195,6 +195,29 @@ std::string wstring_to_utf8 (const std::wstring& str)
|
||||
return std::string(outbuf, strmblen);
|
||||
}
|
||||
|
||||
inline
|
||||
uint8_t utf8_truncate_point(const char* input, size_t length)
|
||||
{
|
||||
// Find the beginning of a multibyte char to truncate at and return the
|
||||
// number of bytes to truncate
|
||||
if (length < 3)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
const unsigned char *b = (const unsigned char*)(input) + length - 3;
|
||||
if (b[2] & 0x80)
|
||||
{
|
||||
// First byte in a new multi-byte sequence
|
||||
if (b[2] & 0x40) return 1;
|
||||
// 3 byte sequence
|
||||
else if ((b[1] & 0xe0) == 0xe0) return 2;
|
||||
// 4 byte sequence
|
||||
else if ((b[0] & 0xf0) == 0xf0) return 3;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
} //namespace utf8
|
||||
} //namespace funcexp
|
||||
|
||||
|
@ -41,6 +41,8 @@
|
||||
|
||||
#include "joblisttypes.h"
|
||||
|
||||
#include "utils_utf8.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace boost;
|
||||
using namespace execplan;
|
||||
@ -513,7 +515,8 @@ void BulkLoadBuffer::convert(char *field, int fieldLength,
|
||||
// on disk (e.g. 5 for a varchar(5) instead of 8).
|
||||
if (fieldLength > column.definedWidth)
|
||||
{
|
||||
memcpy( charTmpBuf, field, column.definedWidth );
|
||||
uint8_t truncate_point = funcexp::utf8::utf8_truncate_point(field, column.definedWidth);
|
||||
memcpy( charTmpBuf, field, column.definedWidth - truncate_point );
|
||||
bufStats.satCount++;
|
||||
}
|
||||
else
|
||||
|
@ -47,6 +47,7 @@ using namespace BRM;
|
||||
#include "IDBPolicy.h"
|
||||
#include "cacheutils.h"
|
||||
using namespace idbdatafile;
|
||||
#include "utils_utf8.h"
|
||||
|
||||
namespace
|
||||
{
|
||||
@ -823,7 +824,8 @@ int Dctnry::insertDctnry(const char* buf,
|
||||
// @Bug 2565: Truncate any strings longer than schema's column width
|
||||
if (curSig.size > m_colWidth)
|
||||
{
|
||||
curSig.size = m_colWidth;
|
||||
uint8_t truncate_point = funcexp::utf8::utf8_truncate_point((const char*)curSig.signature, m_colWidth);
|
||||
curSig.size = m_colWidth - truncate_point;
|
||||
++truncCount;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user