From 485975ab982b9a6e0dab297194205a98320fd56b Mon Sep 17 00:00:00 2001 From: Daniel Bartholomew Date: Fri, 16 Feb 2024 16:40:32 -0500 Subject: [PATCH 1/5] bump the VERSION --- VERSION | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION b/VERSION index 5af2fd0259a..f308307050d 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=11 MYSQL_VERSION_MINOR=4 -MYSQL_VERSION_PATCH=0 -SERVER_MATURITY=alpha +MYSQL_VERSION_PATCH=2 +SERVER_MATURITY=gamma From 8e980acb9eaf061887c9c7476f8b1e916c5f3291 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 27 May 2024 15:06:39 +0200 Subject: [PATCH 2/5] Appveyor - use latest available OpenSSL on appveyor (currently 3.2) --- appveyor.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8e7b0fcb715..6b88588ec18 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,9 @@ version: build-{build}~branch-{branch} clone_depth: 1 +environment: + OPENSSL_ROOT_DIR: C:/OpenSSL-v32-Win64 + build_script: # dump some system info - echo processor='%PROCESSOR_IDENTIFIER%' , processor count= %NUMBER_OF_PROCESSORS% @@ -15,14 +18,15 @@ build_script: - mkdir _build - cd _build - set BUILD_TYPE=MinSizeRel + - set PATH=%OPENSSL_ROOT_DIR%;%PATH% - set GENERATOR=-GNinja - call "C:\Program Files\Microsoft Visual Studio\2022\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.exe -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO + - cmake -E time cmake %GENERATOR% .. -DWITH_SSL=system -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT_DIR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\cygwin64\bin\bison.exe -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=C:\Strawberry\perl\bin;%PATH%;C:\Program Files (x86)\Windows Kits\10\Debuggers\x64 + - set PATH=C:\Strawberry\perl\bin;%OPENSSL_ROOT_DIR%;%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=4 --suite=main --skip-test-list=%APPVEYOR_BUILD_FOLDER%\win\appveyor_skip_tests.txt --mysqld=--loose-innodb-flush-log-at-trx-commit=2 From aa04bba47b702f9653261109f41555264f834ef8 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Mon, 27 May 2024 22:03:52 +0200 Subject: [PATCH 3/5] Fix appveyor build with newer OpenSSL. Using /WX (warning as error) during configuration step caused HAVE_OPENSSL_APPLINK_C to be OFF This made client utilities fail with "Applink not found" during runtime. Hardcode -DHAVE_OPENSSL_APPLINK_C=1 for CMake for now, fix connector later. --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 6b88588ec18..190627790a6 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -21,7 +21,7 @@ build_script: - set PATH=%OPENSSL_ROOT_DIR%;%PATH% - set GENERATOR=-GNinja - call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" - - cmake -E time cmake %GENERATOR% .. -DWITH_SSL=system -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT_DIR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\cygwin64\bin\bison.exe -DPLUGIN_PERFSCHEMA=NO -DPLUGIN_FEEDBACK=NO + - cmake -E time cmake %GENERATOR% .. -DWITH_SSL=system -DHAVE_OPENSSL_APPLINK_C=1 -DOPENSSL_ROOT_DIR=%OPENSSL_ROOT_DIR% -DCMAKE_BUILD_TYPE=%BUILD_TYPE% -DMYSQL_MAINTAINER_MODE=ERR -DFAST_BUILD=1 -DBISON_EXECUTABLE=C:\cygwin64\bin\bison.exe -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 From 1173883dc57c4e7363f1352cecbbc51458f04232 Mon Sep 17 00:00:00 2001 From: Daniel Bartholomew Date: Wed, 29 May 2024 14:07:14 -0400 Subject: [PATCH 4/5] bump the VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 470d2b3b659..3a73a0a87d4 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=11 MYSQL_VERSION_MINOR=4 -MYSQL_VERSION_PATCH=2 +MYSQL_VERSION_PATCH=3 SERVER_MATURITY=stable From 1849dfef64d5f191c1fda3457ad97c6775f9a9f3 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 29 May 2024 13:10:15 +0530 Subject: [PATCH 5/5] MDEV-34256 InnoDB throws out of bound write due to temporary tablespace truncation - InnoDB fails with out of bound write error after temporary tablespace truncation. This issue caused by commit c507678b207a1a8ce6d99ea28fb947bed1d95795 (MDEV-28699). InnoDB fail to clear freed ranges if shrinking size is the last offset of the freed range. --- .../suite/innodb/r/temp_truncate_freed.result | 11 ++++++++ .../suite/innodb/t/temp_truncate_freed.test | 25 +++++++++++++++++++ storage/innobase/fsp/fsp0fsp.cc | 2 +- 3 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 mysql-test/suite/innodb/r/temp_truncate_freed.result create mode 100644 mysql-test/suite/innodb/t/temp_truncate_freed.test diff --git a/mysql-test/suite/innodb/r/temp_truncate_freed.result b/mysql-test/suite/innodb/r/temp_truncate_freed.result new file mode 100644 index 00000000000..1ec26d6ada3 --- /dev/null +++ b/mysql-test/suite/innodb/r/temp_truncate_freed.result @@ -0,0 +1,11 @@ +set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size; +set @old_immediate_scrub_data_val= @@innodb_immediate_scrub_data_uncompressed; +SET GLOBAL innodb_immediate_scrub_data_uncompressed=1; +SET GLOBAL innodb_buffer_pool_size= 16777216; +CREATE TEMPORARY TABLE t1(c1 MEDIUMTEXT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (repeat(1,16777215)); +DROP TEMPORARY TABLE t1; +SET GLOBAL innodb_truncate_temporary_tablespace_now=1; +SET GLOBAL innodb_buffer_pool_size=10485760; +set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size; +set global innodb_immediate_scrub_data_uncompressed = @old_immediate_scrub_data_val; diff --git a/mysql-test/suite/innodb/t/temp_truncate_freed.test b/mysql-test/suite/innodb/t/temp_truncate_freed.test new file mode 100644 index 00000000000..d0a6b5fedf1 --- /dev/null +++ b/mysql-test/suite/innodb/t/temp_truncate_freed.test @@ -0,0 +1,25 @@ +--source include/have_innodb.inc + +set @old_innodb_buffer_pool_size = @@innodb_buffer_pool_size; +set @old_immediate_scrub_data_val= @@innodb_immediate_scrub_data_uncompressed; + +SET GLOBAL innodb_immediate_scrub_data_uncompressed=1; +SET GLOBAL innodb_buffer_pool_size= 16777216; + +CREATE TEMPORARY TABLE t1(c1 MEDIUMTEXT) ENGINE=InnoDB; +INSERT INTO t1 VALUES (repeat(1,16777215)); +DROP TEMPORARY TABLE t1; +SET GLOBAL innodb_truncate_temporary_tablespace_now=1; + +let $wait_timeout = 180; +let $wait_condition = + SELECT SUBSTR(variable_value, 1, 30) = 'Completed resizing buffer pool' + FROM information_schema.global_status + WHERE LOWER(variable_name) = 'innodb_buffer_pool_resize_status'; + +SET GLOBAL innodb_buffer_pool_size=10485760; +--source include/wait_condition.inc + +set global innodb_buffer_pool_size = @old_innodb_buffer_pool_size; +set global innodb_immediate_scrub_data_uncompressed = @old_immediate_scrub_data_val; +--source include/wait_condition.inc diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index 1793ff44a2c..9555f0e6cfc 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -3714,7 +3714,7 @@ inline void fil_space_t::clear_freed_ranges(uint32_t threshold) { if (range.first >= threshold) continue; - else if (range.last > threshold) + else if (range.last >= threshold) { range_t new_range{range.first, threshold - 1}; current_ranges.add_range(new_range);