1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-30 19:23:07 +03:00

Merge branch 'develop-1.1' into develop-1.2-merge-up-20190514

This commit is contained in:
Andrew Hutchings
2019-05-14 14:26:41 +01:00
8 changed files with 36 additions and 22 deletions

View File

@ -566,17 +566,11 @@ assignment_commalist:
assignment: assignment:
column COMPARISON scalar_exp column COMPARISON scalar_exp
{ {
$$ = new ColumnAssignment(); $$ = new ColumnAssignment($1, $2, $3);
$$->fColumn = $1;
$$->fOperator = $2;
$$->fScalarExpression = $3;
} }
| column COMPARISON NULLX | column COMPARISON NULLX
{ {
$$ = new ColumnAssignment(); $$ = new ColumnAssignment($1, $2, $3);
$$->fColumn = $1;
$$->fOperator = $2;
$$->fScalarExpression = $3;
} }
; ;

View File

@ -409,6 +409,14 @@ public:
class ColumnAssignment class ColumnAssignment
{ {
public: public:
explicit ColumnAssignment(
std::string const& column,
std::string const& op = "=",
std::string const& expr = "") :
fColumn(column), fOperator(op), fScalarExpression(expr),
fFromCol(false), fFuncScale(0), fIsNull(false)
{};
/** @brief dump to stdout /** @brief dump to stdout
*/ */
std::ostream& put(std::ostream& os) const; std::ostream& put(std::ostream& os) const;
@ -423,6 +431,7 @@ public:
std::string fScalarExpression; std::string fScalarExpression;
bool fFromCol; bool fFromCol;
uint32_t fFuncScale; uint32_t fFuncScale;
bool fIsNull;
}; };
/** @brief Stores a value list or a query specification /** @brief Stores a value list or a query specification

View File

@ -257,7 +257,8 @@ void UpdateDMLPackage::buildUpdateFromMysqlBuffer(UpdateSqlStatement& updateStm
while (iter != updateStmt.fColAssignmentListPtr->end()) while (iter != updateStmt.fColAssignmentListPtr->end())
{ {
ColumnAssignment* colaPtr = *iter; ColumnAssignment* colaPtr = *iter;
DMLColumn* colPtr = new DMLColumn(colaPtr->fColumn, colaPtr->fScalarExpression, colaPtr->fFromCol, colaPtr->fFuncScale); DMLColumn* colPtr = new DMLColumn(colaPtr->fColumn, colaPtr->fScalarExpression, colaPtr->fFromCol, colaPtr->fFuncScale,
colaPtr->fIsNull);
rowPtr->get_ColumnList().push_back(colPtr); rowPtr->get_ColumnList().push_back(colPtr);
++iter; ++iter;

View File

@ -1095,10 +1095,7 @@ uint32_t doUpdateDelete(THD* thd)
else else
schemaName = string(item->db_name); schemaName = string(item->db_name);
columnAssignmentPtr = new ColumnAssignment(); columnAssignmentPtr = new ColumnAssignment(item->name, "=", "");
columnAssignmentPtr->fColumn = string(item->name.str);
columnAssignmentPtr->fOperator = "=";
columnAssignmentPtr->fFuncScale = 0;
Item* value = value_it++; Item* value = value_it++;
if (value->type() == Item::STRING_ITEM) if (value->type() == Item::STRING_ITEM)
@ -1222,8 +1219,9 @@ uint32_t doUpdateDelete(THD* thd)
else if ( value->type() == Item::NULL_ITEM ) else if ( value->type() == Item::NULL_ITEM )
{ {
// dmlStmt += "NULL"; // dmlStmt += "NULL";
columnAssignmentPtr->fScalarExpression = "NULL"; columnAssignmentPtr->fScalarExpression = "";
columnAssignmentPtr->fFromCol = false; columnAssignmentPtr->fFromCol = false;
columnAssignmentPtr->fIsNull = true;
} }
else if ( value->type() == Item::SUBSELECT_ITEM ) else if ( value->type() == Item::SUBSELECT_ITEM )
{ {

View File

@ -899,9 +899,9 @@ int processCommand(string* arguments)
SendToWES(oam, bs); SendToWES(oam, bs);
} }
#if _MSC_VER #if _MSC_VER
if (_strnicmp(arguments[1].c_str(), "stop", 4) == 0)) else if (_strnicmp(arguments[1].c_str(), "stop", 4) == 0))
#else #else
if (strncasecmp(arguments[1].c_str(), "stop", 4) == 0) else if (strncasecmp(arguments[1].c_str(), "stop", 4) == 0)
#endif #endif
{ {
ByteStream bs; ByteStream bs;
@ -913,9 +913,9 @@ int processCommand(string* arguments)
SendToWES(oam, bs); SendToWES(oam, bs);
} }
#if _MSC_VER #if _MSC_VER
if (_strnicmp(arguments[1].c_str(), "status", 6) == 0)) else if (_strnicmp(arguments[1].c_str(), "status", 6) == 0))
#else #else
if (strncasecmp(arguments[1].c_str(), "status", 6) == 0) else if (strncasecmp(arguments[1].c_str(), "status", 6) == 0)
#endif #endif
{ {
ByteStream bs; ByteStream bs;

View File

@ -5336,7 +5336,7 @@ bool storageSetup(bool amazonInstall)
if ( (glusterInstalled == "y" && singleServerInstall != "1") && hadoopInstalled == "y" ) if ( (glusterInstalled == "y" && singleServerInstall != "1") && hadoopInstalled == "y" )
{ {
cout << "There are 5 options when configuring the storage: internal, external, DataRedundancy, or hdfs" << endl << endl; cout << "There are 4 options when configuring the storage: internal, external, DataRedundancy, or hdfs" << endl << endl;
prompt = "Select the type of Data Storage [1=internal, 2=external, 3=DataRedundancy, 4=hdfs] (" + storageType + ") > "; prompt = "Select the type of Data Storage [1=internal, 2=external, 3=DataRedundancy, 4=hdfs] (" + storageType + ") > ";
} }

View File

@ -267,7 +267,7 @@ void diskMonitor()
blksize = buf.f_bsize; blksize = buf.f_bsize;
blocks = buf.f_blocks; blocks = buf.f_blocks;
freeblks = buf.f_bfree; freeblks = buf.f_bavail;
totalBlocks = blocks * blksize; totalBlocks = blocks * blksize;
free = freeblks * blksize; free = freeblks * blksize;
@ -396,7 +396,7 @@ void diskMonitor()
blksize = buf.f_bsize; blksize = buf.f_bsize;
blocks = buf.f_blocks; blocks = buf.f_blocks;
freeblks = buf.f_bfree; freeblks = buf.f_bavail;
totalBlocks = blocks * blksize; totalBlocks = blocks * blksize;
free = freeblks * blksize; free = freeblks * blksize;

View File

@ -359,7 +359,19 @@ int main(int argc, char* argv[])
exit(-1); exit(-1);
} }
//setup System Language // WaitPeriod
try
{
string waitPeriod = sysConfigOld->getConfig(SystemSection, "WaitPeriod");
if (waitPeriod.length() > 0)
{
sysConfigNew->setConfig(SystemSection, "WaitPeriod", waitPeriod);
}
}
catch (...)
{ }
//setup System Language
string systemLang = "C"; string systemLang = "C";
try try