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

MCOL-1427 Fix microsecond padding for display

We were padding from right, we needed to pad from left.
This commit is contained in:
Andrew Hutchings
2018-06-04 19:57:42 +01:00
parent 51afdc98fc
commit 6948ab85a3
3 changed files with 9 additions and 33 deletions

View File

@ -582,7 +582,7 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
*(*f)->null_ptr &= ~(*f)->null_bit;
intColVal = row.getUintField<8>(s);
DataConvert::datetimeToString(intColVal, tmp, 255);
DataConvert::datetimeToString(intColVal, tmp, 255, colType.precision);
/* setting the field_length is a sort-of hack. The length
* at this point can be long enough to include mseconds.
@ -606,7 +606,7 @@ int fetchNextRow(uchar* buf, cal_table_info& ti, cal_connection_info* ci, bool h
*(*f)->null_ptr &= ~(*f)->null_bit;
intColVal = row.getUintField<8>(s);
DataConvert::timeToString(intColVal, tmp, 255);
DataConvert::timeToString(intColVal, tmp, 255, colType.precision);
Field_varstring* f2 = (Field_varstring*)*f;
f2->store(tmp, strlen(tmp), f2->charset());