From e2141e0b69ab82ba580faf2dcef1b0f5b673b32e Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Thu, 7 Jun 2018 12:41:44 +0100 Subject: [PATCH] MCOL-1418 Fix negative time storage for LDI --- dbcon/mysql/ha_calpont_dml.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbcon/mysql/ha_calpont_dml.cpp b/dbcon/mysql/ha_calpont_dml.cpp index cf103a801..a9b64b757 100644 --- a/dbcon/mysql/ha_calpont_dml.cpp +++ b/dbcon/mysql/ha_calpont_dml.cpp @@ -895,6 +895,10 @@ int ha_calpont_impl_write_batch_row_(uchar* buf, TABLE* table, cal_impl_if::cal_ longlong tmp = my_time_packed_from_binary(pos, table->field[colpos]->decimals()); TIME_from_longlong_time_packed(<ime, tmp); + if (ltime.neg) + { + fprintf(ci.filePtr, "-"); + } if (!ltime.second_part) { fprintf(ci.filePtr, "%02d:%02d:%02d%c",