1
0
mirror of https://github.com/mariadb-corporation/mariadb-columnstore-engine.git synced 2025-08-01 06:46:55 +03:00

MCOL-341 Fix DATETIME2 support in INSERT...SELECT

DATETIME2 has a variable pack length but we were using a constant length
of 8 if the value was NULL. This messed up the offset for the next
column.
This commit is contained in:
Andrew Hutchings
2016-10-03 15:51:47 +01:00
parent 2279c03f4b
commit 5fad418309

View File

@ -774,7 +774,10 @@ int ha_calpont_impl_write_batch_row_(uchar *buf, TABLE* table, cal_impl_if::cal_
if (nullVal && (ci.columnTypes[colpos].constraintType != CalpontSystemCatalog::NOTNULL_CONSTRAINT))
{
fprintf(ci.filePtr, "%c", ci.delimiter);
buf += 8;
if (table->field[colpos]->real_type() == MYSQL_TYPE_DATETIME2)
buf += table->field[colpos]->pack_length();
else
buf += 8;
}
else
{