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

MCOL-2051: CS uses 'NULL' literal as NULL when UPDATEs varchar field: proxying NULL value. Note: empty strings are still considered NULLs later on.

This commit is contained in:
Sergey Sedov
2019-04-26 11:10:29 +03:00
committed by sianur
parent e078d701f3
commit 83aad0c7b1
4 changed files with 7 additions and 8 deletions

View File

@ -40,10 +40,6 @@ DMLColumn::DMLColumn(std::string name, std::string value, bool isFromCol, uint32
{
fName = name;
fData = value;
if (( strcasecmp(value.c_str(), "NULL") == 0) || (value.length() == 0) )
{
isNULL = true;
}
fisNULL = isNULL;
fIsFromCol = isFromCol;
fFuncScale = funcScale;

View File

@ -409,8 +409,9 @@ public:
std::string fColumn;
std::string fOperator;
std::string fScalarExpression;
bool fFromCol;
uint32_t fFuncScale;
bool fFromCol;
uint32_t fFuncScale;
bool fIsNull = false;
};
/** @brief Stores a value list or a query specification

View File

@ -245,7 +245,8 @@ void UpdateDMLPackage::buildUpdateFromMysqlBuffer(UpdateSqlStatement& updateStm
while (iter != updateStmt.fColAssignmentListPtr->end())
{
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);
++iter;