diff -Nru mariadb-10.6-10.6.7/debian/changelog mariadb-10.6-10.6.7/debian/changelog --- mariadb-10.6-10.6.7/debian/changelog 2022-02-19 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/changelog 2022-03-10 12:40:09.000000000 -0700 @@ -1,3 +1,27 @@ +mariadb-10.6 (1:10.6.7-2ubuntu1) jammy; urgency=medium + + * Pseudo-sync version 1:10.6.7-3~exp1 for the following fixes (LP: #1964045) + [Otto Kekäläinen] + * Fix syntax error in unstable tests lists + * Forward patches upstream and update metadata for them + * Bugfix: Include missing sql_parse.cc in ER_KILL_DENIED_ERROR patch + * Fix mysql_install_db by reverting recent addition (MDEV-27980) + * Fix htm use on PowerPC to fix build failure (might close #1006527) + + -- Dan Bungert Thu, 10 Mar 2022 12:40:09 -0700 + +mariadb-10.6 (1:10.6.7-2) unstable; urgency=medium + + * Backport OpenSSL 3.0 support for MariaDB 10.6 series (Closes: #1005950) + * Clean away most Lintian overrides and unstable-tests to see full + QA results in Debian experimental + * Add upstream PR#2028 to fix main.grant_kill test failure + * Update unstable-tests skip lists after review of 1:10.6.7-2~exp1 builds + * Fix more spelling errors + * Fix misc Lintian issues and add overrides + + -- Otto Kekäläinen Tue, 01 Mar 2022 20:40:07 -0800 + mariadb-10.6 (1:10.6.7-1) unstable; urgency=medium [ Otto Kekäläinen ] diff -Nru mariadb-10.6-10.6.7/debian/control mariadb-10.6-10.6.7/debian/control --- mariadb-10.6-10.6.7/debian/control 2022-02-19 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/control 2022-03-10 12:40:09.000000000 -0700 @@ -1,7 +1,8 @@ Source: mariadb-10.6 Section: database Priority: optional -Maintainer: Debian MySQL Maintainers +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian MySQL Maintainers Uploaders: Otto Kekäläinen Build-Depends: bison, cmake, diff -Nru mariadb-10.6-10.6.7/debian/libmariadbd19.lintian-overrides mariadb-10.6-10.6.7/debian/libmariadbd19.lintian-overrides --- mariadb-10.6-10.6.7/debian/libmariadbd19.lintian-overrides 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/libmariadbd19.lintian-overrides 2022-03-01 23:13:06.000000000 -0700 @@ -1,5 +1,6 @@ # myisam stopwords that cannot be changed and spelling errors remain -spelling-error-in-binary usr/lib/x86_64-linux-gnu/libmariadbd.so.19 yuR your +spelling-error-in-binary usr/lib/x86_64-linux-gnu/libmariadbd.so.19 AfE Safe spelling-error-in-binary usr/lib/x86_64-linux-gnu/libmariadbd.so.19 noone no one spelling-error-in-binary usr/lib/x86_64-linux-gnu/libmariadbd.so.19 thats that's spelling-error-in-binary usr/lib/x86_64-linux-gnu/libmariadbd.so.19 theres there's +spelling-error-in-binary usr/lib/x86_64-linux-gnu/libmariadbd.so.19 yuR your diff -Nru mariadb-10.6-10.6.7/debian/libmariadbd-dev.lintian-overrides mariadb-10.6-10.6.7/debian/libmariadbd-dev.lintian-overrides --- mariadb-10.6-10.6.7/debian/libmariadbd-dev.lintian-overrides 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/libmariadbd-dev.lintian-overrides 1969-12-31 17:00:00.000000000 -0700 @@ -1,2 +0,0 @@ -# Lintian Bug#1000469: false assumption about object files -libmariadbd-dev: no-code-sections usr/lib/x86_64-linux-gnu/libmariadbd.a (debug_sync.cc.o longlong2str.c.o my_bit.c.o my_getpagesize.c.o my_lockmem.c.o my_new.cc.o os0thread.cc.o safemalloc.c.o strmov.c.o table_replication_applier_configuration.cc.o table_replication_applier_status.cc.o table_replication_applier_status_by_coordinator.cc.o viopipe.c.o) diff -Nru mariadb-10.6-10.6.7/debian/mariadb-backup.lintian-overrides mariadb-10.6-10.6.7/debian/mariadb-backup.lintian-overrides --- mariadb-10.6-10.6.7/debian/mariadb-backup.lintian-overrides 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/mariadb-backup.lintian-overrides 2022-03-01 23:13:06.000000000 -0700 @@ -1,5 +1,6 @@ # myisam stopwords that cannot be changed and spelling errors remain -spelling-error-in-binary usr/bin/mariadb-backup yuR your +spelling-error-in-binary usr/bin/mariadb-backup AfE Safe spelling-error-in-binary usr/bin/mariadb-backup noone no one spelling-error-in-binary usr/bin/mariadb-backup thats that's spelling-error-in-binary usr/bin/mariadb-backup theres there's +spelling-error-in-binary usr/bin/mariadb-backup yuR your diff -Nru mariadb-10.6-10.6.7/debian/mariadb-server-10.6.lintian-overrides mariadb-10.6-10.6.7/debian/mariadb-server-10.6.lintian-overrides --- mariadb-10.6-10.6.7/debian/mariadb-server-10.6.lintian-overrides 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/mariadb-server-10.6.lintian-overrides 2022-03-01 23:13:06.000000000 -0700 @@ -2,32 +2,8 @@ unused-debconf-template mariadb-server-10.6/old_data_directory_saved unused-debconf-template mariadb-server-10.6/postrm_remove_databases # myisam stopwords that cannot be changed and spelling errors remain -spelling-error-in-binary usr/bin/aria_chk noone no one -spelling-error-in-binary usr/bin/aria_chk thats that's -spelling-error-in-binary usr/bin/aria_chk theres there's -spelling-error-in-binary usr/bin/aria_dump_log noone no one -spelling-error-in-binary usr/bin/aria_dump_log thats that's -spelling-error-in-binary usr/bin/aria_dump_log theres there's -spelling-error-in-binary usr/bin/aria_ftdump noone no one -spelling-error-in-binary usr/bin/aria_ftdump thats that's -spelling-error-in-binary usr/bin/aria_ftdump theres there's -spelling-error-in-binary usr/bin/aria_pack noone no one -spelling-error-in-binary usr/bin/aria_pack thats that's -spelling-error-in-binary usr/bin/aria_pack theres there's -spelling-error-in-binary usr/bin/aria_read_log noone no one -spelling-error-in-binary usr/bin/aria_read_log thats that's -spelling-error-in-binary usr/bin/aria_read_log theres there's -spelling-error-in-binary usr/bin/myisam_ftdump noone no one -spelling-error-in-binary usr/bin/myisam_ftdump thats that's -spelling-error-in-binary usr/bin/myisam_ftdump theres there's -spelling-error-in-binary usr/bin/myisamchk noone no one -spelling-error-in-binary usr/bin/myisamchk thats that's -spelling-error-in-binary usr/bin/myisamchk theres there's -spelling-error-in-binary usr/bin/myisamlog noone no one -spelling-error-in-binary usr/bin/myisamlog thats that's -spelling-error-in-binary usr/bin/myisamlog theres there's -spelling-error-in-binary usr/bin/myisampack noone no one -spelling-error-in-binary usr/bin/myisampack thats that's -spelling-error-in-binary usr/bin/myisampack theres there's +spelling-error-in-binary usr/bin/* noone no one +spelling-error-in-binary usr/bin/* thats that's +spelling-error-in-binary usr/bin/* theres there's # Intentional in-context documentation package-contains-documentation-outside-usr-share-doc usr/share/mysql/errmsg-utf8.txt diff -Nru mariadb-10.6-10.6.7/debian/mariadb-server-core-10.6.lintian-overrides mariadb-10.6-10.6.7/debian/mariadb-server-core-10.6.lintian-overrides --- mariadb-10.6-10.6.7/debian/mariadb-server-core-10.6.lintian-overrides 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/mariadb-server-core-10.6.lintian-overrides 2022-03-01 23:13:06.000000000 -0700 @@ -1,7 +1,8 @@ # myisam stopwords that cannot be changed and spelling errors remain -spelling-error-in-binary usr/sbin/mariadbd yuR your +spelling-error-in-binary usr/sbin/mariadbd AfE Safe spelling-error-in-binary usr/sbin/mariadbd noone no one spelling-error-in-binary usr/sbin/mariadbd thats that's spelling-error-in-binary usr/sbin/mariadbd theres there's +spelling-error-in-binary usr/sbin/mariadbd yuR your # Valid reason for extra documentation in context in directory package-contains-documentation-outside-usr-share-doc usr/share/mysql/charsets/README diff -Nru mariadb-10.6-10.6.7/debian/mariadb-test-data.lintian-overrides mariadb-10.6-10.6.7/debian/mariadb-test-data.lintian-overrides --- mariadb-10.6-10.6.7/debian/mariadb-test-data.lintian-overrides 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/mariadb-test-data.lintian-overrides 2022-03-01 23:13:06.000000000 -0700 @@ -1,86 +1,10 @@ # These should be moved, see https://jira.mariadb.org/browse/MDEV-21654 arch-dependent-file-in-usr-share usr/share/mysql/mysql-test/suite/plugins/pam/pam_mariadb_mtr.so arch-independent-package-contains-binary-or-object usr/share/mysql/mysql-test/suite/plugins/pam/pam_mariadb_mtr.so +# Intentional for test files +national-encoding usr/share/mysql/mysql-test/* # Extra test documentation files that really need to be kept in context in test directory -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/collections/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/example/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/heap/mtr2/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/myisam/mtr2/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/mysql5613mysql/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/engines/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/funcs_1/README.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/funcs_2/readme.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/large_tests/README.TXT -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/optimizer_unfixed_bugs/README.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/perfschema_stress/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/rpl/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/wsrep/README -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/connect/connect/std_data/boys.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/connect/connect/std_data/boyswin.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/connect/connect/std_data/coffee.htm -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/connect/connect/std_data/emp.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/connect/connect/std_data/expenses.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/connect/connect/std_data/funny.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/connect/connect/std_data/funny2.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/plugin/connect/connect/std_data/girls.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bad2_master.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bad3_master.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bad4_master.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bad5_master.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bad6_master.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bad_master.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bug30435_10k_items.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bug30435_5k.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/bug887051.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/charset_utf8.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/innodb_tb1.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/innodb_tb2.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/innodb_tb3.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/innodb_tb4.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/load_file.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/memory_tb1.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/memory_tb2.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/memory_tb3.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/memory_tb4.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/myisam_tb1.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/myisam_tb2.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/myisam_tb3.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/myisam_tb4.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/t3.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/t4.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/t7.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/funcs_1/t9.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/keys.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/keys2.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/keys3.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev-11079.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev-11343.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev-11631.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev-15497.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev8711.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev9823.ujis.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev9823.utf8mb4.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev9824.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/mdev9842.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/loaddata/nl.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/logkey.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/mariadb-conv/file01.utf16.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/mariadb-conv/file01.utf8.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/mariadb-conv/file02.latin1.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/new-format-relay-log-win.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/new-format-relay-log.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/numbers.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/old-format-relay-log-win.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/old-format-relay-log.info -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/std_data/wl5766_data.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/engines/iuds/t/hindi.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/engines/iuds/t/sample.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/engines/rr_trx/init_innodb.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/engines/rr_trx/run.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/funcs_2/data/charset_utf8.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/perfschema_stress/stress_init.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/perfschema_stress/stress_tests.txt -package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/suite/rpl/r/rpl_critical_errors.result.txt +package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/* # Intentional directory structure repeated-path-segment auth_gssapi usr/share/mysql/mysql-test/plugin/auth_gssapi/auth_gssapi/ repeated-path-segment connect usr/share/mysql/mysql-test/plugin/connect/connect/ @@ -99,5 +23,3 @@ repeated-path-segment type_test usr/share/mysql/mysql-test/plugin/type_test/type_test/ repeated-path-segment user_variables usr/share/mysql/mysql-test/plugin/user_variables/user_variables/ repeated-path-segment wsrep_info usr/share/mysql/mysql-test/plugin/wsrep_info/wsrep_info/ -# Intentional for test files -national-encoding usr/share/mysql/mysql-test/* diff -Nru mariadb-10.6-10.6.7/debian/mariadb-test.lintian-overrides mariadb-10.6-10.6.7/debian/mariadb-test.lintian-overrides --- mariadb-10.6-10.6.7/debian/mariadb-test.lintian-overrides 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/mariadb-test.lintian-overrides 2022-03-01 23:13:06.000000000 -0700 @@ -2,20 +2,14 @@ arch-dependent-file-in-usr-share usr/share/mysql/mysql-test/lib/My/SafeProcess/my_safe_process arch-dependent-file-in-usr-share usr/share/mysql/mysql-test/lib/My/SafeProcess/wsrep_check_version # myisam stopwords and other variable names that cannot be changed and spelling errors remain -spelling-error-in-binary usr/bin/mariadb-client-test-embedded yuR your -spelling-error-in-binary usr/bin/mariadb-client-test-embedded noone no one -spelling-error-in-binary usr/bin/mariadb-client-test-embedded thats that's -spelling-error-in-binary usr/bin/mariadb-client-test-embedded theres there's -spelling-error-in-binary usr/bin/mariadb-test-embedded yuR your -spelling-error-in-binary usr/bin/mariadb-test-embedded noone no one -spelling-error-in-binary usr/bin/mariadb-test-embedded thats that's -spelling-error-in-binary usr/bin/mariadb-test-embedded theres there's +spelling-error-in-binary usr/bin/* AfE Safe +spelling-error-in-binary usr/bin/* yuR your +spelling-error-in-binary usr/bin/* no one +spelling-error-in-binary usr/bin/* that's +spelling-error-in-binary usr/bin/* theres there's spelling-error-in-binary usr/lib/mysql/plugin/qa_auth_interface.so userA users # Valid reason for documentation in context in directory package-contains-documentation-outside-usr-share-doc usr/share/mysql/mysql-test/README* # Test plugins intentionally not fully featured shared-library-lacks-prerequisites usr/lib/mysql/plugin/auth_0x0100.so shared-library-lacks-prerequisites usr/lib/mysql/plugin/debug_key_management.so -# Intentional as the plugins are used by both the client and server -breakout-link usr/lib/*/libmariadb3/plugin/auth_test_plugin.so -> usr/lib/mysql/plugin/auth_test_plugin.so -breakout-link usr/lib/*/libmariadb3/plugin/qa_auth_interface.so -> usr/lib/mysql/plugin/qa_auth_interface.so diff -Nru mariadb-10.6-10.6.7/debian/patches/1006527-fix-ppc64-ftbfs.patch mariadb-10.6-10.6.7/debian/patches/1006527-fix-ppc64-ftbfs.patch --- mariadb-10.6-10.6.7/debian/patches/1006527-fix-ppc64-ftbfs.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/1006527-fix-ppc64-ftbfs.patch 2022-03-05 01:00:40.000000000 -0700 @@ -0,0 +1,158 @@ +Forwarded: https://github.com/MariaDB/server/commit/5c8e9cacea2e913c0da74686bfbfeff0a33c2cee +Origin: https://github.com/MariaDB/server/commit/5c8e9cacea2e913c0da74686bfbfeff0a33c2cee.patch +From: Daniel Black +Date: Wed, 2 Mar 2022 11:48:24 +1100 +Subject: [PATCH] MDEV-27936 hardware lock ellision on ppc64{,le} failing to + compile + +There is only a very small range of gcc compiler versions +that allow the built_{htm} functions to be defined without -mhtm +being specified as a global CFLAG. Without this cflags the +__built_tbegin and other htm instructions simply aren't available. + +The include header htmxlintrin.h uses these inlines. As such +the file that includes it need to be compiled with -mhtm. Other +tricks like #pragma GCC target("cpu=power8","htm") around the +include block had no effect on making the builtins avialable. + +As such we are left with the option of putting the include header +in one location, srw_lock, and enabling it there. + +As a partial mitigation, extented to GNU/clang compilers, +transaction functions gain the attribute "hot". + +In general the use of htm is around the optimistic +transaction ability of the function. The key part of using the +hot attribute is to place these functions together so that +a maximization of icache, tlb and OS paging can ensure that +these can be ready to execute by any thread/cpu with the +minimium amount of overhead. The increased speed on +the transaction to not be conflicted and rollback on tend. + +trx_has_lock_x cannot be cold and hot so settled on hot. + +POWER is particulary affected here because the xbegin/xend +functions are not inline. +--- + storage/innobase/CMakeLists.txt | 11 +++++++ + .../include/transactional_lock_guard.h | 31 ++++++++++--------- + storage/innobase/sync/srw_lock.cc | 17 +++++++++- + storage/innobase/trx/trx0rec.cc | 2 +- + 4 files changed, 44 insertions(+), 17 deletions(-) + +--- a/storage/innobase/CMakeLists.txt ++++ b/storage/innobase/CMakeLists.txt +@@ -380,6 +380,17 @@ IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SY + COMPILE_FLAGS "-O0" + ) + ENDIF() ++ ++# Older gcc version insist on -mhtm flag for including the ++# htmxlintrin.h header. This is also true for new gcc versions ++# like 11.2.0 in Debian Sid ++IF(CMAKE_SYSTEM_NAME MATCHES "Linux" ++ AND CMAKE_SYSTEM_PROCESSOR MATCHES "ppc64|powerpc64") ++ ADD_COMPILE_FLAGS( ++ sync/srw_lock.cc ++ COMPILE_FLAGS "-mhtm" ++ ) ++ENDIF() + IF(MSVC) + IF(CMAKE_SIZEOF_VOID_P EQUAL 8) + ADD_COMPILE_FLAGS( +--- a/storage/innobase/include/transactional_lock_guard.h ++++ b/storage/innobase/include/transactional_lock_guard.h +@@ -45,8 +45,8 @@ bool transactional_lock_enabled(); + + # include + # if defined __GNUC__ && !defined __INTEL_COMPILER +-# define TRANSACTIONAL_TARGET __attribute__((target("rtm"))) +-# define TRANSACTIONAL_INLINE __attribute__((target("rtm"),always_inline)) ++# define TRANSACTIONAL_TARGET __attribute__((target("rtm"),hot)) ++# define TRANSACTIONAL_INLINE __attribute__((target("rtm"),hot,always_inline)) + # else + # define TRANSACTIONAL_TARGET /* nothing */ + # define TRANSACTIONAL_INLINE /* nothing */ +@@ -70,25 +70,26 @@ TRANSACTIONAL_INLINE static inline void + + TRANSACTIONAL_INLINE static inline void xend() { _xend(); } + # elif defined __powerpc64__ +-# include + extern bool have_transactional_memory; + bool transactional_lock_enabled(); +-# define TRANSACTIONAL_TARGET __attribute__((target("htm"))) +-# define TRANSACTIONAL_INLINE __attribute__((target("htm"),always_inline)) +- +-TRANSACTIONAL_INLINE static inline bool xbegin() +-{ +- return have_transactional_memory && +- __TM_simple_begin() == _HTM_TBEGIN_STARTED; +-} ++# define TRANSACTIONAL_TARGET __attribute__((hot)) ++# define TRANSACTIONAL_INLINE __attribute__((hot,always_inline)) + ++/** ++ Newer gcc compilers only provide __builtin_{htm} ++ function when the -mhtm is actually provided. So ++ we've got the option of including it globally, or ++ pushing down to one file with that enabled and removing ++ the inline optimization. ++ file. ++ */ ++TRANSACTIONAL_TARGET bool xbegin(); ++TRANSACTIONAL_TARGET void xabort(); ++TRANSACTIONAL_TARGET void xend(); + # ifdef UNIV_DEBUG + bool xtest(); + # endif + +-TRANSACTIONAL_INLINE static inline void xabort() { __TM_abort(); } +- +-TRANSACTIONAL_INLINE static inline void xend() { __TM_end(); } + # endif + #endif + +--- a/storage/innobase/sync/srw_lock.cc ++++ b/storage/innobase/sync/srw_lock.cc +@@ -55,6 +55,20 @@ TRANSACTIONAL_TARGET + bool xtest() { return have_transactional_memory && _xtest(); } + # endif + #elif defined __powerpc64__ ++# include ++ ++__attribute__((target("htm"),hot)) ++bool xbegin() ++{ ++ return have_transactional_memory && ++ __TM_simple_begin() == _HTM_TBEGIN_STARTED; ++} ++ ++__attribute__((target("htm"),hot)) ++void xabort() { __TM_abort(); } ++ ++__attribute__((target("htm"),hot)) ++void xend() { __TM_end(); } + # ifdef __linux__ + # include + +@@ -79,7 +93,8 @@ bool transactional_lock_enabled() + } + + # ifdef UNIV_DEBUG +-TRANSACTIONAL_TARGET bool xtest() ++__attribute__((target("htm"),hot)) ++bool xtest() + { + return have_transactional_memory && + _HTM_STATE (__builtin_ttest ()) == _HTM_TRANSACTIONAL; +--- a/storage/innobase/trx/trx0rec.cc ++++ b/storage/innobase/trx/trx0rec.cc +@@ -1951,7 +1951,7 @@ dberr_t trx_undo_report_rename(trx_t* tr + return err; + } + +-TRANSACTIONAL_TARGET ATTRIBUTE_COLD ATTRIBUTE_NOINLINE ++TRANSACTIONAL_TARGET ATTRIBUTE_NOINLINE + /** @return whether the transaction holds an exclusive lock on a table */ + static bool trx_has_lock_x(const trx_t &trx, dict_table_t& table) + { diff -Nru mariadb-10.6-10.6.7/debian/patches/1556.patch mariadb-10.6-10.6.7/debian/patches/1556.patch --- mariadb-10.6-10.6.7/debian/patches/1556.patch 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/1556.patch 2022-03-01 23:13:06.000000000 -0700 @@ -1,5 +1,4 @@ Forwarded: https://github.com/MariaDB/server/pull/1556 -From 3cf95de573a6b10e68df2efc1f8cf2f42fdd2d68 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Otto=20Kek=C3=A4l=C3=A4inen?= Date: Wed, 30 Sep 2020 20:01:35 +0300 Subject: [PATCH] MDEV-22659: Create one single unified and optimal logrotate diff -Nru mariadb-10.6-10.6.7/debian/patches/2006-kfreebsd-amd64.patch mariadb-10.6-10.6.7/debian/patches/2006-kfreebsd-amd64.patch --- mariadb-10.6-10.6.7/debian/patches/2006-kfreebsd-amd64.patch 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/2006-kfreebsd-amd64.patch 2022-03-01 23:13:06.000000000 -0700 @@ -1,4 +1,5 @@ -From: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2006.patch +Forwarded: https://github.com/MariaDB/server/pull/2006 +Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2006.patch From: Samuel Thibault Date: Tue, 8 Feb 2022 00:18:27 +0000 Subject: [PATCH] MDEV-27804 Fails to build - perf schema - thread id of type diff -Nru mariadb-10.6-10.6.7/debian/patches/2028-MDEV-23915-fix-test-main.grat_kill.patch mariadb-10.6-10.6.7/debian/patches/2028-MDEV-23915-fix-test-main.grat_kill.patch --- mariadb-10.6-10.6.7/debian/patches/2028-MDEV-23915-fix-test-main.grat_kill.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/2028-MDEV-23915-fix-test-main.grat_kill.patch 2022-03-03 00:43:11.000000000 -0700 @@ -0,0 +1,101 @@ +Forwarded: https://github.com/MariaDB/server/pull/2028 +Origin: https://patch-diff.githubusercontent.com/raw/MariaDB/server/pull/2028.patch +From: Daniel Black +Date: Wed, 23 Feb 2022 10:10:01 +1100 +Subject: [PATCH] MDEV-23915 ER_KILL_DENIED_ERROR not passed a thread id + +The 10.5 test error main.grant_kill showed up a incorrect +thread id on a big endian architecture. + +The cause of this is the sql_kill_user function assumed the +error was ER_OUT_OF_RESOURCES, when the the actual error was +ER_KILL_DENIED_ERROR. ER_KILL_DENIED_ERROR as an error message +requires a thread id to be passed as unsigned long, however a +user/host was passed. + +ER_OUT_OF_RESOURCES doesn't even take a user/host, despite +the optimistic comment. We remove this being passed as an +argument to the function so that when MDEV-21978 is implemented +one less compiler format warning is generated (which would +have caught this error sooner). + +Thanks Otto for reporting and Marko for analysis. +--- + .../suite/galera/r/galera_kill_applier.result | 4 ++++ + .../suite/galera/t/galera_kill_applier.test | 6 ++++-- + sql/sql_parse.cc | 18 ++++++++++-------- + 3 files changed, 18 insertions(+), 10 deletions(-) + +--- a/mysql-test/suite/galera/r/galera_kill_applier.result ++++ b/mysql-test/suite/galera/r/galera_kill_applier.result +@@ -5,9 +5,13 @@ SELECT @@wsrep_slave_threads; + @@wsrep_slave_threads + 1 + SET GLOBAL wsrep_slave_threads=2; ++KILL ID; + Got one of the listed errors ++KILL QUERY ID; + Got one of the listed errors ++KILL ID; + Got one of the listed errors ++KILL QUERY ID; + Got one of the listed errors + SET GLOBAL wsrep_slave_threads=DEFAULT; + connection node_1; +--- a/mysql-test/suite/galera/t/galera_kill_applier.test ++++ b/mysql-test/suite/galera/t/galera_kill_applier.test +@@ -16,21 +16,23 @@ SET GLOBAL wsrep_slave_threads=2; + + --let $applier_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep applier idle' LIMIT 1` + +---disable_query_log ++--replace_result $applier_thread ID + --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR + --eval KILL $applier_thread + ++--replace_result $applier_thread ID + --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR + --eval KILL QUERY $applier_thread + + --let $aborter_thread = `SELECT ID FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE = 'wsrep aborter idle' LIMIT 1` + ++--replace_result $aborter_thread ID + --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR + --eval KILL $aborter_thread + ++--replace_result $aborter_thread ID + --error ER_KILL_DENIED_ERROR,ER_KILL_DENIED_ERROR + --eval KILL QUERY $aborter_thread +---enable_query_log + + SET GLOBAL wsrep_slave_threads=DEFAULT; + +--- a/sql/sql_parse.cc ++++ b/sql/sql_parse.cc +@@ -9393,15 +9393,18 @@ sql_kill_user(THD *thd, LEX_USER *user, + { + uint error; + ha_rows rows; +- if (likely(!(error= kill_threads_for_user(thd, user, state, &rows)))) +- my_ok(thd, rows); +- else ++ ++ switch (error= kill_threads_for_user(thd, user, state, &rows)) + { +- /* +- This is probably ER_OUT_OF_RESOURCES, but in the future we may +- want to write the name of the user we tried to kill +- */ +- my_error(error, MYF(0), user->host.str, user->user.str); ++ case 0: ++ my_ok(thd, rows); ++ break; ++ case ER_KILL_DENIED_ERROR: ++ my_error(error, MYF(0), (unsigned long) thd->thread_id); ++ break; ++ case ER_OUT_OF_RESOURCES: ++ default: ++ my_error(error, MYF(0)); + } + } + diff -Nru mariadb-10.6-10.6.7/debian/patches/fix-reproducible-builds-rocksdb.patch mariadb-10.6-10.6.7/debian/patches/fix-reproducible-builds-rocksdb.patch --- mariadb-10.6-10.6.7/debian/patches/fix-reproducible-builds-rocksdb.patch 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/fix-reproducible-builds-rocksdb.patch 2022-03-07 12:18:55.000000000 -0700 @@ -1,4 +1,4 @@ -From: https://github.com/SafetyCulture/rocksdb/storage/rocksdb/commit/22aa678dac1bb4c01662a414498f9a1ef2a5a4c7 +Origin: upstream, https://github.com/SafetyCulture/rocksdb/storage/rocksdb/commit/22aa678dac1bb4c01662a414498f9a1ef2a5a4c7 Author: Otto Kekäläinen Subject: Make RocksDB build reproducible diff -Nru mariadb-10.6-10.6.7/debian/patches/fix-spelling-mariadb.patch mariadb-10.6-10.6.7/debian/patches/fix-spelling-mariadb.patch --- mariadb-10.6-10.6.7/debian/patches/fix-spelling-mariadb.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/fix-spelling-mariadb.patch 2022-03-02 19:35:11.000000000 -0700 @@ -0,0 +1,182 @@ +Forwarded: https://github.com/MariaDB/server/pull/2035 +Author: Otto Kekäläinen +Subject: Fix various spelling errors still found in code +--- a/mysql-test/main/dyncol.result ++++ b/mysql-test/main/dyncol.result +@@ -1508,7 +1508,7 @@ select column_get(column_create("1212", + column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int) + NULL + set names latin1; +-# column existance test (names) ++# column existence test (names) + set names utf8; + select column_exists(column_create("адын", 1212), "адын"); + column_exists(column_create("адын", 1212), "адын") +--- a/mysql-test/main/dyncol.test ++++ b/mysql-test/main/dyncol.test +@@ -689,7 +689,7 @@ select column_get(column_create("1212", + select column_get(column_create("1212", 2, "адын", 1, 3, 3), "4" as int); + set names latin1; + +---echo # column existance test (names) ++--echo # column existence test (names) + set names utf8; + select column_exists(column_create("адын", 1212), "адын"); + select column_exists(column_create("адын", 1212), "aады"); +--- a/mysql-test/suite/archive/discover.result ++++ b/mysql-test/suite/archive/discover.result +@@ -84,7 +84,7 @@ drop table t1; + db.opt + t0.ARZ + # +-# discover of table non-existance on drop ++# discover of table non-existence on drop + # + select * from t0; + a +--- a/mysql-test/suite/archive/discover.test ++++ b/mysql-test/suite/archive/discover.test +@@ -67,7 +67,7 @@ drop table t1; + --list_files $mysqld_datadir/test + + --echo # +---echo # discover of table non-existance on drop ++--echo # discover of table non-existence on drop + --echo # + select * from t0; + remove_file $mysqld_datadir/test/t0.ARZ; +@@ -119,7 +119,7 @@ select * from t1; + --list_files $mysqld_datadir/test + + # +-# MDEV-4955 discover of table non-existance on CREATE ++# MDEV-4955 discover of table non-existence on CREATE + # + create table t1 (a int) engine=archive; + select * from t1; +--- a/scripts/sys_schema/README.md ++++ b/scripts/sys_schema/README.md +@@ -5367,9 +5367,9 @@ name, then 'TEMPORARY' will be returned. + + ##### Parameters + +-* in_db (VARCHAR(64)): The database name to check for the existance of the table in. ++* in_db (VARCHAR(64)): The database name to check for the existence of the table in. + +-* in_table (VARCHAR(64)): The name of the table to check the existance of. ++* in_table (VARCHAR(64)): The name of the table to check the existence of. + + * out_exists ENUM('', 'BASE TABLE', 'VIEW', 'TEMPORARY'): The return value: whether the table exists. The value is one of: + - '' - the table does not exist neither as a base table, view, nor temporary table. +--- a/scripts/sys_schema/procedures/table_exists.sql ++++ b/scripts/sys_schema/procedures/table_exists.sql +@@ -34,10 +34,10 @@ CREATE DEFINER='mariadb.sys'@'localhost' + ----------- + + in_db (VARCHAR(64)): +- The database name to check for the existance of the table in. ++ The database name to check for the existence of the table in. + + in_table (VARCHAR(64)): +- The name of the table to check the existance of. ++ The name of the table to check the existence of. + + out_exists ENUM('''', ''BASE TABLE'', ''VIEW'', ''TEMPORARY''): + The return value: whether the table exists. The value is one of: +--- a/sql/semisync_master_ack_receiver.h ++++ b/sql/semisync_master_ack_receiver.h +@@ -183,7 +183,7 @@ public: + + bool listen_on_sockets() + { +- /* Reinitialze the fds with active fds before calling select */ ++ /* Reinitialize the fds with active fds before calling select */ + m_fds= m_init_fds; + struct timeval tv= {1,0}; + /* select requires max fd + 1 for the first argument */ +--- a/sql/sql_table.cc ++++ b/sql/sql_table.cc +@@ -4357,7 +4357,7 @@ int create_table_impl(THD *thd, + else if (options.if_not_exists()) + { + /* +- We never come here as part of normal create table as table existance ++ We never come here as part of normal create table as table existence + is checked in open_and_lock_tables(). We may come here as part of + ALTER TABLE when converting a table for a distributed engine to a + a local one. +--- a/storage/maria/ha_s3.cc ++++ b/storage/maria/ha_s3.cc +@@ -789,13 +789,13 @@ static int s3_discover_table(handlerton + @return 1 frm exists + */ + +-static int s3_discover_table_existance(handlerton *hton, const char *db, ++static int s3_discover_table_existence(handlerton *hton, const char *db, + const char *table_name) + { + S3_INFO s3_info; + ms3_st *s3_client; + int res; +- DBUG_ENTER("s3_discover_table_existance"); ++ DBUG_ENTER("s3_discover_table_existence"); + + /* Ignore names in "mysql" database to speed up boot */ + if (!strcmp(db, MYSQL_SCHEMA_NAME.str)) +@@ -1019,7 +1019,7 @@ static int ha_s3_init(void *p) + s3_hton->table_options= s3_table_option_list; + s3_hton->discover_table= s3_discover_table; + s3_hton->discover_table_names= s3_discover_table_names; +- s3_hton->discover_table_existence= s3_discover_table_existance; ++ s3_hton->discover_table_existence= s3_discover_table_existence; + s3_hton->notify_tabledef_changed= s3_notify_tabledef_changed; + s3_hton->create_partitioning_metadata= s3_create_partitioning_metadata; + s3_hton->tablefile_extensions= no_exts; +--- a/extra/mariabackup/xtrabackup.cc ++++ b/extra/mariabackup/xtrabackup.cc +@@ -602,7 +602,7 @@ void CorruptedPages::zero_out_free_pages + die("Can't zero out corrupted page " UINT32PF " of tablespace %s", + *page_it, space_name.c_str()); + msg("Corrupted page " UINT32PF +- " of tablespace %s was successfuly fixed.", ++ " of tablespace %s was successfully fixed.", + *page_it, space_name.c_str()); + } + } +--- a/mysql-test/suite/mariabackup/log_page_corruption.result ++++ b/mysql-test/suite/mariabackup/log_page_corruption.result +@@ -98,12 +98,12 @@ test/t3_inc + ------ + # Full backup prepare + # "innodb_corrupted_pages" file must not exist after successful prepare +-FOUND 1 /was successfuly fixed.*/ in backup.log ++FOUND 1 /was successfully fixed.*/ in backup.log + # Check that fixed pages are zero-filled + # Incremental backup prepare + # "innodb_corrupted_pages" file must not exist after successful prepare + # do not remove "innodb_corrupted_pages" in incremental dir +-FOUND 1 /was successfuly fixed.*/ in backup.log ++FOUND 1 /was successfully fixed.*/ in backup.log + # Check that fixed pages are zero-filled + # shutdown server + # remove datadir +--- a/mysql-test/suite/mariabackup/log_page_corruption.test ++++ b/mysql-test/suite/mariabackup/log_page_corruption.test +@@ -323,7 +323,7 @@ exec $XTRABACKUP --prepare --target-dir + --echo # "innodb_corrupted_pages" file must not exist after successful prepare + --error 1 + --file_exists $targetdir/innodb_corrupted_pages +---let SEARCH_PATTERN=was successfuly fixed.* ++--let SEARCH_PATTERN=was successfully fixed.* + --let SEARCH_FILE=$backuplog + --source include/search_pattern_in_file.inc + +@@ -347,7 +347,7 @@ exec $XTRABACKUP --prepare --target-dir= + --file_exists $targetdir/innodb_corrupted_pages + --echo # do not remove "innodb_corrupted_pages" in incremental dir + --file_exists $incdir/innodb_corrupted_pages +---let SEARCH_PATTERN=was successfuly fixed.* ++--let SEARCH_PATTERN=was successfully fixed.* + --let SEARCH_FILE=$backuplog + --source include/search_pattern_in_file.inc + diff -Nru mariadb-10.6-10.6.7/debian/patches/fix-spelling.patch mariadb-10.6-10.6.7/debian/patches/fix-spelling.patch --- mariadb-10.6-10.6.7/debian/patches/fix-spelling.patch 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/fix-spelling.patch 1969-12-31 17:00:00.000000000 -0700 @@ -1,36 +0,0 @@ -Forwarded: https://github.com/facebook/rocksdb/pull/7785 -Author: Otto Kekäläinen -Subject: Fix various spelling errors still found in code - Two upstream PRs remain that have been merged, but not imported on MariaDB 10.6. - ---- a/storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc -+++ b/storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc -@@ -46,7 +46,7 @@ Status ExternalSstFileIngestionJob::Prep - TablePropertiesCollectorFactory::Context::kUnknownColumnFamily && - f.cf_id != cfd_->GetID()) { - return Status::InvalidArgument( -- "External file column family id dont match"); -+ "External file column family id don't match"); - } - } - -@@ -646,7 +646,7 @@ Status ExternalSstFileIngestionJob::Assi - return Status::InvalidArgument("Global seqno is required, but disabled"); - } else if (file_to_ingest->global_seqno_offset == 0) { - return Status::InvalidArgument( -- "Trying to set global seqno for a file that dont have a global seqno " -+ "Trying to set global seqno for a file that don't have a global seqno " - "field"); - } - ---- a/storage/rocksdb/rocksdb/include/rocksdb/cache.h -+++ b/storage/rocksdb/rocksdb/include/rocksdb/cache.h -@@ -60,7 +60,7 @@ struct LRUCacheOptions { - // If greater than zero, the LRU list will be split into a high-pri - // list and a low-pri list. High-pri entries will be insert to the - // tail of high-pri list, while low-pri entries will be first inserted to -- // the low-pri list (the midpoint). This is refered to as -+ // the low-pri list (the midpoint). This is referred to as - // midpoint insertion strategy to make entries never get hit in cache - // age out faster. - // diff -Nru mariadb-10.6-10.6.7/debian/patches/fix-spelling-rocksdb.patch mariadb-10.6-10.6.7/debian/patches/fix-spelling-rocksdb.patch --- mariadb-10.6-10.6.7/debian/patches/fix-spelling-rocksdb.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/fix-spelling-rocksdb.patch 2022-03-02 19:35:11.000000000 -0700 @@ -0,0 +1,36 @@ +Forwarded: https://github.com/facebook/rocksdb/pull/9653 +Author: Otto Kekäläinen +Subject: Fix various spelling errors still found in code + Two upstream PRs remain that have been merged, but not imported on MariaDB 10.6. + +--- a/storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc ++++ b/storage/rocksdb/rocksdb/db/external_sst_file_ingestion_job.cc +@@ -46,7 +46,7 @@ Status ExternalSstFileIngestionJob::Prep + TablePropertiesCollectorFactory::Context::kUnknownColumnFamily && + f.cf_id != cfd_->GetID()) { + return Status::InvalidArgument( +- "External file column family id dont match"); ++ "External file column family id don't match"); + } + } + +@@ -646,7 +646,7 @@ Status ExternalSstFileIngestionJob::Assi + return Status::InvalidArgument("Global seqno is required, but disabled"); + } else if (file_to_ingest->global_seqno_offset == 0) { + return Status::InvalidArgument( +- "Trying to set global seqno for a file that dont have a global seqno " ++ "Trying to set global seqno for a file that don't have a global seqno " + "field"); + } + +--- a/storage/rocksdb/rocksdb/include/rocksdb/cache.h ++++ b/storage/rocksdb/rocksdb/include/rocksdb/cache.h +@@ -60,7 +60,7 @@ struct LRUCacheOptions { + // If greater than zero, the LRU list will be split into a high-pri + // list and a low-pri list. High-pri entries will be insert to the + // tail of high-pri list, while low-pri entries will be first inserted to +- // the low-pri list (the midpoint). This is refered to as ++ // the low-pri list (the midpoint). This is referred to as + // midpoint insertion strategy to make entries never get hit in cache + // age out faster. + // diff -Nru mariadb-10.6-10.6.7/debian/patches/fix-spelling-wsrep.patch mariadb-10.6-10.6.7/debian/patches/fix-spelling-wsrep.patch --- mariadb-10.6-10.6.7/debian/patches/fix-spelling-wsrep.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/fix-spelling-wsrep.patch 2022-03-02 19:23:02.000000000 -0700 @@ -0,0 +1,24 @@ +Forwarded: https://github.com/codership/wsrep-lib/pull/183 +Author: Otto Kekäläinen +Subject: Fix various spelling errors still found in code + +--- a/wsrep-lib/src/wsrep_provider_v26.cpp ++++ b/wsrep-lib/src/wsrep_provider_v26.cpp +@@ -690,7 +690,7 @@ void wsrep::wsrep_provider_v26::init_ser + { + if (init_tls_service(wsrep_->dlh, services.tls_service)) + { +- throw wsrep::runtime_error("Failed to initialze TLS service"); ++ throw wsrep::runtime_error("Failed to initialize TLS service"); + } + services_enabled_.tls_service = services.tls_service; + } +@@ -698,7 +698,7 @@ void wsrep::wsrep_provider_v26::init_ser + { + if (init_allowlist_service(wsrep_->dlh, services.allowlist_service)) + { +- throw wsrep::runtime_error("Failed to initialze allowlist service"); ++ throw wsrep::runtime_error("Failed to initialize allowlist service"); + } + services_enabled_.allowlist_service = services.allowlist_service; + } diff -Nru mariadb-10.6-10.6.7/debian/patches/MDEV-26645-fix-test-main.func_math.patch mariadb-10.6-10.6.7/debian/patches/MDEV-26645-fix-test-main.func_math.patch --- mariadb-10.6-10.6.7/debian/patches/MDEV-26645-fix-test-main.func_math.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/MDEV-26645-fix-test-main.func_math.patch 2022-03-01 23:13:06.000000000 -0700 @@ -0,0 +1,65 @@ +Origin: upstream, https://github.com/MariaDB/server/commit/b69191bbb2278fce92b470e8e3abafe048166e39 +From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= +Date: Fri, 18 Feb 2022 16:31:54 +0200 +Subject: [PATCH] MDEV-26645: Fix UB in Item_func_plus and Item_func_minus + +An integer overflow in an expression like a+b or a-b is undefined behavior. +The compiler is allowed to assume that no such overflow is possible, +and optimize away some code accordingly. + +Item_func_plus::int_op(), Item_func_minus::int_op(): Always check +for overflow. + +Depending on the compiler and the compilation options, a test might fail: + +CURRENT_TEST: main.func_math +mysqltest: At line 425: query 'SELECT 9223372036854775807 + 9223372036854775807' succeeded - should have failed with errno 1690... + +A similar bug had been fixed earlier in +commit 328edf8560dbf1941ce314fa112e0db05d9f97f1. + +This commit was backported from MariaDB 10.9 to Debian with MariaDB 10.6. +--- + sql/item_func.cc | 12 ++---------- + 1 file changed, 2 insertions(+), 10 deletions(-) + +--- a/sql/item_func.cc ++++ b/sql/item_func.cc +@@ -1,5 +1,5 @@ + /* Copyright (c) 2000, 2015, Oracle and/or its affiliates. +- Copyright (c) 2009, 2021, MariaDB ++ Copyright (c) 2009, 2022, MariaDB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by +@@ -1156,14 +1156,10 @@ longlong Item_func_plus::int_op() + } + } + +-#ifndef WITH_UBSAN +- res= val0 + val1; +-#else + if (res_unsigned) + res= (longlong) ((ulonglong) val0 + (ulonglong) val1); + else +- res= val0+val1; +-#endif /* WITH_UBSAN */ ++ res= val0 + val1; + + return check_integer_overflow(res, res_unsigned); + +@@ -1326,14 +1322,10 @@ longlong Item_func_minus::int_op() + goto err; + } + } +-#ifndef WITH_UBSAN +- res= val0 - val1; +-#else + if (res_unsigned) + res= (longlong) ((ulonglong) val0 - (ulonglong) val1); + else + res= val0 - val1; +-#endif /* WITH_UBSAN */ + + return check_integer_overflow(res, res_unsigned); + diff -Nru mariadb-10.6-10.6.7/debian/patches/MDEV-27980-revert-loose-disable-plugin-file-key-management.patch mariadb-10.6-10.6.7/debian/patches/MDEV-27980-revert-loose-disable-plugin-file-key-management.patch --- mariadb-10.6-10.6.7/debian/patches/MDEV-27980-revert-loose-disable-plugin-file-key-management.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/MDEV-27980-revert-loose-disable-plugin-file-key-management.patch 2022-03-05 00:56:22.000000000 -0700 @@ -0,0 +1,18 @@ +Bug: https://jira.mariadb.org/browse/MDEV-27980 +Author: Daniel Black +Subject: Revert upstream e99d3da + +Revert upstream https://github.com/MariaDB/server/commit/e99d3da6381023395c86f679bb76b00b4385dc2d +that caused refression in database installation. + +--- a/scripts/mysql_install_db.sh ++++ b/scripts/mysql_install_db.sh +@@ -541,7 +541,7 @@ mysqld_install_cmd_line() + { + "$mysqld_bootstrap" $defaults $defaults_group_suffix "$mysqld_opt" --bootstrap $silent_startup\ + "--basedir=$basedir" "--datadir=$ldata" --log-warnings=0 --enforce-storage-engine="" \ +- "--plugin-dir=${plugindir}" --loose-disable-plugin-file-key-management \ ++ "--plugin-dir=${plugindir}" \ + $args --max_allowed_packet=8M \ + --net_buffer_length=16K + } diff -Nru mariadb-10.6-10.6.7/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch mariadb-10.6-10.6.7/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch --- mariadb-10.6-10.6.7/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/mroonga-mrn-lib-dirs-path-reproducible-build.patch 2022-03-01 23:13:06.000000000 -0700 @@ -1,7 +1,9 @@ -From: https://github.com/mroonga/mroonga/issues/298 +Origin: upstream, https://github.com/mroonga/mroonga/issues/298#issuecomment-1030815927 +Bug: https://github.com/mroonga/mroonga/issues/298 +Forwarded: not-needed Author: Sutou Kouhei Date: Sat, 5 Feb 2022 11:05:39 +0900 -Subject: [PATCH] cmake: add support for reproducible buildSutou Kouhei +Subject: [PATCH] cmake: add support for reproducible buildS . We should use relative path not absolute path. We can use target without breaking reproducibility. diff -Nru mariadb-10.6-10.6.7/debian/patches/openssl-3-compatibility.patch mariadb-10.6-10.6.7/debian/patches/openssl-3-compatibility.patch --- mariadb-10.6-10.6.7/debian/patches/openssl-3-compatibility.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/openssl-3-compatibility.patch 2022-03-02 19:35:12.000000000 -0700 @@ -0,0 +1,369 @@ +Forwarded: https://github.com/MariaDB/server/pull/2036 +From: https://gitlab.com/redhat/centos-stream/rpms/mariadb/-/blob/c9s/mariadb-openssl3.patch +Origin: upstream, https://github.com/MariaDB/server/commit/c80991c79f701dac42c630af4bd39593b0c7efb4 +Author: Vladislav Vaintroub +Date: Mon, 8 Nov 2021 18:48:19 +0100 +Subject: [PATCH] MDEV-25785 Add support for OpenSSL 3.0 + +Summary of changes + +- MD_CTX_SIZE is increased + +- EVP_CIPHER_CTX_buf_noconst(ctx) does not work anymore, points + to nobody knows where. The assumption made previously was that + (since the function does not seem to be documented) + was that it points to the last partial source block. + Add own partial block buffer for NOPAD encryption instead + +- SECLEVEL in CipherString in openssl.cnf + had been downgraded to 0, from 1, to make TLSv1.0 and TLSv1.1 possible + +- Workaround Ssl_cipher_list issue, it now returns TLSv1.3 ciphers, + in addition to what was set in --ssl-cipher + +- ctx_buf buffer now must be aligned to 16 bytes with openssl( + previously with WolfSSL only), or crashes will happen + +- updated aes-t , to be better debuggable + using function, rather than a huge multiline macro + added test that does "nopad" encryption piece-wise, to test + replacement of EVP_CIPHER_CTX_buf_noconst +--- + cmake/ssl.cmake | 19 ++++- + include/ssl_compat.h | 3 +- + mysql-test/lib/openssl.cnf | 2 +- + mysql-test/main/ssl_cipher.result | 6 +- + mysql-test/main/ssl_cipher.test | 2 +- + mysys_ssl/my_crypt.cc | 46 +++++++----- + unittest/mysys/aes-t.c | 121 ++++++++++++++++++++++-------- + 7 files changed, 141 insertions(+), 58 deletions(-) + + +--- a/cmake/ssl.cmake ++++ b/cmake/ssl.cmake +@@ -139,9 +139,20 @@ MACRO (MYSQL_CHECK_SSL) + SET(SSL_INTERNAL_INCLUDE_DIRS "") + SET(SSL_DEFINES "-DHAVE_OPENSSL") + ++ FOREACH(x INCLUDES LIBRARIES DEFINITIONS) ++ SET(SAVE_CMAKE_REQUIRED_${x} ${CMAKE_REQUIRED_${x}}) ++ ENDFOREACH() ++ ++ # Silence "deprecated in OpenSSL 3.0" ++ IF((NOT OPENSSL_VERSION) # 3.0 not determined by older cmake ++ OR NOT(OPENSSL_VERSION VERSION_LESS "3.0.0")) ++ SET(SSL_DEFINES "${SSL_DEFINES} -DOPENSSL_API_COMPAT=0x10100000L") ++ SET(CMAKE_REQUIRED_DEFINITIONS -DOPENSSL_API_COMPAT=0x10100000L) ++ ENDIF() ++ + SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) + SET(CMAKE_REQUIRED_LIBRARIES ${SSL_LIBRARIES}) +- SET(CMAKE_REQUIRED_INCLUDES ${OPENSSL_INCLUDE_DIR}) ++ + CHECK_SYMBOL_EXISTS(ERR_remove_thread_state "openssl/err.h" + HAVE_ERR_remove_thread_state) + CHECK_SYMBOL_EXISTS(EVP_aes_128_ctr "openssl/evp.h" +@@ -150,8 +161,10 @@ MACRO (MYSQL_CHECK_SSL) + HAVE_EncryptAes128Gcm) + CHECK_SYMBOL_EXISTS(X509_check_host "openssl/x509v3.h" + HAVE_X509_check_host) +- SET(CMAKE_REQUIRED_INCLUDES) +- SET(CMAKE_REQUIRED_LIBRARIES) ++ ++ FOREACH(x INCLUDES LIBRARIES DEFINITIONS) ++ SET(CMAKE_REQUIRED_${x} ${SAVE_CMAKE_REQUIRED_${x}}) ++ ENDFOREACH() + ELSE() + IF(WITH_SSL STREQUAL "system") + MESSAGE(FATAL_ERROR "Cannot find appropriate system libraries for SSL. Use WITH_SSL=bundled to enable SSL support") +--- a/include/ssl_compat.h ++++ b/include/ssl_compat.h +@@ -24,7 +24,7 @@ + #define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION) + #define ERR_remove_state(X) ERR_clear_error() + #define EVP_CIPHER_CTX_SIZE 176 +-#define EVP_MD_CTX_SIZE 48 ++#define EVP_MD_CTX_SIZE 72 + #undef EVP_MD_CTX_init + #define EVP_MD_CTX_init(X) do { memset((X), 0, EVP_MD_CTX_SIZE); EVP_MD_CTX_reset(X); } while(0) + #undef EVP_CIPHER_CTX_init +--- a/mysql-test/lib/openssl.cnf ++++ b/mysql-test/lib/openssl.cnf +@@ -9,4 +9,4 @@ ssl_conf = ssl_section + system_default = system_default_section + + [system_default_section] +-CipherString = ALL:@SECLEVEL=1 ++CipherString = ALL:@SECLEVEL=0 +--- a/mysql-test/main/ssl_cipher.result ++++ b/mysql-test/main/ssl_cipher.result +@@ -58,11 +58,8 @@ Ssl_cipher AES256-SHA + drop user mysqltest_1@localhost; + # restart: --ssl-cipher=AES128-SHA + connect ssl_con,localhost,root,,,,,SSL; +-SHOW STATUS LIKE 'Ssl_cipher'; +-Variable_name Value +-Ssl_cipher AES128-SHA +-SHOW STATUS LIKE 'Ssl_cipher_list'; +-Variable_name Value +-Ssl_cipher_list AES128-SHA ++SELECT VARIABLE_VALUE like '%AES128-SHA%' FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher_list'; ++VARIABLE_VALUE like '%AES128-SHA%' ++1 + disconnect ssl_con; + connection default; +--- a/mysql-test/main/ssl_cipher.test ++++ b/mysql-test/main/ssl_cipher.test +@@ -97,7 +97,6 @@ drop user mysqltest_1@localhost; + let $restart_parameters=--ssl-cipher=AES128-SHA; + source include/restart_mysqld.inc; + connect (ssl_con,localhost,root,,,,,SSL); +-SHOW STATUS LIKE 'Ssl_cipher'; +-SHOW STATUS LIKE 'Ssl_cipher_list'; ++SELECT VARIABLE_VALUE like '%AES128-SHA%' FROM INFORMATION_SCHEMA.SESSION_STATUS WHERE VARIABLE_NAME='Ssl_cipher_list'; + disconnect ssl_con; + connection default; +--- a/mysys_ssl/my_crypt.cc ++++ b/mysys_ssl/my_crypt.cc +@@ -29,11 +29,7 @@ + #include + #include + +-#ifdef HAVE_WOLFSSL + #define CTX_ALIGN 16 +-#else +-#define CTX_ALIGN 0 +-#endif + + class MyCTX + { +@@ -100,8 +96,9 @@ class MyCTX_nopad : public MyCTX + { + public: + const uchar *key; +- uint klen, buf_len; ++ uint klen, source_tail_len; + uchar oiv[MY_AES_BLOCK_SIZE]; ++ uchar source_tail[MY_AES_BLOCK_SIZE]; + + MyCTX_nopad() : MyCTX() { } + ~MyCTX_nopad() { } +@@ -112,7 +109,7 @@ public: + compile_time_assert(MY_AES_CTX_SIZE >= sizeof(MyCTX_nopad)); + this->key= key; + this->klen= klen; +- this->buf_len= 0; ++ this->source_tail_len= 0; + if (ivlen) + memcpy(oiv, iv, ivlen); + DBUG_ASSERT(ivlen == 0 || ivlen == sizeof(oiv)); +@@ -123,26 +120,41 @@ public: + return res; + } + ++ /** Update last partial source block, stored in source_tail array. */ ++ void update_source_tail(const uchar* src, uint slen) ++ { ++ if (!slen) ++ return; ++ uint new_tail_len= (source_tail_len + slen) % MY_AES_BLOCK_SIZE; ++ if (new_tail_len) ++ { ++ if (slen + source_tail_len < MY_AES_BLOCK_SIZE) ++ { ++ memcpy(source_tail + source_tail_len, src, slen); ++ } ++ else ++ { ++ DBUG_ASSERT(slen > new_tail_len); ++ memcpy(source_tail, src + slen - new_tail_len, new_tail_len); ++ } ++ } ++ source_tail_len= new_tail_len; ++ } ++ + int update(const uchar *src, uint slen, uchar *dst, uint *dlen) + { +- buf_len+= slen; ++ update_source_tail(src, slen); + return MyCTX::update(src, slen, dst, dlen); + } + + int finish(uchar *dst, uint *dlen) + { +- buf_len %= MY_AES_BLOCK_SIZE; +- if (buf_len) ++ if (source_tail_len) + { +- uchar *buf= EVP_CIPHER_CTX_buf_noconst(ctx); + /* + Not much we can do, block ciphers cannot encrypt data that aren't + a multiple of the block length. At least not without padding. + Let's do something CTR-like for the last partial block. +- +- NOTE this assumes that there are only buf_len bytes in the buf. +- If OpenSSL will change that, we'll need to change the implementation +- of this class too. + */ + uchar mask[MY_AES_BLOCK_SIZE]; + uint mlen; +@@ -154,10 +166,10 @@ public: + return rc; + DBUG_ASSERT(mlen == sizeof(mask)); + +- for (uint i=0; i < buf_len; i++) +- dst[i]= buf[i] ^ mask[i]; ++ for (uint i=0; i < source_tail_len; i++) ++ dst[i]= source_tail[i] ^ mask[i]; + } +- *dlen= buf_len; ++ *dlen= source_tail_len; + return MY_AES_OK; + } + }; +--- a/unittest/mysys/aes-t.c ++++ b/unittest/mysys/aes-t.c +@@ -21,27 +21,96 @@ + #include + #include + +-#define DO_TEST(mode, nopad, slen, fill, dlen, hash) \ +- SKIP_BLOCK_IF(mode == 0xDEADBEAF, nopad ? 4 : 5, #mode " not supported") \ +- { \ +- memset(src, fill, src_len= slen); \ +- ok(my_aes_crypt(mode, nopad | ENCRYPTION_FLAG_ENCRYPT, \ +- src, src_len, dst, &dst_len, \ +- key, sizeof(key), iv, sizeof(iv)) == MY_AES_OK, \ +- "encrypt " #mode " %u %s", src_len, nopad ? "nopad" : "pad"); \ +- if (!nopad) \ +- ok (dst_len == my_aes_get_size(mode, src_len), "my_aes_get_size");\ +- my_md5(md5, (char*)dst, dst_len); \ +- ok(dst_len == dlen && memcmp(md5, hash, sizeof(md5)) == 0, "md5"); \ +- ok(my_aes_crypt(mode, nopad | ENCRYPTION_FLAG_DECRYPT, \ +- dst, dst_len, ddst, &ddst_len, \ +- key, sizeof(key), iv, sizeof(iv)) == MY_AES_OK, \ +- "decrypt " #mode " %u", dst_len); \ +- ok(ddst_len == src_len && memcmp(src, ddst, src_len) == 0, "memcmp"); \ ++ ++/** Test streaming encryption, bytewise update.*/ ++static int aes_crypt_bytewise(enum my_aes_mode mode, int flags, const unsigned char *src, ++ unsigned int slen, unsigned char *dst, unsigned int *dlen, ++ const unsigned char *key, unsigned int klen, ++ const unsigned char *iv, unsigned int ivlen) ++{ ++ /* Allocate context on odd address on stack, in order to ++ catch misalignment errors.*/ ++ void *ctx= (char *)alloca(MY_AES_CTX_SIZE+1)+1; ++ ++ int res1, res2; ++ uint d1= 0, d2; ++ uint i; ++ ++ if ((res1= my_aes_crypt_init(ctx, mode, flags, key, klen, iv, ivlen))) ++ return res1; ++ for (i= 0; i < slen; i++) ++ { ++ uint tmp_d1=0; ++ res1= my_aes_crypt_update(ctx, src+i,1, dst, &tmp_d1); ++ if (res1) ++ return res1; ++ d1+= tmp_d1; ++ dst+= tmp_d1; ++ } ++ res2= my_aes_crypt_finish(ctx, dst, &d2); ++ *dlen= d1 + d2; ++ return res1 ? res1 : res2; ++} ++ ++ ++#ifndef HAVE_EncryptAes128Ctr ++const uint MY_AES_CTR=0xDEADBEAF; ++#endif ++#ifndef HAVE_EncryptAes128Gcm ++const uint MY_AES_GCM=0xDEADBEAF; ++#endif ++ ++#define MY_AES_UNSUPPORTED(x) (x == 0xDEADBEAF) ++ ++static void do_test(uint mode, const char *mode_str, int nopad, uint slen, ++ char fill, size_t dlen, const char *hash) ++{ ++ uchar key[16]= {1, 2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6}; ++ uchar iv[16]= {2, 3, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4, 5, 6, 7}; ++ uchar src[1000], dst[1100], dst2[1100], ddst[1000]; ++ uchar md5[MY_MD5_HASH_SIZE]; ++ uint src_len, dst_len, dst_len2, ddst_len; ++ int result; ++ ++ if (MY_AES_UNSUPPORTED(mode)) ++ { ++ skip(nopad?7:6, "%s not supported", mode_str); ++ return; ++ } ++ memset(src, fill, src_len= slen); ++ result= my_aes_crypt(mode, nopad | ENCRYPTION_FLAG_ENCRYPT, src, src_len, ++ dst, &dst_len, key, sizeof(key), iv, sizeof(iv)); ++ ok(result == MY_AES_OK, "encrypt %s %u %s", mode_str, src_len, ++ nopad ? "nopad" : "pad"); ++ ++ if (nopad) ++ { ++ result= aes_crypt_bytewise(mode, nopad | ENCRYPTION_FLAG_ENCRYPT, src, ++ src_len, dst2, &dst_len2, key, sizeof(key), ++ iv, sizeof(iv)); ++ ok(result == MY_AES_OK, "encrypt bytewise %s %u", mode_str, src_len); ++ /* Compare with non-bytewise encryption result*/ ++ ok(dst_len == dst_len2 && memcmp(dst, dst2, dst_len) == 0, ++ "memcmp bytewise %s %u", mode_str, src_len); + } ++ else ++ { ++ int dst_len_real= my_aes_get_size(mode, src_len); ++ ok(dst_len_real= dst_len, "my_aes_get_size"); ++ } ++ my_md5(md5, (char *) dst, dst_len); ++ ok(dst_len == dlen, "md5 len"); ++ ok(memcmp(md5, hash, sizeof(md5)) == 0, "md5"); ++ result= my_aes_crypt(mode, nopad | ENCRYPTION_FLAG_DECRYPT, ++ dst, dst_len, ddst, &ddst_len, key, sizeof(key), iv, ++ sizeof(iv)); ++ ++ ok(result == MY_AES_OK, "decrypt %s %u", mode_str, dst_len); ++ ok(ddst_len == src_len && memcmp(src, ddst, src_len) == 0, "memcmp"); ++} + +-#define DO_TEST_P(M,S,F,D,H) DO_TEST(M,0,S,F,D,H) +-#define DO_TEST_N(M,S,F,D,H) DO_TEST(M,ENCRYPTION_FLAG_NOPAD,S,F,D,H) ++#define DO_TEST_P(M, S, F, D, H) do_test(M, #M, 0, S, F, D, H) ++#define DO_TEST_N(M, S, F, D, H) do_test(M, #M, ENCRYPTION_FLAG_NOPAD, S, F, D, H) + + /* useful macro for debugging */ + #define PRINT_MD5() \ +@@ -53,25 +122,15 @@ + printf("\"\n"); \ + } while(0); + +-#ifndef HAVE_EncryptAes128Ctr +-const uint MY_AES_CTR=0xDEADBEAF; +-#endif +-#ifndef HAVE_EncryptAes128Gcm +-const uint MY_AES_GCM=0xDEADBEAF; +-#endif + + int + main(int argc __attribute__((unused)),char *argv[]) + { +- uchar key[16]= {1,2,3,4,5,6,7,8,9,0,1,2,3,4,5,6}; +- uchar iv[16]= {2,3,4,5,6,7,8,9,0,1,2,3,4,5,6,7}; +- uchar src[1000], dst[1100], ddst[1000]; +- uchar md5[MY_MD5_HASH_SIZE]; +- uint src_len, dst_len, ddst_len; + + MY_INIT(argv[0]); + +- plan(87); ++ plan(122); ++ + DO_TEST_P(MY_AES_ECB, 200, '.', 208, "\xd8\x73\x8e\x3a\xbc\x66\x99\x13\x7f\x90\x23\x52\xee\x97\x6f\x9a"); + DO_TEST_P(MY_AES_ECB, 128, '?', 144, "\x19\x58\x33\x85\x4c\xaa\x7f\x06\xd1\xb2\xec\xd7\xb7\x6a\xa9\x5b"); + DO_TEST_P(MY_AES_CBC, 159, '%', 160, "\x4b\x03\x18\x3d\xf1\xa7\xcd\xa1\x46\xb3\xc6\x8a\x92\xc0\x0f\xc9"); diff -Nru mariadb-10.6-10.6.7/debian/patches/openssl-3-enable.patch mariadb-10.6-10.6.7/debian/patches/openssl-3-enable.patch --- mariadb-10.6-10.6.7/debian/patches/openssl-3-enable.patch 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/openssl-3-enable.patch 2022-03-01 23:13:06.000000000 -0700 @@ -0,0 +1,23 @@ +Origin: upstream, https://github.com/MariaDB/server/commit/64e358821e0e8b5a2134aa93ba9ddf24cd46ac7c +Author: Oleksandr Byelkin +Date: Fri, 4 Feb 2022 14:52:03 +0100 +Subject: [PATCH] Revert "don't build with OpenSSL 3.0, it doesn't work before + MDEV-25785" + +This reverts commit c9beef43154a199bfcd9f71049c011a2ed77ca74, because +we have OpenSSL 3.0 support here. +--- + cmake/ssl.cmake | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +--- a/cmake/ssl.cmake ++++ b/cmake/ssl.cmake +@@ -118,7 +118,7 @@ MACRO (MYSQL_CHECK_SSL) + ENDIF() + FIND_PACKAGE(OpenSSL) + SET_PACKAGE_PROPERTIES(OpenSSL PROPERTIES TYPE RECOMMENDED) +- IF(OPENSSL_FOUND AND OPENSSL_VERSION AND OPENSSL_VERSION VERSION_LESS "3.0.0") ++ IF(OPENSSL_FOUND) + SET(OPENSSL_LIBRARY ${OPENSSL_SSL_LIBRARY}) + INCLUDE(CheckSymbolExists) + SET(SSL_SOURCES "") diff -Nru mariadb-10.6-10.6.7/debian/patches/series mariadb-10.6-10.6.7/debian/patches/series --- mariadb-10.6-10.6.7/debian/patches/series 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/patches/series 2022-03-07 12:18:55.000000000 -0700 @@ -2,8 +2,16 @@ rocksdb-kfreebsd.patch mroonga-path-reproducible-build.patch env-perl-usr-bin-perl.patch -fix-spelling.patch +fix-spelling-mariadb.patch +fix-spelling-rocksdb.patch +fix-spelling-wsrep.patch 1556.patch fix-reproducible-builds-rocksdb.patch mroonga-mrn-lib-dirs-path-reproducible-build.patch 2006-kfreebsd-amd64.patch +openssl-3-enable.patch +openssl-3-compatibility.patch +MDEV-26645-fix-test-main.func_math.patch +2028-MDEV-23915-fix-test-main.grat_kill.patch +MDEV-27980-revert-loose-disable-plugin-file-key-management.patch +1006527-fix-ppc64-ftbfs.patch diff -Nru mariadb-10.6-10.6.7/debian/README.Contributor mariadb-10.6-10.6.7/debian/README.Contributor --- mariadb-10.6-10.6.7/debian/README.Contributor 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/README.Contributor 2022-03-02 18:38:52.000000000 -0700 @@ -236,7 +236,7 @@ laptop$ docker run -it -v ${PWD}:/build -w /build debian:sid bash container$ apt update && apt install -y autopkgtest - container$ autopkgtest -- null + container$ autopkgtest --shell-fail -- null Edit the files in `debian/tests` in your favorite code editor and re-run the `autopkgtest -- null` until the tests are passing. When the autopkgtests work diff -Nru mariadb-10.6-10.6.7/debian/source/lintian-overrides mariadb-10.6-10.6.7/debian/source/lintian-overrides --- mariadb-10.6-10.6.7/debian/source/lintian-overrides 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/source/lintian-overrides 2022-03-01 23:13:06.000000000 -0700 @@ -1,65 +1,35 @@ -# Upstream cruft we can safely ignore -source-contains-autogenerated-visual-c++-file win/upgrade_wizard/resource.h -source-contains-autogenerated-visual-c++-file win/upgrade_wizard/upgrade.rc -source-contains-autogenerated-visual-c++-file extra/wolfssl/wolfssl/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/ddlproc/DDLProc.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/ddlproc/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/dmlproc/DMLProc.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/dmlproc/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/exemgr/ExeMgr.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/exemgr/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/writeengine/libwriteengine.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/writeengine/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/dbcon/ddlpackageproc/libddlpackageproc.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/dbcon/ddlpackageproc/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/dbcon/dmlpackageproc/libdmlpackageproc.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/dbcon/dmlpackageproc/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/dbcon/joblist/libjoblist.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/dbcon/joblist/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/oam/oamcpp/liboamcpp.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/oam/oamcpp/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/primitives/primproc/PrimProc.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/primitives/primproc/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/tools/dbloadxml/colxml.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/tools/dbloadxml/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/utils/configcpp/libconfigcpp.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/utils/configcpp/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/utils/udfsdk/libudf_mysql.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/utils/udfsdk/libudfsdk.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/utils/udfsdk/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/utils/winport/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/utils/winport/winfinidb.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/versioning/BRM/controllernode.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/versioning/BRM/libbrm.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/versioning/BRM/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/versioning/BRM/workernode.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/writeengine/bulk/cpimport.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/writeengine/bulk/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/writeengine/server/WriteEngineServer.rc -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/writeengine/server/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/writeengine/splitter/resource.h -source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/writeengine/splitter/splitter.rc -source-contains-prebuilt-java-object storage/connect/JavaWrappers.jar -source-contains-prebuilt-java-object storage/connect/mysql-test/connect/std_data/JavaWrappers.jar -source-contains-prebuilt-java-object storage/connect/mysql-test/connect/std_data/JdbcMariaDB.jar -source-contains-prebuilt-java-object storage/connect/mysql-test/connect/std_data/Mongo2.jar -source-contains-prebuilt-java-object storage/connect/mysql-test/connect/std_data/Mongo3.jar -# Intentionally use a version that is easy to backport to Debian Stretch and Ubuntu Bionic (or Xenial-backports) -package-uses-old-debhelper-compat-version 10 -# Intentional as libmariadbd-dev provides libmysqld-dev +# Intentional control relationships version-substvar-for-external-package libmariadb-dev -> libmysqld-dev -version-substvar-for-external-package libmariadb-dev -> libmysqlclient-dev -version-substvar-for-external-package libmariadbd-dev -> libmariadbclient-dev -# Same as above but with newer Lintian syntax -version-substvar-for-external-package Replaces (line 219) ${source:Version} libmariadbd-dev -> libmariadbclient-dev -version-substvar-for-external-package Replaces (line 63) ${source:Version} libmariadb-dev -> libmysqlclient-dev -version-substvar-for-external-package Replaces (line 61) ${source:Version} libmariadb-dev -> libmysqld-dev +version-substvar-for-external-package Replaces (line 60) ${source:Version} libmariadb-dev -> libmysqld-dev # Not much we can do about this in Debian, no need for Lintian to fail the whole check on it -source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.js line 58 is 273 characters long (>256) source-is-missing storage/mroonga/vendor/groonga/examples/dictionary/html/js/jquery-ui-1.8.18.custom.js -# ColumnStore not used in Debian, safe to ignore. Reported upstream in https://jira.mariadb.org/browse/MDEV-24124 -source-is-missing storage/columnstore/columnstore/utils/jemalloc/libjemalloc.so.2 -# Intentional control relationships -version-substvar-for-external-package Replaces (line 216) ${source:Version} libmariadbd-dev -> libmariadbclient-dev -version-substvar-for-external-package Replaces (line 66) ${source:Version} libmariadb-dev -> libmysqlclient-dev -version-substvar-for-external-package Replaces (line 66) ${source:Version} libmariadb-dev -> libmysqld-dev +# Data or test files where long lines are justified +very-long-line-length-in-source-file *.test * +very-long-line-length-in-source-file *.result * +very-long-line-length-in-source-file BUILD/compile-* +very-long-line-length-in-source-file *.cproject * +very-long-line-length-in-source-file extra/wolfssl/wolfssl/IDE/Espressif/ESP-IDF/test/test_wolfssl.c * +very-long-line-length-in-source-file extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RX65N/GR-ROSE/smc/smc.scfg * +very-long-line-length-in-source-file extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/smc/smc.scfg * +very-long-line-length-in-source-file extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RX65N/RSK/test/test_HardwareDebug.launch * +very-long-line-length-in-source-file extra/wolfssl/wolfssl/IDE/Renesas/e2studio/RX72N/EnvisionKit/smc/smc.scfg * +very-long-line-length-in-source-file extra/wolfssl/wolfssl/wolfcrypt/src/fp_mul_comba_* +very-long-line-length-in-source-file extra/wolfssl/wolfssl/wolfcrypt/src/fp_sqr_comba_* +very-long-line-length-in-source-file mysql-test/collections/default.weekly * +very-long-line-length-in-source-file mysql-test/include/common-tests.inc * +very-long-line-length-in-source-file mysql-test/include/default_optimizer_switch.inc * +very-long-line-length-in-source-file mysql-test/std_data/* +very-long-line-length-in-source-file mysql-test/suite/* +very-long-line-length-in-source-file plugin/handler_socket/regtest/* +very-long-line-length-in-source-file storage/archive/archive_test.c * +very-long-line-length-in-source-file storage/maria/libmarias3/docs/_themes/sphinx_rtd_theme/static/css/badge_only.css * +very-long-line-length-in-source-file storage/maria/libmarias3/docs/_themes/sphinx_rtd_theme/static/css/theme.css * +very-long-line-length-in-source-file storage/rocksdb/mysql-test/rocksdb/* +very-long-line-length-in-source-file storage/spider/mysql-test/spider/bugfix/include/sql_mode_init.inc * +# Columnstore source code pollution +very-long-line-length-in-source-file storage/columnstore/columnstore/*.xmi * +very-long-line-length-in-source-file storage/columnstore/columnstore/dbcon/doc/q19_plan.txt * +very-long-line-length-in-source-file storage/columnstore/columnstore/mysql-test/columnstore/csinternal/include/autopilot_create_datatypetestm_tables.inc * +very-long-line-length-in-source-file storage/columnstore/columnstore/mysql-test/columnstore/csinternal/include/autopilot_create_datatypeupdate_table.inc * +source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/*.rc +source-contains-autogenerated-visual-c++-file storage/columnstore/columnstore/*.h diff -Nru mariadb-10.6-10.6.7/debian/tests/upstream mariadb-10.6-10.6.7/debian/tests/upstream --- mariadb-10.6-10.6.7/debian/tests/upstream 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/tests/upstream 2022-03-02 16:53:52.000000000 -0700 @@ -10,6 +10,8 @@ set -e SKIP_TEST_LST="/tmp/skip-test.lst" +ARCH=$(dpkg --print-architecture) + WORKDIR=$(mktemp -d) trap 'rm -rf $WORKDIR $SKIP_TEST_LST' 0 INT QUIT ABRT PIPE TERM cd "$WORKDIR" @@ -25,14 +27,11 @@ # Use unstable-tests list as base to skip all tests considered unstable cp /usr/share/mysql/mysql-test/unstable-tests $SKIP_TEST_LST -# Also use arch specific skiplists if such files exist -for filename in /usr/share/mysql/mysql-test/unstable-tests.* -do - # Check for case that no files matched and glob is returned - [ -e "$filename" ] || continue - # Append file to the main skip test list file - cat "$filename" >> $SKIP_TEST_LST -done +# Also use the arch specific skiplists if exist +if [ -f /usr/share/mysql/mysql-test/unstable-tests.$ARCH ] +then + cat /usr/share/mysql/mysql-test/unstable-tests.$ARCH >> $SKIP_TEST_LST +fi # Skip tests that cannot run properly on ci.debian.net / autopkgtests.ubuntu.com cat >> $SKIP_TEST_LST << EOF @@ -49,7 +48,6 @@ EOF fi -ARCH=$(dpkg --print-architecture) if [ "$ARCH" = "s390x" ] then echo "main.func_regexp_pcre : recursion fails on s390x https://bugs.launchpad.net/ubuntu/+source/mariadb-10.1/+bug/1723947" >> $SKIP_TEST_LST @@ -58,6 +56,10 @@ echo "main.failed_auth_unixsocket : Test returns wrong exit code on armhf and i386 (but only in debci) https://jira.mariadb.org/browse/MDEV-23933" >> $SKIP_TEST_LST fi +# Store skipped test list in artifacts so it can be viewed while debugging +# failed autopkgtest runs +cp -v $SKIP_TEST_LST $AUTOPKGTEST_ARTIFACTS + cd /usr/share/mysql/mysql-test echo "starting mysql-test-tun.pl..." eatmydata perl -I. ./mysql-test-run.pl --suite=main \ diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.armel mariadb-10.6-10.6.7/debian/unstable-tests.armel --- mariadb-10.6-10.6.7/debian/unstable-tests.armel 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.armel 2022-03-01 23:13:06.000000000 -0700 @@ -0,0 +1 @@ +main.partition_key_cache : MDEV-23427 diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.m68k mariadb-10.6-10.6.7/debian/unstable-tests.m68k --- mariadb-10.6-10.6.7/debian/unstable-tests.m68k 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.m68k 2022-03-01 23:13:06.000000000 -0700 @@ -1 +1 @@ -# For an unknown reason, the mysql-test-run does not even start on m68k Debian buildd +# For an unknown reason, the mysql-test-run does not even start on m68k Debian buildd (Bug#972057) diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.mips64el mariadb-10.6-10.6.7/debian/unstable-tests.mips64el --- mariadb-10.6-10.6.7/debian/unstable-tests.mips64el 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.mips64el 1969-12-31 17:00:00.000000000 -0700 @@ -1 +0,0 @@ -main.func_math : MDEV-26645 diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.mipsel mariadb-10.6-10.6.7/debian/unstable-tests.mipsel --- mariadb-10.6-10.6.7/debian/unstable-tests.mipsel 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.mipsel 2022-03-01 23:13:06.000000000 -0700 @@ -1 +1 @@ -main.func_math : MDEV-26645 +main.func_json_notembedded : MDEV-27955 diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.powerpc mariadb-10.6-10.6.7/debian/unstable-tests.powerpc --- mariadb-10.6-10.6.7/debian/unstable-tests.powerpc 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.powerpc 2022-03-01 23:13:06.000000000 -0700 @@ -1,2 +1 @@ -main.grant_kill : https://jira.mariadb.org/browse/MDEV-23915 -main.func_math : MDEV-26645 +main.func_json_notembedded : MDEV-27955 diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.ppc64el mariadb-10.6-10.6.7/debian/unstable-tests.ppc64el --- mariadb-10.6-10.6.7/debian/unstable-tests.ppc64el 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.ppc64el 2022-03-01 23:06:51.000000000 -0700 @@ -1,2 +1 @@ main.strings : MDEV-26644 -main.func_math : MDEV-26645 diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.riscv64 mariadb-10.6-10.6.7/debian/unstable-tests.riscv64 --- mariadb-10.6-10.6.7/debian/unstable-tests.riscv64 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.riscv64 1969-12-31 17:00:00.000000000 -0700 @@ -1 +0,0 @@ -main.func_math : MDEV-26645 diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.s390x mariadb-10.6-10.6.7/debian/unstable-tests.s390x --- mariadb-10.6-10.6.7/debian/unstable-tests.s390x 2022-02-17 22:27:10.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.s390x 2022-03-01 23:13:06.000000000 -0700 @@ -1,2 +1,2 @@ main.strings : MDEV-26644 -main.func_math : MDEV-26645 +main.func_json_notembedded : MDEV-27955 diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.sh4 mariadb-10.6-10.6.7/debian/unstable-tests.sh4 --- mariadb-10.6-10.6.7/debian/unstable-tests.sh4 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.sh4 2022-03-02 16:46:24.000000000 -0700 @@ -0,0 +1 @@ +# For an unknown reason, the mysql-test-run does not even start on sh4 Debian buildd (Bug#988349) diff -Nru mariadb-10.6-10.6.7/debian/unstable-tests.sparc64 mariadb-10.6-10.6.7/debian/unstable-tests.sparc64 --- mariadb-10.6-10.6.7/debian/unstable-tests.sparc64 1969-12-31 17:00:00.000000000 -0700 +++ mariadb-10.6-10.6.7/debian/unstable-tests.sparc64 2022-03-02 16:46:16.000000000 -0700 @@ -0,0 +1,10 @@ +main.partition_order : MDEV-27954 +main.func_str : MDEV-27954 +main.group_by : MDEV-27954 +main.group_by_null : MDEV-27954 +main.features : MDEV-27954 +main.repair_symlink-5543 : MDEV-23920 +main.type_datetime : MDEV-27954 +main.xml : MDEV-27954 +main.func_like : MDEV-27954 +main.func_math : MDEV-27954