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
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:
@ -40,10 +40,6 @@ DMLColumn::DMLColumn(std::string name, std::string value, bool isFromCol, uint32
|
|||||||
{
|
{
|
||||||
fName = name;
|
fName = name;
|
||||||
fData = value;
|
fData = value;
|
||||||
if (( strcasecmp(value.c_str(), "NULL") == 0) || (value.length() == 0) )
|
|
||||||
{
|
|
||||||
isNULL = true;
|
|
||||||
}
|
|
||||||
fisNULL = isNULL;
|
fisNULL = isNULL;
|
||||||
fIsFromCol = isFromCol;
|
fIsFromCol = isFromCol;
|
||||||
fFuncScale = funcScale;
|
fFuncScale = funcScale;
|
||||||
|
@ -409,8 +409,9 @@ public:
|
|||||||
std::string fColumn;
|
std::string fColumn;
|
||||||
std::string fOperator;
|
std::string fOperator;
|
||||||
std::string fScalarExpression;
|
std::string fScalarExpression;
|
||||||
bool fFromCol;
|
bool fFromCol;
|
||||||
uint32_t fFuncScale;
|
uint32_t fFuncScale;
|
||||||
|
bool fIsNull = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
/** @brief Stores a value list or a query specification
|
/** @brief Stores a value list or a query specification
|
||||||
|
@ -245,7 +245,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;
|
||||||
|
@ -1044,8 +1044,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 )
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user