From 1fce2e421de4a72d00e4af9a7012290b70557224 Mon Sep 17 00:00:00 2001 From: "shuai.lou" Date: Tue, 2 Nov 2021 20:42:47 +0800 Subject: [PATCH 1/2] Update README.md. rename STATIC_LIB to STATIC_LIBRARY. --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 9bc985c..2223c01 100644 --- a/README.md +++ b/README.md @@ -34,7 +34,7 @@ reducer.sh is a powerful multi-threaded SQL testcase simplification tool. It is * *WEBSCALESQL* - **OFF** by default, build pquery with WebScaleSQL support * *MYSQL* - **OFF** by default, build pquery with Oracle MySQL support * *MARIADB* - **OFF** by default, build pquery with MariaDB support. - * *STATIC_LIB* - **ON** by default, compile pquery using the MySQL | Percona Server | WebScaleSQL static client library instead of the dynamic one. For most distributions, the static library is included in standard downloads and definitely if you build MySQL/Percona Server yourself. Note however that for MariaDB, no static client library is provided with the standard MariaDB optimized package, so pquery will automatically compile MariaDB with a shared library (which has to be installed on the OS first, i.e. yum/apt-get install mariadb-devel). In other words, when using -DMARIADB=ON, this option is turned off by default. + * *STATIC_LIBRARY* - **ON** by default, compile pquery using the MySQL | Percona Server | WebScaleSQL static client library instead of the dynamic one. For most distributions, the static library is included in standard downloads and definitely if you build MySQL/Percona Server yourself. Note however that for MariaDB, no static client library is provided with the standard MariaDB optimized package, so pquery will automatically compile MariaDB with a shared library (which has to be installed on the OS first, i.e. yum/apt-get install mariadb-devel). In other words, when using -DMARIADB=ON, this option is turned off by default. * *STRICT_CPU* - **OFF** by default, compile pquery without processor optimization. This allows running the binary on all types of processors. If this is enabled, the binary is strictly bound to the CPU used at the time of building, and may therefore work only on the machine it was built on. Enable it to favor performance over portability. When enabled, pquery will be built with `-march=native` and `-mtune=generic` resulting in all of the registers and capabilities from the currently installed CPU being used. * *STRICT_FLAGS* - **ON** by default, compile pquery with many compiler warnings enabled * *CMAKE_BUILD_TYPE* - **Release** by default, other options are **Debug**, **RelWithDebInfo**, **MinSizeRel**. For more informaton see https://cmake.org/cmake/help/v3.0/variable/CMAKE_BUILD_TYPE.html @@ -46,7 +46,7 @@ reducer.sh is a powerful multi-threaded SQL testcase simplification tool. It is * *pquery2-ws* for WebScaleSQL * *pquery2-md* for MariaDB -Please note that only the MySQL client library will be linked statically if STATIC_LIB is set, all other required libraries (AIO, SSL, etc) will be linked dynamically. +Please note that only the MySQL client library will be linked statically if STATIC_LIBRARY is set, all other required libraries (AIO, SSL, etc) will be linked dynamically. # Can you give an easy build example using an extracted Percona Server tarball? ``` From 6581df6a287da661743e2ea0e136f1ac84bdc9b5 Mon Sep 17 00:00:00 2001 From: "shuai.lou" Date: Tue, 2 Nov 2021 21:01:49 +0800 Subject: [PATCH 2/2] =?UTF-8?q?fix=20compile=20error:=20=E2=80=98strncpy?= =?UTF-8?q?=E2=80=99=20specified=20bound=2050=20equals=20destination=20siz?= =?UTF-8?q?e.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/third_party/inih++/lib/ini.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/third_party/inih++/lib/ini.c b/src/third_party/inih++/lib/ini.c index 5228f0d..ca0c537 100644 --- a/src/third_party/inih++/lib/ini.c +++ b/src/third_party/inih++/lib/ini.c @@ -52,7 +52,7 @@ static char* find_char_or_comment(const char* s, char c) { /* Version of strncpy that ensures dest (size bytes) is null-terminated. */ static char* strncpy0(char* dest, const char* src, size_t size) { - strncpy(dest, src, size); + strncpy(dest, src, size - 1); dest[size - 1] = '\0'; return dest; }