From 7e6b033507b783ff9b08ce17b2082e8dd5df7e8c Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 10 Sep 2021 18:10:54 +0200 Subject: Fix MYSQL_MAINTAINER_MODE=ERR, on Windows, with Ninja , in 10.2 A conversion warning 4267 that we want to disable(prior to 10.3), was suppressed with cmake VS generator for C++ and C, despite being set only for CXX flags. The fix is to disable the warning in C flags, too. In 10.2, this warning is noisy, in 10.3 it is fixed. --- cmake/os/Windows.cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/cmake/os/Windows.cmake b/cmake/os/Windows.cmake index 1eae92924a6..75a0d71cc2d 100644 --- a/cmake/os/Windows.cmake +++ b/cmake/os/Windows.cmake @@ -150,6 +150,7 @@ IF(MSVC) IF(CMAKE_SIZEOF_VOID_P EQUAL 8) # Temporarily disable size_t warnings, due to their amount SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4267") + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /wd4267") ENDIF() IF(MYSQL_MAINTAINER_MODE MATCHES "ERR") SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") -- cgit v1.2.1 From 879e21b68c34d252507298a53debb2c007a38177 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 10 Sep 2021 19:32:56 +0200 Subject: Define minbuild target for 10.2 --- CMakeLists.txt | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index e3930c5811f..67216e0e443 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -523,3 +523,40 @@ IF(NON_DISTRIBUTABLE_WARNING) MESSAGE(WARNING " You have linked MariaDB with ${NON_DISTRIBUTABLE_WARNING} libraries! You may not distribute the resulting binary. If you do, you will put yourself into a legal problem with the Free Software Foundation.") ENDIF() + +IF(NOT WITHOUT_SERVER) + # Define target for minimal mtr-testable build + ADD_CUSTOM_TARGET(minbuild) + ADD_DEPENDENCIES(minbuild + aria_chk + aria_pack + mysql + mysqladmin + mysqlbinlog + mysqlcheck + mysql_client_test + mysqldump + mysqlimport + mysql_plugin + mysqlshow + mysqlslap + mysqltest + mysql_tzinfo_to_sql + mysql_upgrade + mysqld + my_print_defaults + my_safe_process + myisam_ftdump + myisamchk + myisamlog + myisampack + perror + replace) + IF(WIN32) + ADD_DEPENDENCIES(minbuild echo my_safe_kill) + ENDIF() + ADD_CUSTOM_TARGET(smoketest + COMMAND perl ./mysql-test-run.pl main.1st + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/mysql-test) + ADD_DEPENDENCIES(smoketest minbuild) +ENDIF() -- cgit v1.2.1 From 3504f70f7f2017a98b929f182006b72ea494e1c0 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Sat, 11 Sep 2021 13:08:13 +0200 Subject: Bison 3.7 - fix "conversion from 'ptrdiff_t' to 'ulong', possible loss of data" --- sql/sql_parse.cc | 4 ++-- sql/sql_yacc.yy | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index f782c5c25e7..3e1f248b082 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -7226,10 +7226,10 @@ bool check_stack_overrun(THD *thd, long margin, #define MY_YACC_INIT 1000 // Start with big alloc #define MY_YACC_MAX 32000 // Because of 'short' -bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, ulong *yystacksize) +bool my_yyoverflow(short **yyss, YYSTYPE **yyvs, size_t *yystacksize) { Yacc_state *state= & current_thd->m_parser_state->m_yacc; - ulong old_info=0; + size_t old_info=0; DBUG_ASSERT(state); if ((uint) *yystacksize >= MY_YACC_MAX) return 1; diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index ec82c7f9f07..c9dbc6fa8cc 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -76,7 +76,7 @@ int yylex(void *yylval, void *yythd); #define yyoverflow(A,B,C,D,E,F) \ { \ - ulong val= *(F); \ + size_t val= *(F); \ if (my_yyoverflow((B), (D), &val)) \ { \ yyerror(thd, (char*) (A)); \ @@ -1024,7 +1024,7 @@ Virtual_column_info *add_virtual_expression(THD *thd, Item *expr) } %{ -bool my_yyoverflow(short **a, YYSTYPE **b, ulong *yystacksize); +bool my_yyoverflow(short **a, YYSTYPE **b, size_t *yystacksize); %} %pure-parser /* We have threads */ -- cgit v1.2.1 From f34517237912d5cb3a6a8d36c0fb91b99f2a1715 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Fri, 10 Sep 2021 21:40:19 +0200 Subject: MDEV-26527 speedup appveyor build - 10.2 --- appveyor.yml | 39 ++++++++++++++++++++++++--------------- 1 file changed, 24 insertions(+), 15 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 4a6a49fd8b5..f5f1b57735a 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,21 +1,30 @@ version: build-{build}~branch-{branch} -before_build: - - md %APPVEYOR_BUILD_FOLDER%\win_build - - cd %APPVEYOR_BUILD_FOLDER%\win_build - - cmake .. -G "Visual Studio 15 2017 Win64" -DWITH_UNIT_TESTS=0 -DWITH_MARIABACKUP=0 -DMYSQL_MAINTAINER_MODE=ERR -DPLUGIN_ROCKSDB=NO -DPLUGIN_CONNECT=NO -DBISON_EXECUTABLE=C:\cygwin64\bin\bison +clone_depth: 1 -build: - project: win_build\MySQL.sln - parallel: true - verbosity: minimal - -configuration: RelWithDebInfo -platform: x64 +build_script: + # dump some system info + - echo processor='%PROCESSOR_IDENTIFIER%' , processor count= %NUMBER_OF_PROCESSORS% + - cd %APPVEYOR_BUILD_FOLDER% + # Disable unneeded submodules for the faster build + - git config submodule.storage/columnstore/columnstore.update none + - git config submodule.storage/maria/libmarias3.update none + - git config submodule.storage/rocksdb/rocksdb.update none + - git config submodule.wsrep-lib.update none + # Build minimal configuration + - mkdir _build + - cd _build + - set BUILD_TYPE=MinSizeRel + - set GENERATOR=-GNinja + - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + - cmake -E time cmake %GENERATOR% .. -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\cygwin64\bin\bison -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO + - set /A jobs=2*%NUMBER_OF_PROCESSORS% + - cmake -E time cmake --build . -j %jobs% --config %BUILD_TYPE% --target minbuild test_script: - - set PATH=%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64 - - cd %APPVEYOR_BUILD_FOLDER%\win_build\mysql-test - - perl mysql-test-run.pl --force --max-test-fail=10 --parallel=4 --testcase-timeout=10 --skip-test-list=unstable-tests --suite=main + - set PATH=C:\Strawberry\perl\bin;%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64 + - cd %APPVEYOR_BUILD_FOLDER%\_build\mysql-test + - set /A parallel=4*%NUMBER_OF_PROCESSORS% + - perl mysql-test-run.pl --force --max-test-fail=10 --retry=2 -parallel=%parallel% --testcase-timeout=3 --suite=main --skip-test-list=unstable-tests --mysqld=--loose-innodb-flush-log-at-trx-commit=2 -image: Visual Studio 2017 +image: Visual Studio 2019 -- cgit v1.2.1