Update to MySQL 8.0.34

Resolves: RHEL-22456
This commit is contained in:
Lars Tangvald 2023-08-09 19:24:52 +02:00 committed by Honza Horak
parent 6e9e3359c6
commit 073353ef12
7 changed files with 410 additions and 11 deletions

29
mysql-alignment.patch Normal file
View File

@ -0,0 +1,29 @@
diff --git a/sql/memory/aligned_atomic.h b/sql/memory/aligned_atomic.h
index 423366dab38..15638ed8963 100644
--- a/sql/memory/aligned_atomic.h
+++ b/sql/memory/aligned_atomic.h
@@ -81,18 +81,19 @@ static inline size_t _cache_line_size() {
static inline size_t _cache_line_size() {
long size = sysconf(_SC_LEVEL1_DCACHE_LINESIZE);
if (size == -1) return 64;
-#if defined(__s390x__)
- // returns 0 on s390x RHEL 7.x
+
+ // returns 0 on some configurations
if (size == 0) {
FILE *p = fopen(
"/sys/devices/system/cpu/cpu0/cache/index0/coherency_line_size", "r");
if (p) {
- fscanf(p, "%ld", &size);
+ if (fscanf(p, "%ld", &size) != 1) size = 0;
fclose(p);
}
}
-#endif
- return static_cast<size_t>(size);
+
+ if (size > 0) return static_cast<size_t>(size);
+ return 64;
}
#else

View File

@ -1,10 +1,10 @@
diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql
index eff14a67..413dfc27 100644
index 78b09285..b7153445 100644
--- a/mysql-test/include/mtr_warnings.sql
+++ b/mysql-test/include/mtr_warnings.sql
@@ -363,6 +363,11 @@ INSERT INTO global_suppressions VALUES
*/
("Manifest file '.*' is not read-only. For better security, please make sure that the file is read-only."),
@@ -376,6 +376,11 @@ INSERT INTO global_suppressions VALUES
("'mysql_native_password' is deprecated and will be removed in a future release."),
+ /*
+ ARM32 don't support timers and get this warning in every test.

320
mysql-binlog.patch Normal file
View File

@ -0,0 +1,320 @@
diff --git a/mysql-test/r/insert.result b/mysql-test/r/insert.result
index 9471e7dd515..aa369d37635 100644
--- a/mysql-test/r/insert.result
+++ b/mysql-test/r/insert.result
@@ -1,7 +1,3 @@
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
SET sql_mode = 'NO_ENGINE_SUBSTITUTION';
create table t1 (a int not null);
insert into t1 values (1);
@@ -981,8 +977,6 @@ DROP VIEW view_target2;
DROP VIEW view_target3;
DROP USER user20989@localhost;
DROP DATABASE meow;
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
#
# Bug#28836669: Only first set of duplicate columns are reported for INSERT
#
diff --git a/mysql-test/r/plugin.result b/mysql-test/r/plugin.result
index 0272e9fc7d9..e000f3d0328 100644
--- a/mysql-test/r/plugin.result
+++ b/mysql-test/r/plugin.result
@@ -1,7 +1,3 @@
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
CREATE TABLE t1(a int) ENGINE=EXAMPLE;
ERROR 42000: Unknown storage engine 'EXAMPLE'
INSTALL PLUGIN example SONAME 'ha_example.so';
@@ -244,8 +240,6 @@ UNINSTALL PLUGIN example;
DROP USER bug51770@localhost;
INSTALL PLUGIN example SONAME '../ha_example.so';
ERROR HY000: No paths allowed for shared library
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
#
# Bug #28534414: NEGATIVE NUMBERS IN PLUGIN VARIABLES
# NOT DISPLAYED CORRECTLY
diff --git a/mysql-test/r/subquery_sj_all.result b/mysql-test/r/subquery_sj_all.result
index 7b9a082cd77..9fbdd4accc7 100644
--- a/mysql-test/r/subquery_sj_all.result
+++ b/mysql-test/r/subquery_sj_all.result
@@ -1,7 +1,3 @@
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
set @old_opt_switch=@@optimizer_switch;
set optimizer_switch='subquery_materialization_cost_based=off';
@@ -13536,5 +13532,3 @@ f1 f2
14:51:13 S
DROP TABLE t1, t2;
set optimizer_switch=default;
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
diff --git a/mysql-test/r/subquery_sj_all_bka.result b/mysql-test/r/subquery_sj_all_bka.result
index 2334635eec2..594ef685c0a 100644
--- a/mysql-test/r/subquery_sj_all_bka.result
+++ b/mysql-test/r/subquery_sj_all_bka.result
@@ -1,8 +1,4 @@
set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
set @old_opt_switch=@@optimizer_switch;
set optimizer_switch='subquery_materialization_cost_based=off';
@@ -13539,6 +13535,4 @@ f1 f2
14:51:13 S
DROP TABLE t1, t2;
set optimizer_switch=default;
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch=default;
diff --git a/mysql-test/r/subquery_sj_all_bka_nobnl.result b/mysql-test/r/subquery_sj_all_bka_nobnl.result
index f5c5dd7cf8d..80045176da0 100644
--- a/mysql-test/r/subquery_sj_all_bka_nobnl.result
+++ b/mysql-test/r/subquery_sj_all_bka_nobnl.result
@@ -1,8 +1,4 @@
set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,index_condition_pushdown=on,mrr=on,mrr_cost_based=off';
set @old_opt_switch=@@optimizer_switch;
set optimizer_switch='subquery_materialization_cost_based=off';
@@ -13529,6 +13525,4 @@ f1 f2
14:51:13 S
DROP TABLE t1, t2;
set optimizer_switch=default;
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch=default;
diff --git a/mysql-test/r/subquery_sj_mat.result b/mysql-test/r/subquery_sj_mat.result
index ae690001f15..b6bd0ce22b2 100644
--- a/mysql-test/r/subquery_sj_mat.result
+++ b/mysql-test/r/subquery_sj_mat.result
@@ -1,7 +1,3 @@
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch='semijoin=on,materialization=on';
set @old_opt_switch=@@optimizer_switch;
set optimizer_switch='subquery_materialization_cost_based=off';
@@ -13844,5 +13840,3 @@ f1 f2
14:51:13 S
DROP TABLE t1, t2;
set optimizer_switch=default;
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
diff --git a/mysql-test/r/subquery_sj_mat_bka.result b/mysql-test/r/subquery_sj_mat_bka.result
index 4b13e24edbd..a088f33597e 100644
--- a/mysql-test/r/subquery_sj_mat_bka.result
+++ b/mysql-test/r/subquery_sj_mat_bka.result
@@ -1,8 +1,4 @@
set optimizer_switch='batched_key_access=on,mrr_cost_based=off';
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch='semijoin=on,materialization=on';
set @old_opt_switch=@@optimizer_switch;
set optimizer_switch='subquery_materialization_cost_based=off';
@@ -13845,6 +13841,4 @@ f1 f2
14:51:13 S
DROP TABLE t1, t2;
set optimizer_switch=default;
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch=default;
diff --git a/mysql-test/r/subquery_sj_mat_bka_nobnl.result b/mysql-test/r/subquery_sj_mat_bka_nobnl.result
index cee1779f4aa..7378907ce8a 100644
--- a/mysql-test/r/subquery_sj_mat_bka_nobnl.result
+++ b/mysql-test/r/subquery_sj_mat_bka_nobnl.result
@@ -1,8 +1,4 @@
set optimizer_switch='batched_key_access=on,block_nested_loop=off,mrr_cost_based=off';
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch='semijoin=on,materialization=on';
set @old_opt_switch=@@optimizer_switch;
set optimizer_switch='subquery_materialization_cost_based=off';
@@ -13836,6 +13832,4 @@ f1 f2
14:51:13 S
DROP TABLE t1, t2;
set optimizer_switch=default;
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
set optimizer_switch=default;
diff --git a/mysql-test/suite/innodb/r/select_count_perf.result b/mysql-test/suite/innodb/r/select_count_perf.result
index 2b2adfab646..e7d163d57f3 100644
--- a/mysql-test/suite/innodb/r/select_count_perf.result
+++ b/mysql-test/suite/innodb/r/select_count_perf.result
@@ -4,10 +4,6 @@
# by count(*) always reflects the correct view of the table according
# to the transaction's selected isolation level.
#
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
#
# Traverse various indexes to get the right counts.
# This especially tests count(*) which is pushed down to InnoDB in WL#6742.
@@ -1895,5 +1891,3 @@ id select_type table partitions type possible_keys key key_len ref rows filtered
Warnings:
Note 1003 /* select#1 */ select count(0) AS `COUNT(*)` from `test`.`t1` FORCE INDEX (`c2_idx`) join `test`.`t2`
DROP TABLE t1, t2;
-Warnings:
-Warning 1287 '@@binlog_format' is deprecated and will be removed in a future release.
diff --git a/mysql-test/suite/innodb/t/select_count_perf.test b/mysql-test/suite/innodb/t/select_count_perf.test
index e5070f14d11..6a3bfeff159 100644
--- a/mysql-test/suite/innodb/t/select_count_perf.test
+++ b/mysql-test/suite/innodb/t/select_count_perf.test
@@ -14,8 +14,11 @@
if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
{
--disable_query_log
+ # Avoid warnings since binlog_format is deprecated
+ --disable_warnings
SET @saved_binlog_format= @@SESSION.binlog_format;
SET SESSION binlog_format= MIXED;
+ --enable_warnings
--enable_query_log
}
@@ -401,6 +404,8 @@ DROP TABLE t1, t2;
if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
{
--disable_query_log
+ --disable_warnings
SET SESSION binlog_format= @saved_binlog_format;
+ --enable_warnings
--enable_query_log
}
diff --git a/mysql-test/t/insert.test b/mysql-test/t/insert.test
index 1c1153ab5b4..8b95bfd8394 100644
--- a/mysql-test/t/insert.test
+++ b/mysql-test/t/insert.test
@@ -10,8 +10,11 @@
if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
{
--disable_query_log
+ # Avoid warnings since binlog_format is deprecated
+ --disable_warnings
SET @saved_binlog_format= @@SESSION.binlog_format;
SET SESSION binlog_format= MIXED;
+ --enable_warnings
--enable_query_log
}
@@ -877,7 +880,9 @@ DROP DATABASE meow;
if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
{
--disable_query_log
+ --disable_warnings
SET SESSION binlog_format= @saved_binlog_format;
+ --enable_warnings
--enable_query_log
}
diff --git a/mysql-test/t/plugin.test b/mysql-test/t/plugin.test
index 02513076118..584b54fe1e4 100644
--- a/mysql-test/t/plugin.test
+++ b/mysql-test/t/plugin.test
@@ -4,8 +4,11 @@
if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
{
--disable_query_log
+ # Avoid warnings since binlog_format is deprecated
+ --disable_warnings
SET @saved_binlog_format= @@SESSION.binlog_format;
SET SESSION binlog_format= STATEMENT;
+ --enable_warnings
--enable_query_log
}
@@ -282,7 +285,9 @@ eval INSTALL PLUGIN example SONAME '$path';
if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
{
--disable_query_log
+ --disable_warnings
SET SESSION binlog_format= @saved_binlog_format;
+ --enable_warnings
--enable_query_log
}
diff --git a/mysql-test/t/subquery_sj_all.test b/mysql-test/t/subquery_sj_all.test
index 40a9aa72d51..eab49fc2ce7 100644
--- a/mysql-test/t/subquery_sj_all.test
+++ b/mysql-test/t/subquery_sj_all.test
@@ -3,16 +3,6 @@
# unsafe system function like rand(), LIMIT clause.
--source include/not_binlog_format_statement.inc
-# The test fails with log_bin ON and binlog_format=ROW due to Bug#22841208.
-# Temporarily, overriding binlog_format to MIXED when log_bin is ON.
-if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
-{
- --disable_query_log
- SET @saved_binlog_format= @@SESSION.binlog_format;
- SET SESSION binlog_format= MIXED;
- --enable_query_log
-}
-
#
# Run subquery_sj.inc with all of the so-called 6.0 features.
#
@@ -22,10 +12,3 @@ set optimizer_switch='semijoin=on,materialization=on,firstmatch=on,loosescan=on,
--source include/subquery_sj.inc
set optimizer_switch=default;
-
-if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
-{
- --disable_query_log
- SET SESSION binlog_format= @saved_binlog_format;
- --enable_query_log
-}
diff --git a/mysql-test/t/subquery_sj_mat.test b/mysql-test/t/subquery_sj_mat.test
index 92d97349840..ff212e3aaab 100644
--- a/mysql-test/t/subquery_sj_mat.test
+++ b/mysql-test/t/subquery_sj_mat.test
@@ -3,16 +3,6 @@
# unsafe system function like rand(), LIMIT clause.
--source include/not_binlog_format_statement.inc
-# The test fails with log_bin ON and binlog_format=ROW due to Bug#22841208.
-# Temporarily, overriding binlog_format to MIXED when log_bin is ON.
-if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
-{
- --disable_query_log
- SET @saved_binlog_format= @@SESSION.binlog_format;
- SET SESSION binlog_format= MIXED;
- --enable_query_log
-}
-
#
# Run subquery_sj.inc with semijoin and turn off all strategies, but Materialization
#
@@ -45,10 +35,3 @@ if (`select locate('mrr', @@optimizer_switch) > 0`)
--source include/subquery_sj.inc
set optimizer_switch=default;
-
-if (`SELECT @@global.log_bin AND @@global.binlog_format = 'ROW'`)
-{
- --disable_query_log
- SET SESSION binlog_format= @saved_binlog_format;
- --enable_query_log
-}

35
mysql-clone.patch Normal file
View File

@ -0,0 +1,35 @@
diff --git a/storage/innobase/clone/clone0apply.cc b/storage/innobase/clone/clone0apply.cc
index e41a2e37dbf..742b09d0207 100644
--- a/storage/innobase/clone/clone0apply.cc
+++ b/storage/innobase/clone/clone0apply.cc
@@ -1734,10 +1734,10 @@ int Clone_Snapshot::extend_and_flush_files(bool flush_redo) {
std::string file_name;
file_ctx->get_file_name(file_name);
- auto file =
- os_file_create(innodb_clone_file_key, file_name.c_str(),
- OS_FILE_OPEN | OS_FILE_ON_ERROR_NO_EXIT, OS_FILE_NORMAL,
- OS_CLONE_DATA_FILE, false, &success);
+ auto file = os_file_create(
+ innodb_clone_file_key, file_name.c_str(),
+ OS_FILE_OPEN | OS_FILE_ON_ERROR_NO_EXIT, OS_FILE_NORMAL,
+ flush_redo ? OS_CLONE_LOG_FILE : OS_CLONE_DATA_FILE, false, &success);
if (!success) {
/* purecov: begin inspected */
diff --git a/storage/innobase/include/clone0snapshot.h b/storage/innobase/include/clone0snapshot.h
index 884ac08a884..03a9aa3431c 100644
--- a/storage/innobase/include/clone0snapshot.h
+++ b/storage/innobase/include/clone0snapshot.h
@@ -787,9 +787,9 @@ class Clone_Snapshot {
int init_apply_state(Clone_Desc_State *state_desc);
/** Extend and flush files after copying data
- @param[in] is_redo if true flush redo, otherwise data
+ @param[in] flush_redo if true flush redo, otherwise data
@return error code */
- int extend_and_flush_files(bool is_redo);
+ int extend_and_flush_files(bool flush_redo);
/** Create file descriptor and add to current file list
@param[in] data_dir destination data directory

View File

@ -80,9 +80,11 @@ I'm not sure whether the output is synchronous, but even if it wasn'tit still lo
--- mysql-8.0.24/mysql-test/mysql-test-run.pl 2021-05-10 04:29:44.391897891 +0200
+++ mysql-8.0.24/mysql-test/mysql-test-run.pl_patched 2021-05-10 04:38:51.031702753 +0200
@@ -3374,17 +3374,6 @@ sub setup_vardir() {
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl
index 26e6c92c..9d85c6d6 100755
--- a/mysql-test/mysql-test-run.pl
+++ b/mysql-test/mysql-test-run.pl
@@ -3533,17 +3533,6 @@ sub setup_vardir() {
mkpath("$opt_vardir/tmp");
mkpath($opt_tmpdir) if ($opt_tmpdir ne "$opt_vardir/tmp");
@ -99,4 +101,4 @@ I'm not sure whether the output is synchronous, but even if it wasn'tit still lo
-
# Copy all files from std_data into var/std_data
# and make them world readable
copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022");
copytree("$glob_mysql_test_dir/std_data", "$opt_vardir/std_data", "0022")

View File

@ -74,7 +74,7 @@
%global sameevr %{?epoch:%{epoch}:}%{version}-%{release}
Name: mysql
Version: 8.0.33
Version: 8.0.34
Release: 1%{?with_debug:.debug}%{?dist}
Summary: MySQL client programs and shared libraries
URL: http://www.mysql.com
@ -117,6 +117,9 @@ Patch51: %{pkgnamepatch}-sharedir.patch
Patch52: %{pkgnamepatch}-rpath.patch
Patch53: %{pkgnamepatch}-mtr.patch
Patch54: %{pkgnamepatch}-arm32-timer.patch
Patch55: %{pkgnamepatch}-clone.patch
Patch56: %{pkgnamepatch}-binlog.patch
Patch57: %{pkgnamepatch}-alignment.patch
# Patches taken from boost 1.59
Patch111: boost-1.58.0-pool.patch
@ -389,6 +392,9 @@ the MySQL sources.
%patch -P52 -p1
%patch -P53 -p1
%patch -P54 -p1
%patch -P55 -p1
%patch -P56 -p1
%patch -P57 -p1
# Patch Boost
pushd boost/boost_$(echo %{boost_bundled_version}| tr . _)
@ -633,7 +639,7 @@ export MTR_BUILD_THREAD=$(( $(date +%s) % 2200 ))
set -ex
cd %{buildroot}%{_datadir}/mysql-test
export common_testsuite_arguments=" %{?with_debug:--debug-server} --parallel=auto --force --retry=2 --suite-timeout=900 --testcase-timeout=30 --mysqld=--binlog-format=mixed --max-test-fail=5 --report-unstable-tests --clean-vardir --mysqld=--skip-innodb-use-native-aio "
export common_testsuite_arguments=" %{?with_debug:--debug-server} --parallel=auto --force --retry=2 --suite-timeout=900 --testcase-timeout=30 --skip-combinations --max-test-fail=5 --report-unstable-tests --clean-vardir --mysqld=--skip-innodb-use-native-aio "
# If full testsuite has already been run on this version and we don't explicitly want the full testsuite to be run
if [[ "%{last_tested_version}" == "%{version}" ]] && [[ %{force_run_testsuite} -eq 0 ]]
@ -981,6 +987,13 @@ fi
%endif
%changelog
* Wed Aug 09 2023 Lars Tangvald <lars.tangvald@oracle.com> - 8.0.34-1
- Update to MySQL 8.0.34
- Add patch from upstream bug#110569
- Add patch to fix binlog format issue
- Use --skip-combinations over --binlog-format=mixed
- Add alignment patch upstream bug#110752
* Wed Apr 12 2023 Lars Tangvald <lars.tangvald@oracle.com> - 8.0.33-1
- Update to MySQL 8.0.33

View File

@ -1 +1 @@
SHA512 (mysql-boost-8.0.33.tar.gz) = 47f76819004c7c545d1b0b6b6646d8816899976f92d35c5564b1255b144b597ff7d3e674c721a45bcbb13cc0da3f4474fb29221c0e21d2ff91a1892cd42c636c
SHA512 (mysql-boost-8.0.34.tar.gz) = e5e79ac6870c214cf62c8e2830106d60e09d2e6df30654b84bb5d26864b4eabe777468a223e6ee4c1e22b7f6ec086c73e85e3f4c1fa66912b0e59b606ab46cd6