From f805478eb91173676012c481e8dc81511707963e Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Fri, 8 Feb 2019 17:55:50 +0000 Subject: [PATCH 1/2] MCOL-2149 Fix cpimport decimal saturation If we saturate int64_t during string -> decimal conversion then end processing there instead of continuing. This preserves a good saturation value. --- writeengine/shared/we_convertor.cpp | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/writeengine/shared/we_convertor.cpp b/writeengine/shared/we_convertor.cpp index 8ad344ce3..7dcad3986 100644 --- a/writeengine/shared/we_convertor.cpp +++ b/writeengine/shared/we_convertor.cpp @@ -182,19 +182,26 @@ long long Convertor::convertDecimalString( { long double dval = strtold(field, NULL); long long ret = 0; - + // move scale digits to the left of the decimal point for (int i = 0; i < scale; i++) dval *= 10; - + // range check against int64 - if (dval > LLONG_MAX || dval < LLONG_MIN) + if (dval > LLONG_MAX) + { errno = ERANGE; - else - errno = 0; - + return LLONG_MAX; + } + if (dval < LLONG_MIN) + { + errno = ERANGE; + return LLONG_MIN; + } + errno = 0; + ret = dval; - + // get the fractional part of what's left & round ret up or down. dval -= ret; if (dval >= 0.5 && ret < LLONG_MAX) From 9c71f3d48086b5963a020cc9bd9d2316ca22a0cd Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Wed, 13 Feb 2019 21:23:08 +0000 Subject: [PATCH 2/2] Bump version to 1.0.17 --- README.md | 8 ++++---- VERSION | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 3ad645174..bac34bdd2 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -#MariaDB ColumnStore Storage/Execution engine 1.0.16 -MariaDB ColumnStore 1.0.16 is the development version of MariaDB ColumnStore. -It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.35 and adding entirely +#MariaDB ColumnStore Storage/Execution engine 1.0.17 +MariaDB ColumnStore 1.0.17 is the development version of MariaDB ColumnStore. +It is built by porting InfiniDB 4.6.7 on MariaDB 10.1 and adding entirely new features not found anywhere else. -#MariaDB ColumnStore 1.0.16 is an GA release. +#MariaDB ColumnStore 1.0.17 is an GA release. #Building This repository is not meant to be built independently outside of the server. This repository is integrated into http://mariadb-corporation/mariadb-columnstore-server (ie, the *server*) as a git submodule. As such, you can find complete build instructions on *the server* page. diff --git a/VERSION b/VERSION index b13a94d3f..7e6391a76 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ COLUMNSTORE_VERSION_MAJOR=1 COLUMNSTORE_VERSION_MINOR=0 -COLUMNSTORE_VERSION_PATCH=16 +COLUMNSTORE_VERSION_PATCH=17 COLUMNSTORE_VERSION_RELEASE=1