1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-07-14 16:40:59 +03:00

Fix MCOL-5035, a difference in INSERT and UPDATE behavior

The UPDATE statement wrote NULL when the column set is DATETIME and
value is '0000-00-00 00:00:00'. The problem was inside WriteEngine's
handling of UPDATE statements and this is where heart of change is.

Other changes are related to some obsolete data structures in DML/DDL
handling that just hanging around there, doing nothing.
This commit is contained in:
Serguey Zefirov
2024-02-21 13:48:19 +03:00
committed by Sergey Zefirov
parent 2c44af30c7
commit 2cd8f716c1
5 changed files with 36 additions and 70 deletions

View File

@ -3696,16 +3696,6 @@ uint8_t WE_DMLCommandProc::processUpdate(messageqcpp::ByteStream& bs, std::strin
inData = columnsUpdated[j]->get_DataVector()[0];
}
if (((colType.colDataType == execplan::CalpontSystemCatalog::DATE) && (inData.safeString("").compare("0000-00-00") == 0)) ||
((colType.colDataType == execplan::CalpontSystemCatalog::DATETIME) &&
(inData.safeString("").compare("0000-00-00 00:00:00") == 0)) ||
((colType.colDataType == execplan::CalpontSystemCatalog::TIMESTAMP) &&
(inData.safeString("").compare("0000-00-00 00:00:00") == 0)))
{
inData.dropString();
isNull = true;
}
uint64_t nextVal = 0;
if (colType.autoincrement)