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

Add support for zero date separate to NULL

NULL is now pushed through the MariaDB storage engine plugin down to the
insert processing. A '0000-00-00' date is now a separate value to NULL.

This is more in-line with MariaDB's handling.
This commit is contained in:
Andrew Hutchings
2016-08-30 16:26:36 +01:00
parent 9a76bfc0f3
commit 25851df89d
16 changed files with 34 additions and 37 deletions

View File

@ -187,15 +187,18 @@ uint32_t buildValueList (TABLE* table, cal_connection_info& ci )
uint32_t size=0;
int columnPos = 0;
double dbval;
ci.nullValuesBitset.reset();
for (Field** field = table->field; *field; field++)
{
if((*field)->is_null())
{
ci.tableValuesMap[columnPos].push_back (""); //currently, empty string is treated as null.
ci.nullValuesBitset[columnPos] = true;
}
else
{
bitmap_set_bit(table->read_set, (*field)->field_index);
ci.nullValuesBitset[columnPos] = false;
// @bug 3798 get real value for float/double type
if ((*field)->result_type() == REAL_RESULT)
{
@ -330,7 +333,7 @@ int doProcessInsertValues ( TABLE* table, uint32_t size, cal_connection_info& ci
VendorDMLStatement dmlStmts(idb_mysql_query_str(thd), DML_INSERT, table->s->table_name.str,
table->s->db.str, size, ci.colNameList.size(), ci.colNameList,
ci.tableValuesMap, sessionID);
ci.tableValuesMap, ci.nullValuesBitset, sessionID);
CalpontDMLPackage* pDMLPackage = CalpontDMLFactory::makeCalpontDMLPackageFromMysqlBuffer(dmlStmts);
//@Bug 2466 Move the clean up earlier to avoid the second insert in another session to get the data