From 7fa7dddc9bc920a3a5078ed8ddfcb5838ff4babd Mon Sep 17 00:00:00 2001 From: david hill Date: Wed, 23 May 2018 14:45:47 -0500 Subject: [PATCH 01/11] bump release --- README | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 8186d1ed7..ca0d9cd19 100644 --- a/README +++ b/README @@ -1,9 +1,9 @@ -This is MariaDB ColumnStore 1.0.12 -MariaDB ColumnStore 1.0.12 is the development version of MariaDB ColumnStore. +This is MariaDB ColumnStore 1.0.14 +MariaDB ColumnStore 1.0.14 is the development version of MariaDB ColumnStore. It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.26 and adding entirely new features not found anywhere else. -MariaDB ColumnStore 1.0.12 is an GA release. This is the first MariaDB +MariaDB ColumnStore 1.0.14 is an GA release. This is the first MariaDB ColumnStore release, not all features planned for the MariaDB ColumnStore 1.0 series are included in this release. From 60eb6516a25bc49a45adb2f4613a885458d9d058 Mon Sep 17 00:00:00 2001 From: david hill Date: Wed, 23 May 2018 14:46:31 -0500 Subject: [PATCH 02/11] bump release --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 40c1e99ec..5cd3824eb 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -#MariaDB ColumnStore Storage/Execution engine 1.0.12 -MariaDB ColumnStore 1.0.12 is the development version of MariaDB ColumnStore. +#MariaDB ColumnStore Storage/Execution engine 1.0.14 +MariaDB ColumnStore 1.0.14 is the development version of MariaDB ColumnStore. It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.26 and adding entirely new features not found anywhere else. -#MariaDB ColumnStore 1.0.12 is an GA release. +#MariaDB ColumnStore 1.0.14 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. From 4ad2c0a8f2cb77554db2f9a7311522e5bfa6c046 Mon Sep 17 00:00:00 2001 From: david hill Date: Wed, 23 May 2018 14:47:05 -0500 Subject: [PATCH 03/11] bump release --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 7053d9518..1e84dad87 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ COLUMNSTORE_VERSION_MAJOR=1 COLUMNSTORE_VERSION_MINOR=0 -COLUMNSTORE_VERSION_PATCH=13 +COLUMNSTORE_VERSION_PATCH=14 COLUMNSTORE_VERSION_RELEASE=1 From 6664dc832c99ea3c181288d712f5f9cc0896d547 Mon Sep 17 00:00:00 2001 From: David Hill Date: Thu, 16 Aug 2018 08:27:47 -0500 Subject: [PATCH 04/11] update version to 1.0.15 --- README | 8 ++++---- README.md | 8 ++++---- VERSION | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/README b/README index ca0d9cd19..3eac5c82e 100644 --- a/README +++ b/README @@ -1,9 +1,9 @@ -This is MariaDB ColumnStore 1.0.14 -MariaDB ColumnStore 1.0.14 is the development version of MariaDB ColumnStore. -It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.26 and adding entirely +This is MariaDB ColumnStore 1.0.15 +MariaDB ColumnStore 1.0.15 is the development version of MariaDB ColumnStore. +It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.28 and adding entirely new features not found anywhere else. -MariaDB ColumnStore 1.0.14 is an GA release. This is the first MariaDB +MariaDB ColumnStore 1.0.15 is an GA release. This is the first MariaDB ColumnStore release, not all features planned for the MariaDB ColumnStore 1.0 series are included in this release. diff --git a/README.md b/README.md index 5cd3824eb..aa84a12ea 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -#MariaDB ColumnStore Storage/Execution engine 1.0.14 -MariaDB ColumnStore 1.0.14 is the development version of MariaDB ColumnStore. -It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.26 and adding entirely +#MariaDB ColumnStore Storage/Execution engine 1.0.15 +MariaDB ColumnStore 1.0.15 is the development version of MariaDB ColumnStore. +It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.28 and adding entirely new features not found anywhere else. -#MariaDB ColumnStore 1.0.14 is an GA release. +#MariaDB ColumnStore 1.0.15 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 1e84dad87..50ab911ca 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ COLUMNSTORE_VERSION_MAJOR=1 COLUMNSTORE_VERSION_MINOR=0 -COLUMNSTORE_VERSION_PATCH=14 +COLUMNSTORE_VERSION_PATCH=15 COLUMNSTORE_VERSION_RELEASE=1 From bccd2acd4001579853a0f68b90c6262b65354012 Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Thu, 16 Aug 2018 15:57:42 +0100 Subject: [PATCH 05/11] Update README.md Fix server version --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index aa84a12ea..6a43e516e 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ #MariaDB ColumnStore Storage/Execution engine 1.0.15 MariaDB ColumnStore 1.0.15 is the development version of MariaDB ColumnStore. -It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.28 and adding entirely +It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.35 and adding entirely new features not found anywhere else. #MariaDB ColumnStore 1.0.15 is an GA release. From 9cb83957701516eb735bfee89a4f0ecb5e9a2f4a Mon Sep 17 00:00:00 2001 From: Andrew Hutchings Date: Thu, 16 Aug 2018 15:58:01 +0100 Subject: [PATCH 06/11] Update README Fix server version --- README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README b/README index 3eac5c82e..6e3bf8d59 100644 --- a/README +++ b/README @@ -1,6 +1,6 @@ This is MariaDB ColumnStore 1.0.15 MariaDB ColumnStore 1.0.15 is the development version of MariaDB ColumnStore. -It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.28 and adding entirely +It is built by porting InfiniDB 4.6.7 on MariaDB 10.1.35 and adding entirely new features not found anywhere else. MariaDB ColumnStore 1.0.15 is an GA release. This is the first MariaDB From 36a2a7e2774280b816ee3ae7d403e22e6fc64cbe Mon Sep 17 00:00:00 2001 From: david hill Date: Mon, 20 Aug 2018 10:50:42 -0500 Subject: [PATCH 07/11] bump version to 1.0.16 --- README | 6 +++--- README.md | 6 +++--- VERSION | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README b/README index 6e3bf8d59..ccc95c61b 100644 --- a/README +++ b/README @@ -1,9 +1,9 @@ -This is MariaDB ColumnStore 1.0.15 -MariaDB ColumnStore 1.0.15 is the development version of MariaDB ColumnStore. +This is MariaDB ColumnStore 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 new features not found anywhere else. -MariaDB ColumnStore 1.0.15 is an GA release. This is the first MariaDB +MariaDB ColumnStore 1.0.16 is an GA release. This is the first MariaDB ColumnStore release, not all features planned for the MariaDB ColumnStore 1.0 series are included in this release. diff --git a/README.md b/README.md index 6a43e516e..3ad645174 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ -#MariaDB ColumnStore Storage/Execution engine 1.0.15 -MariaDB ColumnStore 1.0.15 is the development version of MariaDB ColumnStore. +#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 new features not found anywhere else. -#MariaDB ColumnStore 1.0.15 is an GA release. +#MariaDB ColumnStore 1.0.16 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 50ab911ca..b13a94d3f 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ COLUMNSTORE_VERSION_MAJOR=1 COLUMNSTORE_VERSION_MINOR=0 -COLUMNSTORE_VERSION_PATCH=15 +COLUMNSTORE_VERSION_PATCH=16 COLUMNSTORE_VERSION_RELEASE=1 From 60fb620dcb4b213a3a5c81292c0acae925a714cd Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Mon, 5 Nov 2018 13:33:56 -0600 Subject: [PATCH 08/11] MCOL-1654. Querystats table creation broken. Escaped the ` chars to make the shell happy. Conflicts: dbcon/mysql/install_calpont_mysql.sh --- dbcon/mysql/install_calpont_mysql.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dbcon/mysql/install_calpont_mysql.sh b/dbcon/mysql/install_calpont_mysql.sh index 9b55f9448..ecea9d503 100755 --- a/dbcon/mysql/install_calpont_mysql.sh +++ b/dbcon/mysql/install_calpont_mysql.sh @@ -99,7 +99,7 @@ CREATE TABLE IF NOT EXISTS infinidb_querystats.querystats query varchar(8000), startTime timestamp NOT NULL, endTime timestamp NOT NULL, - rows bigint, + \`rows\` bigint, errno int, phyIO bigint, cacheIO bigint, From 35662d3258b9329a944477fcddf1e02f212ed84e Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Wed, 14 Nov 2018 17:15:14 -0600 Subject: [PATCH 09/11] MCOL-1844. Preserve user-added args in 'myCnf-include-args.text' across upgrades. --- oam/install_scripts/pre-uninstall | 1 + oamapps/postConfigure/mycnfUpgrade.cpp | 59 +++++++++++++++++++++++++- 2 files changed, 59 insertions(+), 1 deletion(-) diff --git a/oam/install_scripts/pre-uninstall b/oam/install_scripts/pre-uninstall index 8709d369c..8621cd9ac 100755 --- a/oam/install_scripts/pre-uninstall +++ b/oam/install_scripts/pre-uninstall @@ -153,6 +153,7 @@ if [ $quiet != 1 ]; then #make copy of Columnstore.xml /bin/cp -f $installdir/etc/Columnstore.xml $installdir/etc/Columnstore.xml.rpmsave > /dev/null 2>&1 /bin/cp -f $installdir/mysql/my.cnf $installdir/mysql/my.cnf.rpmsave > /dev/null 2>&1 + cp $installdir/bin/myCnf-include-args.text $installdir/bin/myCnf-include-args.text.rpmsave >& /dev/null rm -f $installdir/etc/AlarmConfig.xml.installSave fi diff --git a/oamapps/postConfigure/mycnfUpgrade.cpp b/oamapps/postConfigure/mycnfUpgrade.cpp index a8808e740..18b606a2b 100644 --- a/oamapps/postConfigure/mycnfUpgrade.cpp +++ b/oamapps/postConfigure/mycnfUpgrade.cpp @@ -54,6 +54,59 @@ using namespace std; using namespace oam; + +/* MCOL-1844. On an upgrade, the user may have customized options in their old + * myCnf-include-args.text file. Merge it with the packaged version, and then process as we + * have before. + */ +string rtrim(const string &in) { + string::const_reverse_iterator rbegin = in.rbegin(); + while (rbegin != in.rend() && isspace(*rbegin)) + ++rbegin; + return string(in.begin(), rbegin.base()); +} + +void mergeMycnfIncludeArgs() +{ + string userArgsFilename = startup::StartUp::installDir() + "/bin/myCnf-include-args.text.rpmsave"; + string packagedArgsFilename = startup::StartUp::installDir() + "/bin/myCnf-include-args.text"; + ifstream userArgs(userArgsFilename.c_str()); + fstream packagedArgs(packagedArgsFilename.c_str(), ios::in); + + if (!userArgs || !packagedArgs) + return; + + // de-dup the args and comments in both files + set argMerger; + set comments; + string line; + while (getline(packagedArgs, line)) { + line = rtrim(line); + if (line[0] == '#') + comments.insert(line); + else if (line.size() > 0) + argMerger.insert(line); + } + while (getline(userArgs, line)) { + line = rtrim(line); + if (line[0] == '#') + comments.insert(line); + else if (line.size() > 0) + argMerger.insert(line); + } + userArgs.close(); + packagedArgs.close(); + + // write the merged version, comments first. They'll get ordered + // alphabetically but, meh. + packagedArgs.open(packagedArgsFilename.c_str(), ios::out | ios::trunc); + for (set::iterator it = comments.begin(); it != comments.end(); it++) + packagedArgs << *it << endl; + for (set::iterator it = argMerger.begin(); it != argMerger.end(); it++) + packagedArgs << *it << endl; + packagedArgs.close(); +} + int main(int argc, char *argv[]) { Oam oam; @@ -84,6 +137,10 @@ int main(int argc, char *argv[]) exit (1); } + // MCOL-1844. The user may have added options to their myCnf-include-args file. Merge + // myCnf-include-args.text with myCnf-include-args.text.rpmsave, save in myCnf-include-args.text + mergeMycnfIncludeArgs(); + //include arguments file string includeFile = startup::StartUp::installDir() + "/bin/myCnf-include-args.text"; ifstream includefile (includeFile.c_str()); @@ -144,7 +201,7 @@ int main(int argc, char *argv[]) ofstream newFile (mycnfFile.c_str()); //create new file - int fd = open(mycnfFile.c_str(), O_RDWR|O_CREAT, 0666); + int fd = open(mycnfFile.c_str(), O_RDWR|O_CREAT, 0644); copy(lines.begin(), lines.end(), ostream_iterator(newFile, "\n")); newFile.close(); From 165a5c76bf75548109602f3415541d5a4157e54f Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Thu, 15 Nov 2018 09:14:20 -0600 Subject: [PATCH 10/11] MCOL-1844. Removed an unassociated change I made. --- oamapps/postConfigure/mycnfUpgrade.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oamapps/postConfigure/mycnfUpgrade.cpp b/oamapps/postConfigure/mycnfUpgrade.cpp index 18b606a2b..75b9a3d3a 100644 --- a/oamapps/postConfigure/mycnfUpgrade.cpp +++ b/oamapps/postConfigure/mycnfUpgrade.cpp @@ -201,7 +201,7 @@ int main(int argc, char *argv[]) ofstream newFile (mycnfFile.c_str()); //create new file - int fd = open(mycnfFile.c_str(), O_RDWR|O_CREAT, 0644); + int fd = open(mycnfFile.c_str(), O_RDWR|O_CREAT, 0666); copy(lines.begin(), lines.end(), ostream_iterator(newFile, "\n")); newFile.close(); From fe94776ac6248da418de13fa1d732b1d7559f80c Mon Sep 17 00:00:00 2001 From: Patrick LeBlanc Date: Wed, 9 Jan 2019 16:31:38 -0600 Subject: [PATCH 11/11] MCOL-2062: bug parsing scientific notation in cpimport Made it use strtold instead of the 'manual' string parsing stuff it was doing. --- writeengine/shared/we_convertor.cpp | 107 +++++++--------------------- 1 file changed, 24 insertions(+), 83 deletions(-) diff --git a/writeengine/shared/we_convertor.cpp b/writeengine/shared/we_convertor.cpp index f4ad696d2..8ad344ce3 100644 --- a/writeengine/shared/we_convertor.cpp +++ b/writeengine/shared/we_convertor.cpp @@ -174,93 +174,34 @@ const std::string Convertor::int2Str(int val) * converted long long for specified "field" ******************************************************************************/ /* static */ + long long Convertor::convertDecimalString( const char* field, - int fieldLength, - int scale ) + int fieldLength, + int scale) { - long long llVal = 0; - - int nDigitsBeforeDecPt = 0; - int nDigitsAfterDecPt = 0; - long long roundUp = 0; //@bug 3405 round off decimal column values - - // Determine the number of digits before and after the decimal point - char* posDecPt = (char*)memchr(field, '.', fieldLength); - if (posDecPt) - { - nDigitsBeforeDecPt = posDecPt - field; - nDigitsAfterDecPt = fieldLength - nDigitsBeforeDecPt - 1; - - //@bug 3405 round off decimal column values - // We look at the scale+1 digit to see if we need to round up. - if (nDigitsAfterDecPt > scale) - { - char roundOffDigit = *(posDecPt + 1 + scale); - if ( (roundOffDigit > '4') && - (roundOffDigit <='9') ) // round up - { - roundUp = 1; - - // We can't just use the sign of llVal to determine whether to - // add +1 or -1, because if we read in -0.005 with scale 2, we - // end up parsing "-0.00", which yields 0; meaning we lose the - // sign. So better (though maybe slower) to look for any lead- - // ing negative sign in the input string. - for (int k=0; k LLONG_MAX || dval < LLONG_MIN) + errno = ERANGE; else - { - nDigitsBeforeDecPt = fieldLength; - nDigitsAfterDecPt = 0; - } - - // Strip out the decimal point by stringing together - // the digits before and after the decimal point. - char* data = (char*)alloca(nDigitsBeforeDecPt + scale + 1); - memcpy(data, field, nDigitsBeforeDecPt); - if (nDigitsAfterDecPt) - { - if (scale > nDigitsAfterDecPt) - memcpy(data + nDigitsBeforeDecPt, - field + nDigitsBeforeDecPt + 1, - nDigitsAfterDecPt); - else // (scale <= nDigitsAfterDecPt) - memcpy(data + nDigitsBeforeDecPt, - field + nDigitsBeforeDecPt + 1, - scale); - } - - // Add on any necessary zero padding at the end - if (scale > nDigitsAfterDecPt) - { - memset(data + nDigitsBeforeDecPt + nDigitsAfterDecPt, - '0', - scale - nDigitsAfterDecPt); - } - - data[nDigitsBeforeDecPt + scale] = '\0'; - - // Convert our constructed decimal string back to a long long - //@bug 1814 Force strtoll to use base 10 - errno = 0; - llVal = strtoll(data, 0, 10); - - //@bug 3405 round off decimal values - if ((roundUp) && (errno == 0)) - llVal += roundUp; - - return llVal; + 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) + ++ret; + else if (dval <= -0.5 && ret > LLONG_MIN) + --ret; + return ret; } /*******************************************************************************