Version in base suite: 10.5.19-0+deb11u2 Base version: mariadb-10.5_10.5.19-0+deb11u2 Target version: mariadb-10.5_10.5.21-0+deb11u1 Base file: /srv/ftp-master.debian.org/ftp/pool/main/m/mariadb-10.5/mariadb-10.5_10.5.19-0+deb11u2.dsc Target file: /srv/ftp-master.debian.org/policy/pool/main/m/mariadb-10.5/mariadb-10.5_10.5.21-0+deb11u1.dsc /srv/release.debian.org/tmp/1PomEqy7JO/mariadb-10.5-10.5.21/mysql-test/std_data/ctype_upgrade/mariadb100428_ucs2_general_ci.MYD |binary /srv/release.debian.org/tmp/1PomEqy7JO/mariadb-10.5-10.5.21/mysql-test/std_data/ctype_upgrade/mariadb100428_ucs2_general_ci.MYI |binary /srv/release.debian.org/tmp/1PomEqy7JO/mariadb-10.5-10.5.21/mysql-test/std_data/ctype_upgrade/mariadb100428_ucs2_general_ci.frm |binary /srv/release.debian.org/tmp/1PomEqy7JO/mariadb-10.5-10.5.21/mysql-test/std_data/rpl/master-bin-seq_10.3.36.000001 |binary mariadb-10.5-10.5.21/.gitlab-ci.yml | 494 mariadb-10.5-10.5.21/.gitmodules | 6 mariadb-10.5-10.5.21/BUILD/compile-pentium64-asan-max | 2 mariadb-10.5-10.5.21/Docs/INFO_SRC | 10 mariadb-10.5-10.5.21/VERSION | 2 mariadb-10.5-10.5.21/client/mysql.cc | 1 mariadb-10.5-10.5.21/client/mysql_plugin.c | 112 mariadb-10.5-10.5.21/client/mysql_upgrade.c | 17 mariadb-10.5-10.5.21/client/mysqladmin.cc | 3 mariadb-10.5-10.5.21/client/mysqlbinlog.cc | 33 mariadb-10.5-10.5.21/client/mysqlcheck.c | 1 mariadb-10.5-10.5.21/client/mysqldump.c | 33 mariadb-10.5-10.5.21/client/mysqlslap.c | 8 mariadb-10.5-10.5.21/client/mysqltest.cc | 27 mariadb-10.5-10.5.21/debian/changelog | 10 mariadb-10.5-10.5.21/debian/libmariadb-dev.install | 1 mariadb-10.5-10.5.21/debian/mariadb-server-10.5.mariadb.init | 13 mariadb-10.5-10.5.21/debian/patches/mariadb-client-version-id.patch | 4 mariadb-10.5-10.5.21/debian/salsa-ci.yml | 117 mariadb-10.5-10.5.21/extra/mariabackup/backup_copy.cc | 259 mariadb-10.5-10.5.21/extra/mariabackup/backup_copy.h | 19 mariadb-10.5-10.5.21/extra/mariabackup/backup_mysql.cc | 40 mariadb-10.5-10.5.21/extra/mariabackup/backup_mysql.h | 15 mariadb-10.5-10.5.21/extra/mariabackup/datasink.h | 29 mariadb-10.5-10.5.21/extra/mariabackup/write_filt.cc | 14 mariadb-10.5-10.5.21/extra/mariabackup/write_filt.h | 3 mariadb-10.5-10.5.21/extra/mariabackup/xbcloud.cc | 2 mariadb-10.5-10.5.21/extra/mariabackup/xtrabackup.cc | 288 mariadb-10.5-10.5.21/extra/mariabackup/xtrabackup.h | 13 mariadb-10.5-10.5.21/extra/wolfssl/CMakeLists.txt | 3 mariadb-10.5-10.5.21/include/CMakeLists.txt | 3 mariadb-10.5-10.5.21/include/ilist.h | 7 mariadb-10.5-10.5.21/include/m_ctype.h | 25 mariadb-10.5-10.5.21/include/m_string.h | 19 mariadb-10.5-10.5.21/include/my_alloca.h | 47 mariadb-10.5-10.5.21/include/my_atomic_wrapper.h | 2 mariadb-10.5-10.5.21/include/my_counter.h | 2 mariadb-10.5-10.5.21/include/my_global.h | 8 mariadb-10.5-10.5.21/include/my_sys.h | 14 mariadb-10.5-10.5.21/include/mysql/psi/mysql_file.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_idle.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_mdl.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_memory.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_ps.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_socket.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_sp.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_stage.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_statement.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_table.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_thread.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/mysql_transaction.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/psi.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v0.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v1.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v2.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/psi_base.h | 2 mariadb-10.5-10.5.21/include/mysql/psi/psi_memory.h | 2 mariadb-10.5-10.5.21/include/mysql/service_encryption.h | 13 mariadb-10.5-10.5.21/include/source_revision.h | 2 mariadb-10.5-10.5.21/include/span.h | 2 mariadb-10.5-10.5.21/include/ssl_compat.h | 3 mariadb-10.5-10.5.21/libmariadb/.travis.yml | 19 mariadb-10.5-10.5.21/libmariadb/CMakeLists.txt | 16 mariadb-10.5-10.5.21/libmariadb/cmake/CheckFunctions.cmake | 30 mariadb-10.5-10.5.21/libmariadb/cmake/CheckIncludeFiles.cmake | 58 mariadb-10.5-10.5.21/libmariadb/cmake/CheckTypes.cmake | 63 mariadb-10.5-10.5.21/libmariadb/cmake/check_functions.cmake | 30 mariadb-10.5-10.5.21/libmariadb/cmake/check_include_files.cmake | 58 mariadb-10.5-10.5.21/libmariadb/cmake/check_types.cmake | 63 mariadb-10.5-10.5.21/libmariadb/include/errmsg.h | 4 mariadb-10.5-10.5.21/libmariadb/include/mariadb_stmt.h | 3 mariadb-10.5-10.5.21/libmariadb/libmariadb/mariadb_lib.c | 30 mariadb-10.5-10.5.21/libmariadb/libmariadb/mariadb_stmt.c | 103 mariadb-10.5-10.5.21/libmariadb/plugins/auth/CMakeLists.txt | 5 mariadb-10.5-10.5.21/libmariadb/plugins/auth/my_auth.c | 12 mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/basic-t.c | 10 mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/connection.c | 45 mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/ps_bugs.c | 82 mariadb-10.5-10.5.21/libmariadb/zlib/CMakeLists.txt | 42 mariadb-10.5-10.5.21/libmariadb/zlib/compress.c | 6 mariadb-10.5-10.5.21/libmariadb/zlib/crc32.c | 33 mariadb-10.5-10.5.21/libmariadb/zlib/deflate.c | 218 mariadb-10.5-10.5.21/libmariadb/zlib/deflate.h | 4 mariadb-10.5-10.5.21/libmariadb/zlib/gzlib.c | 2 mariadb-10.5-10.5.21/libmariadb/zlib/gzread.c | 8 mariadb-10.5-10.5.21/libmariadb/zlib/gzwrite.c | 2 mariadb-10.5-10.5.21/libmariadb/zlib/infback.c | 17 mariadb-10.5-10.5.21/libmariadb/zlib/inflate.c | 7 mariadb-10.5-10.5.21/libmariadb/zlib/inftrees.c | 4 mariadb-10.5-10.5.21/libmariadb/zlib/inftrees.h | 2 mariadb-10.5-10.5.21/libmariadb/zlib/treebuild.xml | 6 mariadb-10.5-10.5.21/libmariadb/zlib/trees.c | 123 mariadb-10.5-10.5.21/libmariadb/zlib/uncompr.c | 4 mariadb-10.5-10.5.21/libmariadb/zlib/zconf.h | 19 mariadb-10.5-10.5.21/libmariadb/zlib/zconf.h.cmakein | 245 mariadb-10.5-10.5.21/libmariadb/zlib/zconf.h.in | 19 mariadb-10.5-10.5.21/libmariadb/zlib/zlib.h | 20 mariadb-10.5-10.5.21/libmariadb/zlib/zlib.map | 32 mariadb-10.5-10.5.21/libmariadb/zlib/zutil.c | 16 mariadb-10.5-10.5.21/libmariadb/zlib/zutil.h | 1 mariadb-10.5-10.5.21/libmysqld/lib_sql.cc | 2 mariadb-10.5-10.5.21/libmysqld/libmysql.c | 10 mariadb-10.5-10.5.21/man/mysql_upgrade.1 | 3 mariadb-10.5-10.5.21/mysql-test/include/ctype_casefolding.inc | 18 mariadb-10.5-10.5.21/mysql-test/include/ctype_nopad_prefix_unique.inc | 85 mariadb-10.5-10.5.21/mysql-test/include/expect_crash.inc | 4 mariadb-10.5-10.5.21/mysql-test/include/explain_non_select.inc | 16 mariadb-10.5-10.5.21/mysql-test/include/kill_galera.inc | 4 mariadb-10.5-10.5.21/mysql-test/include/kill_mysqld.inc | 4 mariadb-10.5-10.5.21/mysql-test/include/not_valgrind_build.inc | 4 mariadb-10.5-10.5.21/mysql-test/include/shutdown_mysqld.inc | 4 mariadb-10.5-10.5.21/mysql-test/include/sql_mode_pad_char_to_full_length.inc | 31 mariadb-10.5-10.5.21/mysql-test/lib/My/CoreDump.pm | 33 mariadb-10.5-10.5.21/mysql-test/main/analyze_format_json_emb.result | 11 mariadb-10.5-10.5.21/mysql-test/main/analyze_format_json_emb.test | 18 mariadb-10.5-10.5.21/mysql-test/main/bootstrap.result | 45 mariadb-10.5-10.5.21/mysql-test/main/bootstrap.test | 107 mariadb-10.5-10.5.21/mysql-test/main/ctype_ldml.result | 48 mariadb-10.5-10.5.21/mysql-test/main/ctype_ldml.test | 25 mariadb-10.5-10.5.21/mysql-test/main/ctype_uca.result | 8 mariadb-10.5-10.5.21/mysql-test/main/ctype_uca_partitions.result | 40 mariadb-10.5-10.5.21/mysql-test/main/ctype_uca_partitions.test | 32 mariadb-10.5-10.5.21/mysql-test/main/ctype_ucs.result | 17 mariadb-10.5-10.5.21/mysql-test/main/ctype_ucs.test | 12 mariadb-10.5-10.5.21/mysql-test/main/ctype_upgrade.result | 53 mariadb-10.5-10.5.21/mysql-test/main/ctype_upgrade.test | 35 mariadb-10.5-10.5.21/mysql-test/main/ctype_utf8_uca.result | 322 mariadb-10.5-10.5.21/mysql-test/main/ctype_utf8_uca.test | 47 mariadb-10.5-10.5.21/mysql-test/main/ctype_utf8mb4_uca.result | 174 mariadb-10.5-10.5.21/mysql-test/main/ctype_utf8mb4_uca.test | 29 mariadb-10.5-10.5.21/mysql-test/main/delete.result | 32 mariadb-10.5-10.5.21/mysql-test/main/delete.test | 41 mariadb-10.5-10.5.21/mysql-test/main/derived.result | 23 mariadb-10.5-10.5.21/mysql-test/main/derived.test | 30 mariadb-10.5-10.5.21/mysql-test/main/derived_cond_pushdown.result | 177 mariadb-10.5-10.5.21/mysql-test/main/derived_cond_pushdown.test | 71 mariadb-10.5-10.5.21/mysql-test/main/derived_split_innodb.result | 548 mariadb-10.5-10.5.21/mysql-test/main/derived_split_innodb.test | 257 mariadb-10.5-10.5.21/mysql-test/main/derived_view.result | 482 mariadb-10.5-10.5.21/mysql-test/main/derived_view.test | 297 mariadb-10.5-10.5.21/mysql-test/main/distinct.result | 51 mariadb-10.5-10.5.21/mysql-test/main/distinct.test | 36 mariadb-10.5-10.5.21/mysql-test/main/empty_table.result | 58 mariadb-10.5-10.5.21/mysql-test/main/empty_table.test | 36 mariadb-10.5-10.5.21/mysql-test/main/explain_innodb.result | 18 mariadb-10.5-10.5.21/mysql-test/main/explain_innodb.test | 19 mariadb-10.5-10.5.21/mysql-test/main/explain_non_select.result | 23 mariadb-10.5-10.5.21/mysql-test/main/explain_non_select.test | 20 mariadb-10.5-10.5.21/mysql-test/main/func_group.result | 9 mariadb-10.5-10.5.21/mysql-test/main/func_group.test | 11 mariadb-10.5-10.5.21/mysql-test/main/func_json.result | 19 mariadb-10.5-10.5.21/mysql-test/main/func_json.test | 17 mariadb-10.5-10.5.21/mysql-test/main/func_str.result | 9 mariadb-10.5-10.5.21/mysql-test/main/func_str.test | 10 mariadb-10.5-10.5.21/mysql-test/main/grant5.result | 9 mariadb-10.5-10.5.21/mysql-test/main/grant5.test | 12 mariadb-10.5-10.5.21/mysql-test/main/group_by.result | 10 mariadb-10.5-10.5.21/mysql-test/main/group_by.test | 23 mariadb-10.5-10.5.21/mysql-test/main/group_min_max.result | 12 mariadb-10.5-10.5.21/mysql-test/main/group_min_max.test | 11 mariadb-10.5-10.5.21/mysql-test/main/insert_innodb.result | 2 mariadb-10.5-10.5.21/mysql-test/main/insert_innodb.test | 2 mariadb-10.5-10.5.21/mysql-test/main/insert_returning.result | 10 mariadb-10.5-10.5.21/mysql-test/main/insert_update.result | 41 mariadb-10.5-10.5.21/mysql-test/main/insert_update.test | 26 mariadb-10.5-10.5.21/mysql-test/main/kill-2.result | 31 mariadb-10.5-10.5.21/mysql-test/main/kill-2.test | 27 mariadb-10.5-10.5.21/mysql-test/main/locale.result | 10 mariadb-10.5-10.5.21/mysql-test/main/locale.test | 14 mariadb-10.5-10.5.21/mysql-test/main/long_unique_bugs.result | 6 mariadb-10.5-10.5.21/mysql-test/main/long_unique_bugs.test | 7 mariadb-10.5-10.5.21/mysql-test/main/multi_update.result | 120 mariadb-10.5-10.5.21/mysql-test/main/multi_update.test | 70 mariadb-10.5-10.5.21/mysql-test/main/myisam_explain_non_select_all.result | 193 mariadb-10.5-10.5.21/mysql-test/main/mysqlbinlog-innodb.result | 4 mariadb-10.5-10.5.21/mysql-test/main/mysqlbinlog.result | 36 mariadb-10.5-10.5.21/mysql-test/main/mysqlbinlog.test | 2 mariadb-10.5-10.5.21/mysql-test/main/mysqlbinlog_row_compressed.result | 2 mariadb-10.5-10.5.21/mysql-test/main/mysqlbinlog_row_minimal.result | 4 mariadb-10.5-10.5.21/mysql-test/main/mysqlbinlog_stmt_compressed.result | 2 mariadb-10.5-10.5.21/mysql-test/main/mysqld--help,win.rdiff | 28 mariadb-10.5-10.5.21/mysql-test/main/mysqld--help.result | 3 mariadb-10.5-10.5.21/mysql-test/main/name_resolution_cache_debug.result | 25 mariadb-10.5-10.5.21/mysql-test/main/name_resolution_cache_debug.test | 36 mariadb-10.5-10.5.21/mysql-test/main/old-mode.result | 36 mariadb-10.5-10.5.21/mysql-test/main/old-mode.test | 20 mariadb-10.5-10.5.21/mysql-test/main/opt_trace.result | 490 mariadb-10.5-10.5.21/mysql-test/main/opt_trace.test | 89 mariadb-10.5-10.5.21/mysql-test/main/parser.result | 28 mariadb-10.5-10.5.21/mysql-test/main/parser.test | 17 mariadb-10.5-10.5.21/mysql-test/main/partition.result | 38 mariadb-10.5-10.5.21/mysql-test/main/partition.test | 39 mariadb-10.5-10.5.21/mysql-test/main/ps.result | 4 mariadb-10.5-10.5.21/mysql-test/main/rowid_filter.result | 114 mariadb-10.5-10.5.21/mysql-test/main/select.result | 2 mariadb-10.5-10.5.21/mysql-test/main/select_jcl6.result | 2 mariadb-10.5-10.5.21/mysql-test/main/select_pkeycache.result | 2 mariadb-10.5-10.5.21/mysql-test/main/selectivity.result | 12 mariadb-10.5-10.5.21/mysql-test/main/selectivity.test | 7 mariadb-10.5-10.5.21/mysql-test/main/selectivity_innodb.result | 12 mariadb-10.5-10.5.21/mysql-test/main/selectivity_innodb_notembedded.result | 104 mariadb-10.5-10.5.21/mysql-test/main/selectivity_innodb_notembedded.test | 16 mariadb-10.5-10.5.21/mysql-test/main/selectivity_no_engine.result | 6 mariadb-10.5-10.5.21/mysql-test/main/selectivity_notembedded.result | 95 mariadb-10.5-10.5.21/mysql-test/main/selectivity_notembedded.test | 121 mariadb-10.5-10.5.21/mysql-test/main/shutdown.test | 4 mariadb-10.5-10.5.21/mysql-test/main/sql_mode_pad_char_to_full_length.result | 94 mariadb-10.5-10.5.21/mysql-test/main/sql_mode_pad_char_to_full_length.test | 19 mariadb-10.5-10.5.21/mysql-test/main/status.test | 9 mariadb-10.5-10.5.21/mysql-test/main/subselect.result | 262 mariadb-10.5-10.5.21/mysql-test/main/subselect.test | 215 mariadb-10.5-10.5.21/mysql-test/main/subselect4.result | 4 mariadb-10.5-10.5.21/mysql-test/main/subselect_no_exists_to_in.result | 262 mariadb-10.5-10.5.21/mysql-test/main/subselect_no_mat.result | 262 mariadb-10.5-10.5.21/mysql-test/main/subselect_no_opts.result | 262 mariadb-10.5-10.5.21/mysql-test/main/subselect_no_scache.result | 262 mariadb-10.5-10.5.21/mysql-test/main/subselect_no_semijoin.result | 262 mariadb-10.5-10.5.21/mysql-test/main/system_mysql_db_fix50030.result | 4 mariadb-10.5-10.5.21/mysql-test/main/system_mysql_db_fix50117.result | 4 mariadb-10.5-10.5.21/mysql-test/main/system_mysql_db_fix50568.result | 297 mariadb-10.5-10.5.21/mysql-test/main/system_mysql_db_fix50568.test | 99 mariadb-10.5-10.5.21/mysql-test/main/table_value_constr.result | 119 mariadb-10.5-10.5.21/mysql-test/main/table_value_constr.test | 74 mariadb-10.5-10.5.21/mysql-test/main/type_time.result | 26 mariadb-10.5-10.5.21/mysql-test/main/type_time.test | 19 mariadb-10.5-10.5.21/mysql-test/main/update.result | 29 mariadb-10.5-10.5.21/mysql-test/main/update.test | 23 mariadb-10.5-10.5.21/mysql-test/main/update_use_source.result | 12 mariadb-10.5-10.5.21/mysql-test/main/user_var-binlog.result | 2 mariadb-10.5-10.5.21/mysql-test/main/view.result | 18 mariadb-10.5-10.5.21/mysql-test/main/view.test | 19 mariadb-10.5-10.5.21/mysql-test/suite/binlog/include/binlog_row_annotate.inc | 12 mariadb-10.5-10.5.21/mysql-test/suite/binlog/include/ctype_ucs_binlog.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/binlog/r/binlog_base64_flag.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog/r/binlog_mysqlbinlog_raw_flush.result | 4 mariadb-10.5-10.5.21/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_innodb.result | 8 mariadb-10.5-10.5.21/mysql-test/suite/binlog/r/binlog_mysqlbinlog_row_myisam.result | 8 mariadb-10.5-10.5.21/mysql-test/suite/binlog/r/flashback.result | 4 mariadb-10.5-10.5.21/mysql-test/suite/binlog/r/innodb_rc_insert_before_delete.result | 1 mariadb-10.5-10.5.21/mysql-test/suite/binlog/t/binlog_mysqlbinlog2.test | 54 mariadb-10.5-10.5.21/mysql-test/suite/binlog/t/binlog_mysqlbinlog_raw_flush.test | 9 mariadb-10.5-10.5.21/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/binlog/t/binlog_mysqlbinlog_row_trans.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog/t/binlog_row_mysqlbinlog_options.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/binlog/t/flashback.test | 12 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted.cnf | 5 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted.result | 84 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted.test | 152 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_coords.cnf | 5 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_coords.result | 85 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_coords.test | 158 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.cnf | 8 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.result | 84 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/encrypted_master_switch_to_unencrypted_gtid.test | 154 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_binlog_errors.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_cant_read_event_incident.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_checksum.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_checksum_cache.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_corruption.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_gtid_basic.result | 24 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_gtid_basic.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_incident.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_init_slave_errors.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_loaddata_local.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_loadfile.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_packet.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_analyze_table_hang.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_deadlock_corrupt_binlog.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_domain.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_domain_slave_single_grp.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_free_deferred_event.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_gco_wait_kill.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_gtid_slave_pos_update_fail.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_ignore_error_on_rotate.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_ignored_errors.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_innodb_lock_conflict.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_missed_error_handling.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_mode.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_partial_binlog_trans.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_record_gtid_wakeup.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_retry_deadlock.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_rollback_assert.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_show_binlog_events_purge_logs.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_single_grpcmt.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_slave_bgc_kill.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_stop_on_con_kill.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_stop_slave.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_binlog_order.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_parallel_wrong_exec_master_pos.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_relayrotate.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_semi_sync.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_skip_replication.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_special_charset.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_sporadic_master.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_ssl.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_stm_relay_ign_space.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_switch_stm_row_mixed.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_sync.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_temporal_format_default_to_default.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_temporal_format_mariadb53_to_mysql56.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_temporal_format_mysql56_to_mariadb53.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/binlog_encryption/rpl_typeconv.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/encryption/r/import_4k.result | 10 mariadb-10.5-10.5.21/mysql-test/suite/encryption/t/import_4k.opt | 1 mariadb-10.5-10.5.21/mysql-test/suite/encryption/t/import_4k.test | 20 mariadb-10.5-10.5.21/mysql-test/suite/engines/funcs/r/rpl_sp.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/galera/galera_2x2nodes.cnf | 77 mariadb-10.5-10.5.21/mysql-test/suite/galera/include/kill_galera.inc | 4 mariadb-10.5-10.5.21/mysql-test/suite/galera/include/shutdown_mysqld.inc | 4 mariadb-10.5-10.5.21/mysql-test/suite/galera/r/MDEV-30804.result | 11 mariadb-10.5-10.5.21/mysql-test/suite/galera/r/MDEV-30955.result | 26 mariadb-10.5-10.5.21/mysql-test/suite/galera/r/galera_backup_start.result | 6 mariadb-10.5-10.5.21/mysql-test/suite/galera/r/galera_gra_log.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/galera/r/galera_query_cache_invalidate.result | 119 mariadb-10.5-10.5.21/mysql-test/suite/galera/r/galera_sequences.result | 61 mariadb-10.5-10.5.21/mysql-test/suite/galera/r/galera_var_retry_autocommit.result | 12 mariadb-10.5-10.5.21/mysql-test/suite/galera/r/mdev-26175.result | 24 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/MDEV-30804.cnf | 7 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/MDEV-30804.test | 21 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/MDEV-30955.test | 70 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/galera_backup_start.test | 6 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/galera_ist_restart_joiner.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/galera_query_cache_invalidate.cnf | 25 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/galera_query_cache_invalidate.test | 120 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/galera_sequences.cnf | 9 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/galera_sequences.test | 54 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/galera_var_retry_autocommit.test | 19 mariadb-10.5-10.5.21/mysql-test/suite/galera/t/mdev-26175.test | 27 mariadb-10.5-10.5.21/mysql-test/suite/galera_3nodes/galera_2x3nodes.cnf | 2 mariadb-10.5-10.5.21/mysql-test/suite/galera_3nodes_sr/t/GCF-832.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/galera_sr/r/MDEV-30838.result | 15 mariadb-10.5-10.5.21/mysql-test/suite/galera_sr/r/MDEV-30862.result | 11 mariadb-10.5-10.5.21/mysql-test/suite/galera_sr/t/MDEV-30838.test | 18 mariadb-10.5-10.5.21/mysql-test/suite/galera_sr/t/MDEV-30862.test | 24 mariadb-10.5-10.5.21/mysql-test/suite/gcol/r/gcol_purge.result | 7 mariadb-10.5-10.5.21/mysql-test/suite/gcol/r/gcol_rollback.result | 21 mariadb-10.5-10.5.21/mysql-test/suite/gcol/t/gcol_purge.test | 8 mariadb-10.5-10.5.21/mysql-test/suite/gcol/t/gcol_rollback.test | 23 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/alter_copy.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/cursor-restore-locking.result | 4 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/default_row_format_alter.result | 20 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/dml_purge.result | 5 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/full_crc32_import.result | 11 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/gap_lock_split.result | 1 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/innodb-wl5522.result | 14 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/innodb_buffer_pool_dump_pct.result | 3 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/innodb_bug84958.result | 11 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/innodb_ctype_utf8.result | 98 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/innodb_sys_var_valgrind.result | 21 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/instant_alter_crash.result | 24 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/recovery_memory.result | 20 mariadb-10.5-10.5.21/mysql-test/suite/innodb/r/sql_mode_pad_char_to_full_length.result | 51 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/alter_copy.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/alter_crash.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/cursor-restore-locking.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/default_row_format_alter.test | 17 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/dml_purge.test | 6 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/full_crc32_import.test | 10 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/gap_lock_split.test | 1 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/import_tablespace_race.test | 8 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/innodb-alter-tempfile.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/innodb-change-buffer-recovery.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/innodb-wl5522-debug.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/innodb-wl5522.test | 21 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/innodb_buffer_pool_dump_pct.test | 10 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/innodb_bug84958.test | 11 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/innodb_ctype_utf8.test | 12 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/innodb_sys_var_valgrind.test | 18 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/instant_alter_crash.test | 26 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/purge_thread_shutdown.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/recovery_memory.test | 30 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/restart.test | 25 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/sql_mode_pad_char_to_full_length.test | 18 mariadb-10.5-10.5.21/mysql-test/suite/innodb/t/temporary_table.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/innodb_fts/t/sync.test | 3 mariadb-10.5-10.5.21/mysql-test/suite/innodb_i_s/innodb_sys_indexes.result | 4 mariadb-10.5-10.5.21/mysql-test/suite/maria/aria_log_dir_path.result | 29 mariadb-10.5-10.5.21/mysql-test/suite/maria/aria_log_dir_path.test | 65 mariadb-10.5-10.5.21/mysql-test/suite/maria/maria3.result | 1 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/aria_log_dir_path.result | 41 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/aria_log_dir_path.test | 105 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/aria_log_dir_path_rel.result | 41 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/aria_log_dir_path_rel.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/full_backup_win.result | 12 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/full_backup_win.test | 24 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/include/restart_and_restore.inc | 2 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/partial_exclude.result | 7 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/partial_exclude.test | 20 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/relative_path.opt | 1 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/relative_path.result | 20 mariadb-10.5-10.5.21/mysql-test/suite/mariabackup/relative_path.test | 35 mariadb-10.5-10.5.21/mysql-test/suite/perfschema/r/digest_view.result | 50 mariadb-10.5-10.5.21/mysql-test/suite/perfschema/r/events_waits_current_MDEV-29091.result | 41 mariadb-10.5-10.5.21/mysql-test/suite/perfschema/r/start_server_low_digest_sql_length.result | 4 mariadb-10.5-10.5.21/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_2t.result | 120 mariadb-10.5-10.5.21/mysql-test/suite/perfschema/r/table_aggregate_hist_2u_3t.result | 180 mariadb-10.5-10.5.21/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_2t.result | 120 mariadb-10.5-10.5.21/mysql-test/suite/perfschema/r/table_aggregate_hist_4u_3t.result | 180 mariadb-10.5-10.5.21/mysql-test/suite/perfschema/t/events_waits_current_MDEV-29091.test | 62 mariadb-10.5-10.5.21/mysql-test/suite/period/r/overlaps.result | 98 mariadb-10.5-10.5.21/mysql-test/suite/period/t/overlaps.test | 110 mariadb-10.5-10.5.21/mysql-test/suite/plugins/r/feedback_plugin_install.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/plugins/r/feedback_plugin_load.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/plugins/r/feedback_plugin_send.result | 4 mariadb-10.5-10.5.21/mysql-test/suite/plugins/r/locales.result | 9 mariadb-10.5-10.5.21/mysql-test/suite/plugins/t/locales.test | 1 mariadb-10.5-10.5.21/mysql-test/suite/roles/role_grant_propagate.result | 13 mariadb-10.5-10.5.21/mysql-test/suite/roles/role_grant_propagate.test | 11 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_binlog_errors.inc | 438 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_cant_read_event_incident.inc | 83 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_checksum.inc | 335 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_checksum_cache.inc | 261 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_corruption.inc | 175 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_gtid_basic.inc | 572 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_incident.inc | 61 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_init_slave_errors.inc | 96 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_loaddata_local.inc | 232 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_loadfile.inc | 120 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_packet.inc | 184 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_analyze_table_hang.inc | 73 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_deadlock_corrupt_binlog.inc | 80 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_domain.inc | 87 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_domain_slave_single_grp.inc | 128 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_free_deferred_event.inc | 67 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_gco_wait_kill.inc | 366 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_gtid_slave_pos_update_fail.inc | 98 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_ignore_error_on_rotate.inc | 96 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_ignored_errors.inc | 112 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_innodb_lock_conflict.inc | 107 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_missed_error_handling.inc | 87 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_mode.inc | 87 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_partial_binlog_trans.inc | 71 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_record_gtid_wakeup.inc | 72 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_retry_deadlock.inc | 281 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_rollback_assert.inc | 62 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_show_binlog_events_purge_logs.inc | 38 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_single_grpcmt.inc | 170 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_slave_bgc_kill.inc | 454 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_stop_on_con_kill.inc | 129 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_stop_slave.inc | 114 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_wrong_binlog_order.inc | 91 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_parallel_wrong_exec_master_pos.inc | 56 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_relayrotate.inc | 18 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_semi_sync.inc | 525 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_skip_replication.inc | 402 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_special_charset.inc | 32 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_sporadic_master.inc | 32 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_ssl.inc | 116 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_stm_relay_ign_space.inc | 107 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_switch_stm_row_mixed.inc | 633 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_sync_test.inc | 159 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_temporal_format_default_to_default.inc | 82 mariadb-10.5-10.5.21/mysql-test/suite/rpl/include/rpl_typeconv.inc | 78 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_blackhole_row_annotate.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_delayed_parallel_slave_sbm.result | 12 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_hrtime.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_loaddata_local.result | 134 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_loaddatalocal.result | 134 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_mdev382.result | 6 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_old_master_29078.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_parallel_29322.result | 4 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_parallel_optimistic_error_stop.result | 81 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_parallel_seq.result | 85 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_row_mysqlbinlog.result | 8 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_semi_sync_wait_point.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_sp.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_timestamp.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/r/rpl_xa_prepare_gtid_fail.result | 51 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_binlog_errors.test | 439 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_binlog_index.test | 8 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_cant_read_event_incident.test | 84 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_checksum.test | 336 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_checksum_cache.test | 262 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_corruption.test | 176 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_delayed_parallel_slave_sbm.test | 17 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_gtid_basic.test | 573 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_gtid_stop_start.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_incident.test | 62 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_init_slave_errors.test | 97 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_lcase_tblnames_rewrite_db.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_loaddata_local.test | 232 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_loaddatalocal.test | 1 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_loadfile.test | 121 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_mdev12179.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_mdev382.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_packet.test | 185 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_analyze_table_hang.test | 74 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_deadlock_corrupt_binlog.test | 81 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_domain.test | 88 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_domain_slave_single_grp.test | 129 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_free_deferred_event.test | 68 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_gco_wait_kill.test | 367 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_gtid_slave_pos_update_fail.test | 99 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_ignore_error_on_rotate.test | 97 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_ignored_errors.test | 113 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_innodb_lock_conflict.test | 108 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_missed_error_handling.test | 88 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_mode.test | 88 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_optimistic_error_stop.test | 180 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_partial_binlog_trans.test | 72 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_record_gtid_wakeup.test | 73 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_retry_deadlock.test | 282 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_rollback_assert.test | 63 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_seq.test | 131 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_show_binlog_events_purge_logs.test | 39 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_single_grpcmt.test | 171 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_slave_bgc_kill.test | 455 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_stop_on_con_kill.test | 130 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_stop_slave.test | 115 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_wrong_binlog_order.test | 92 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_parallel_wrong_exec_master_pos.test | 57 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_relayrotate.test | 19 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_row_lcase_tblnames.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_semi_sync.test | 526 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_semi_sync_event.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_semi_sync_wait_point.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_skip_replication.test | 403 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_special_charset.test | 33 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_sporadic_master.test | 33 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_ssl.test | 117 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_stm_lcase_tblnames.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_stm_relay_ign_space.test | 108 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test | 634 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_sync.test | 159 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_temporal_format_default_to_default.test | 83 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_typeconv.test | 79 mariadb-10.5-10.5.21/mysql-test/suite/rpl/t/rpl_xa_prepare_gtid_fail.test | 106 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/r/aria_log_dir_path_basic.result | 36 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/r/sysvars_aria.result | 12 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/r/sysvars_innodb.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result | 14 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result | 14 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/t/all_vars.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/t/aria_log_dir_path_basic.test | 35 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/t/innodb_log_checkpoint_now_basic.test | 2 mariadb-10.5-10.5.21/mysql-test/suite/sys_vars/t/sysvars_aria.test | 4 mariadb-10.5-10.5.21/mysql-test/suite/versioning/r/delete_history.result | 2 mariadb-10.5-10.5.21/mysql-test/suite/versioning/r/rpl.result | 24 mariadb-10.5-10.5.21/mysql-test/suite/versioning/t/rpl.test | 34 mariadb-10.5-10.5.21/mysys/charset.c | 2 mariadb-10.5-10.5.21/mysys/mulalloc.c | 19 mariadb-10.5-10.5.21/mysys/my_addr_resolve.c | 7 mariadb-10.5-10.5.21/mysys/my_alloc.c | 12 mariadb-10.5-10.5.21/mysys/my_atomic_writes.c | 16 mariadb-10.5-10.5.21/mysys/my_conio.c | 2 mariadb-10.5-10.5.21/mysys/my_largepage.c | 2 mariadb-10.5-10.5.21/mysys/my_likely.c | 2 mariadb-10.5-10.5.21/mysys/my_thr_init.c | 2 mariadb-10.5-10.5.21/mysys_ssl/my_crypt.cc | 2 mariadb-10.5-10.5.21/plugin/auth_pam/testing/pam_mariadb_mtr.c | 1 mariadb-10.5-10.5.21/plugin/cracklib_password_check/cracklib_password_check.c | 2 mariadb-10.5-10.5.21/plugin/feedback/feedback.cc | 2 mariadb-10.5-10.5.21/plugin/handler_socket/handlersocket/database.cpp | 8 mariadb-10.5-10.5.21/plugin/handler_socket/handlersocket/database.hpp | 6 mariadb-10.5-10.5.21/plugin/handler_socket/handlersocket/hstcpsvr.hpp | 2 mariadb-10.5-10.5.21/plugin/handler_socket/handlersocket/hstcpsvr_worker.cpp | 5 mariadb-10.5-10.5.21/plugin/handler_socket/handlersocket/hstcpsvr_worker.hpp | 2 mariadb-10.5-10.5.21/plugin/handler_socket/libhsclient/allocator.hpp | 1 mariadb-10.5-10.5.21/plugin/handler_socket/libhsclient/hstcpcli.hpp | 2 mariadb-10.5-10.5.21/plugin/handler_socket/libhsclient/util.hpp | 2 mariadb-10.5-10.5.21/plugin/query_response_time/query_response_time.cc | 2 mariadb-10.5-10.5.21/plugin/type_inet/sql_type_inet.cc | 4 mariadb-10.5-10.5.21/plugin/type_inet/sql_type_inet.h | 10 mariadb-10.5-10.5.21/plugin/versioning/versioning.cc | 8 mariadb-10.5-10.5.21/scripts/mysql_system_tables_fix.sql | 6 mariadb-10.5-10.5.21/scripts/wsrep_sst_mariabackup.sh | 35 mariadb-10.5-10.5.21/sql-common/client.c | 2 mariadb-10.5-10.5.21/sql/debug_sync.cc | 2 mariadb-10.5-10.5.21/sql/derived_handler.h | 2 mariadb-10.5-10.5.21/sql/event_data_objects.cc | 8 mariadb-10.5-10.5.21/sql/event_db_repository.h | 2 mariadb-10.5-10.5.21/sql/field.cc | 22 mariadb-10.5-10.5.21/sql/field.h | 16 mariadb-10.5-10.5.21/sql/filesort.cc | 36 mariadb-10.5-10.5.21/sql/filesort_utils.h | 19 mariadb-10.5-10.5.21/sql/gcalc_slicescan.h | 2 mariadb-10.5-10.5.21/sql/group_by_handler.h | 2 mariadb-10.5-10.5.21/sql/ha_partition.h | 13 mariadb-10.5-10.5.21/sql/ha_sequence.cc | 2 mariadb-10.5-10.5.21/sql/handler.cc | 62 mariadb-10.5-10.5.21/sql/handler.h | 24 mariadb-10.5-10.5.21/sql/hash_filo.h | 2 mariadb-10.5-10.5.21/sql/hostname.cc | 3 mariadb-10.5-10.5.21/sql/item.cc | 26 mariadb-10.5-10.5.21/sql/item.h | 49 mariadb-10.5-10.5.21/sql/item_buff.cc | 2 mariadb-10.5-10.5.21/sql/item_cmpfunc.cc | 26 mariadb-10.5-10.5.21/sql/item_cmpfunc.h | 61 mariadb-10.5-10.5.21/sql/item_create.cc | 688 mariadb-10.5-10.5.21/sql/item_create.h | 32 mariadb-10.5-10.5.21/sql/item_func.cc | 2 mariadb-10.5-10.5.21/sql/item_func.h | 5 mariadb-10.5-10.5.21/sql/item_geofunc.cc | 220 mariadb-10.5-10.5.21/sql/item_jsonfunc.cc | 2 mariadb-10.5-10.5.21/sql/item_jsonfunc.h | 5 mariadb-10.5-10.5.21/sql/item_strfunc.cc | 2 mariadb-10.5-10.5.21/sql/item_subselect.cc | 18 mariadb-10.5-10.5.21/sql/item_subselect.h | 2 mariadb-10.5-10.5.21/sql/item_sum.cc | 3 mariadb-10.5-10.5.21/sql/item_sum.h | 2 mariadb-10.5-10.5.21/sql/key.cc | 3 mariadb-10.5-10.5.21/sql/log.cc | 15 mariadb-10.5-10.5.21/sql/log.h | 12 mariadb-10.5-10.5.21/sql/log_event.cc | 6 mariadb-10.5-10.5.21/sql/log_event.h | 35 mariadb-10.5-10.5.21/sql/log_event_client.cc | 4 mariadb-10.5-10.5.21/sql/log_event_server.cc | 121 mariadb-10.5-10.5.21/sql/mdl.cc | 14 mariadb-10.5-10.5.21/sql/mdl.h | 8 mariadb-10.5-10.5.21/sql/multi_range_read.h | 2 mariadb-10.5-10.5.21/sql/my_apc.h | 2 mariadb-10.5-10.5.21/sql/my_json_writer.h | 6 mariadb-10.5-10.5.21/sql/mysqld.cc | 27 mariadb-10.5-10.5.21/sql/mysqld.h | 2 mariadb-10.5-10.5.21/sql/opt_range.cc | 72 mariadb-10.5-10.5.21/sql/opt_range.h | 4 mariadb-10.5-10.5.21/sql/opt_split.cc | 226 mariadb-10.5-10.5.21/sql/opt_subselect.cc | 5 mariadb-10.5-10.5.21/sql/opt_table_elimination.cc | 4 mariadb-10.5-10.5.21/sql/parse_file.h | 6 mariadb-10.5-10.5.21/sql/partition_element.h | 2 mariadb-10.5-10.5.21/sql/partition_info.h | 2 mariadb-10.5-10.5.21/sql/protocol.h | 2 mariadb-10.5-10.5.21/sql/rowid_filter.h | 4 mariadb-10.5-10.5.21/sql/rpl_injector.cc | 4 mariadb-10.5-10.5.21/sql/rpl_injector.h | 2 mariadb-10.5-10.5.21/sql/rpl_parallel.cc | 53 mariadb-10.5-10.5.21/sql/rpl_parallel.h | 3 mariadb-10.5-10.5.21/sql/rpl_rli.cc | 5 mariadb-10.5-10.5.21/sql/select_handler.cc | 15 mariadb-10.5-10.5.21/sql/semisync_master.cc | 6 mariadb-10.5-10.5.21/sql/semisync_master.h | 2 mariadb-10.5-10.5.21/sql/semisync_master_ack_receiver.h | 2 mariadb-10.5-10.5.21/sql/semisync_slave.h | 2 mariadb-10.5-10.5.21/sql/session_tracker.h | 2 mariadb-10.5-10.5.21/sql/set_var.h | 6 mariadb-10.5-10.5.21/sql/share/errmsg-utf8.txt | 10 mariadb-10.5-10.5.21/sql/signal_handler.cc | 32 mariadb-10.5-10.5.21/sql/slave.cc | 56 mariadb-10.5-10.5.21/sql/slave.h | 3 mariadb-10.5-10.5.21/sql/sp.h | 2 mariadb-10.5-10.5.21/sql/sp_head.h | 66 mariadb-10.5-10.5.21/sql/spatial.h | 32 mariadb-10.5-10.5.21/sql/sql_acl.cc | 24 mariadb-10.5-10.5.21/sql/sql_acl.h | 12 mariadb-10.5-10.5.21/sql/sql_admin.h | 24 mariadb-10.5-10.5.21/sql/sql_alter.h | 15 mariadb-10.5-10.5.21/sql/sql_base.cc | 35 mariadb-10.5-10.5.21/sql/sql_base.h | 2 mariadb-10.5-10.5.21/sql/sql_bitmap.h | 2 mariadb-10.5-10.5.21/sql/sql_cache.h | 14 mariadb-10.5-10.5.21/sql/sql_class.cc | 5 mariadb-10.5-10.5.21/sql/sql_class.h | 35 mariadb-10.5-10.5.21/sql/sql_cmd.h | 6 mariadb-10.5-10.5.21/sql/sql_crypt.h | 4 mariadb-10.5-10.5.21/sql/sql_cursor.cc | 4 mariadb-10.5-10.5.21/sql/sql_debug.h | 2 mariadb-10.5-10.5.21/sql/sql_delete.cc | 2 mariadb-10.5-10.5.21/sql/sql_derived.cc | 21 mariadb-10.5-10.5.21/sql/sql_error.h | 10 mariadb-10.5-10.5.21/sql/sql_explain.cc | 19 mariadb-10.5-10.5.21/sql/sql_explain.h | 6 mariadb-10.5-10.5.21/sql/sql_expression_cache.cc | 2 mariadb-10.5-10.5.21/sql/sql_expression_cache.h | 4 mariadb-10.5-10.5.21/sql/sql_insert.cc | 6 mariadb-10.5-10.5.21/sql/sql_join_cache.h | 4 mariadb-10.5-10.5.21/sql/sql_lex.cc | 77 mariadb-10.5-10.5.21/sql/sql_lex.h | 80 mariadb-10.5-10.5.21/sql/sql_lifo_buffer.h | 2 mariadb-10.5-10.5.21/sql/sql_locale.cc | 9 mariadb-10.5-10.5.21/sql/sql_parse.cc | 48 mariadb-10.5-10.5.21/sql/sql_partition_admin.h | 21 mariadb-10.5-10.5.21/sql/sql_prepare.cc | 4 mariadb-10.5-10.5.21/sql/sql_prepare.h | 2 mariadb-10.5-10.5.21/sql/sql_repl.cc | 2 mariadb-10.5-10.5.21/sql/sql_schema.cc | 61 mariadb-10.5-10.5.21/sql/sql_schema.h | 13 mariadb-10.5-10.5.21/sql/sql_select.cc | 729 mariadb-10.5-10.5.21/sql/sql_select.h | 36 mariadb-10.5-10.5.21/sql/sql_sequence.cc | 17 mariadb-10.5-10.5.21/sql/sql_show.cc | 37 mariadb-10.5-10.5.21/sql/sql_signal.h | 9 mariadb-10.5-10.5.21/sql/sql_sort.h | 1 mariadb-10.5-10.5.21/sql/sql_statistics.cc | 48 mariadb-10.5-10.5.21/sql/sql_string.cc | 2 mariadb-10.5-10.5.21/sql/sql_string.h | 84 mariadb-10.5-10.5.21/sql/sql_table.cc | 13 mariadb-10.5-10.5.21/sql/sql_test.cc | 4 mariadb-10.5-10.5.21/sql/sql_truncate.h | 6 mariadb-10.5-10.5.21/sql/sql_tvc.cc | 1 mariadb-10.5-10.5.21/sql/sql_type.cc | 6 mariadb-10.5-10.5.21/sql/sql_type.h | 151 mariadb-10.5-10.5.21/sql/sql_union.cc | 4 mariadb-10.5-10.5.21/sql/sql_update.cc | 10 mariadb-10.5-10.5.21/sql/sql_view.cc | 6 mariadb-10.5-10.5.21/sql/sql_window.cc | 4 mariadb-10.5-10.5.21/sql/sql_window.h | 2 mariadb-10.5-10.5.21/sql/sql_yacc.yy | 119 mariadb-10.5-10.5.21/sql/structs.h | 28 mariadb-10.5-10.5.21/sql/sys_vars.cc | 7 mariadb-10.5-10.5.21/sql/sys_vars_shared.h | 2 mariadb-10.5-10.5.21/sql/table.cc | 79 mariadb-10.5-10.5.21/sql/table.h | 29 mariadb-10.5-10.5.21/sql/temporary_tables.cc | 19 mariadb-10.5-10.5.21/sql/threadpool.h | 5 mariadb-10.5-10.5.21/sql/threadpool_generic.cc | 3 mariadb-10.5-10.5.21/sql/tztime.cc | 4 mariadb-10.5-10.5.21/sql/tztime.h | 4 mariadb-10.5-10.5.21/sql/vers_string.h | 2 mariadb-10.5-10.5.21/sql/win_tzname_data.h | 3 mariadb-10.5-10.5.21/sql/wsrep_client_service.cc | 38 mariadb-10.5-10.5.21/sql/wsrep_condition_variable.h | 3 mariadb-10.5-10.5.21/sql/wsrep_high_priority_service.cc | 25 mariadb-10.5-10.5.21/sql/wsrep_schema.cc | 12 mariadb-10.5-10.5.21/sql/wsrep_server_state.cc | 3 mariadb-10.5-10.5.21/sql/wsrep_thd.h | 9 mariadb-10.5-10.5.21/sql/wsrep_trans_observer.h | 15 mariadb-10.5-10.5.21/sql/yy_mariadb.cc |64559 ++++------ mariadb-10.5-10.5.21/sql/yy_mariadb.hh | 1541 mariadb-10.5-10.5.21/sql/yy_oracle.cc |62484 ++++----- mariadb-10.5-10.5.21/sql/yy_oracle.hh | 1541 mariadb-10.5-10.5.21/storage/archive/ha_archive.h | 4 mariadb-10.5-10.5.21/storage/blackhole/ha_blackhole.h | 4 mariadb-10.5-10.5.21/storage/connect/blkfil.h | 12 mariadb-10.5-10.5.21/storage/connect/block.h | 2 mariadb-10.5-10.5.21/storage/connect/bson.h | 4 mariadb-10.5-10.5.21/storage/connect/bsonudf.h | 2 mariadb-10.5-10.5.21/storage/connect/catalog.h | 6 mariadb-10.5-10.5.21/storage/connect/colblk.h | 6 mariadb-10.5-10.5.21/storage/connect/csort.h | 2 mariadb-10.5-10.5.21/storage/connect/filamdbf.h | 2 mariadb-10.5-10.5.21/storage/connect/filter.h | 2 mariadb-10.5-10.5.21/storage/connect/ha_connect.cc | 5 mariadb-10.5-10.5.21/storage/connect/jsonudf.h | 2 mariadb-10.5-10.5.21/storage/connect/mysql-test/connect/r/mysql.result | 11 mariadb-10.5-10.5.21/storage/connect/mysql-test/connect/t/mysql.test | 15 mariadb-10.5-10.5.21/storage/connect/myutil.cpp | 2 mariadb-10.5-10.5.21/storage/connect/reldef.cpp | 26 mariadb-10.5-10.5.21/storage/connect/tabbson.cpp | 47 mariadb-10.5-10.5.21/storage/connect/tabbson.h | 2 mariadb-10.5-10.5.21/storage/connect/tabdos.cpp | 61 mariadb-10.5-10.5.21/storage/connect/tabdos.h | 2 mariadb-10.5-10.5.21/storage/connect/tabext.cpp | 59 mariadb-10.5-10.5.21/storage/connect/tabfix.h | 2 mariadb-10.5-10.5.21/storage/connect/tabfmt.cpp | 38 mariadb-10.5-10.5.21/storage/connect/tabfmt.h | 2 mariadb-10.5-10.5.21/storage/connect/tabjdbc.cpp | 45 mariadb-10.5-10.5.21/storage/connect/tabjmg.h | 2 mariadb-10.5-10.5.21/storage/connect/tabjson.cpp | 54 mariadb-10.5-10.5.21/storage/connect/tabjson.h | 2 mariadb-10.5-10.5.21/storage/connect/tabmul.h | 2 mariadb-10.5-10.5.21/storage/connect/taboccur.h | 4 mariadb-10.5-10.5.21/storage/connect/tabpivot.h | 2 mariadb-10.5-10.5.21/storage/connect/tabsys.h | 4 mariadb-10.5-10.5.21/storage/connect/tabutil.h | 2 mariadb-10.5-10.5.21/storage/connect/tabvct.h | 2 mariadb-10.5-10.5.21/storage/connect/tabvir.h | 4 mariadb-10.5-10.5.21/storage/connect/tabxcl.h | 2 mariadb-10.5-10.5.21/storage/connect/tabzip.h | 4 mariadb-10.5-10.5.21/storage/connect/value.cpp | 8 mariadb-10.5-10.5.21/storage/connect/value.h | 2 mariadb-10.5-10.5.21/storage/connect/xtable.h | 2 mariadb-10.5-10.5.21/storage/example/ha_example.h | 4 mariadb-10.5-10.5.21/storage/federated/ha_federated.cc | 2 mariadb-10.5-10.5.21/storage/federated/ha_federated.h | 2 mariadb-10.5-10.5.21/storage/federatedx/federatedx_io_null.cc | 4 mariadb-10.5-10.5.21/storage/federatedx/federatedx_pushdown.cc | 4 mariadb-10.5-10.5.21/storage/federatedx/ha_federatedx.cc | 2 mariadb-10.5-10.5.21/storage/federatedx/ha_federatedx.h | 2 mariadb-10.5-10.5.21/storage/heap/ha_heap.h | 2 mariadb-10.5-10.5.21/storage/innobase/CMakeLists.txt | 6 mariadb-10.5-10.5.21/storage/innobase/btr/btr0btr.cc | 2 mariadb-10.5-10.5.21/storage/innobase/btr/btr0cur.cc | 103 mariadb-10.5-10.5.21/storage/innobase/buf/buf0dblwr.cc | 1 mariadb-10.5-10.5.21/storage/innobase/buf/buf0flu.cc | 11 mariadb-10.5-10.5.21/storage/innobase/buf/buf0lru.cc | 18 mariadb-10.5-10.5.21/storage/innobase/dict/dict0dict.cc | 4 mariadb-10.5-10.5.21/storage/innobase/dict/dict0load.cc | 3 mariadb-10.5-10.5.21/storage/innobase/dict/dict0mem.cc | 2 mariadb-10.5-10.5.21/storage/innobase/fil/fil0crypt.cc | 4 mariadb-10.5-10.5.21/storage/innobase/fil/fil0fil.cc | 51 mariadb-10.5-10.5.21/storage/innobase/fsp/fsp0file.cc | 2 mariadb-10.5-10.5.21/storage/innobase/fsp/fsp0sysspace.cc | 2 mariadb-10.5-10.5.21/storage/innobase/fts/fts0fts.cc | 33 mariadb-10.5-10.5.21/storage/innobase/handler/ha_innodb.cc | 65 mariadb-10.5-10.5.21/storage/innobase/handler/handler0alter.cc | 6 mariadb-10.5-10.5.21/storage/innobase/handler/i_s.cc | 8 mariadb-10.5-10.5.21/storage/innobase/ibuf/ibuf0ibuf.cc | 34 mariadb-10.5-10.5.21/storage/innobase/include/buf0buf.h | 14 mariadb-10.5-10.5.21/storage/innobase/include/buf0dblwr.h | 5 mariadb-10.5-10.5.21/storage/innobase/include/dict0types.h | 2 mariadb-10.5-10.5.21/storage/innobase/include/fil0fil.h | 55 mariadb-10.5-10.5.21/storage/innobase/include/fts0fts.h | 8 mariadb-10.5-10.5.21/storage/innobase/include/ib0mutex.h | 2 mariadb-10.5-10.5.21/storage/innobase/include/log0log.inl | 1 mariadb-10.5-10.5.21/storage/innobase/include/os0file.h | 21 mariadb-10.5-10.5.21/storage/innobase/include/os0thread.h | 2 mariadb-10.5-10.5.21/storage/innobase/include/rem0rec.h | 2 mariadb-10.5-10.5.21/storage/innobase/include/row0ins.h | 1 mariadb-10.5-10.5.21/storage/innobase/include/row0mysql.h | 2 mariadb-10.5-10.5.21/storage/innobase/include/srv0srv.h | 3 mariadb-10.5-10.5.21/storage/innobase/include/sync0types.h | 4 mariadb-10.5-10.5.21/storage/innobase/include/trx0purge.h | 2 mariadb-10.5-10.5.21/storage/innobase/include/trx0rseg.h | 18 mariadb-10.5-10.5.21/storage/innobase/include/trx0sys.h | 2 mariadb-10.5-10.5.21/storage/innobase/include/trx0undo.h | 6 mariadb-10.5-10.5.21/storage/innobase/include/ut0mutex.h | 4 mariadb-10.5-10.5.21/storage/innobase/include/ut0new.h | 2 mariadb-10.5-10.5.21/storage/innobase/include/ut0ut.h | 2 mariadb-10.5-10.5.21/storage/innobase/log/log0recv.cc | 48 mariadb-10.5-10.5.21/storage/innobase/os/os0file.cc | 37 mariadb-10.5-10.5.21/storage/innobase/os/os0thread.cc | 4 mariadb-10.5-10.5.21/storage/innobase/page/page0zip.cc | 8 mariadb-10.5-10.5.21/storage/innobase/que/que0que.cc | 13 mariadb-10.5-10.5.21/storage/innobase/rem/rem0cmp.cc | 3 mariadb-10.5-10.5.21/storage/innobase/rem/rem0rec.cc | 210 mariadb-10.5-10.5.21/storage/innobase/row/row0import.cc | 7 mariadb-10.5-10.5.21/storage/innobase/row/row0merge.cc | 5 mariadb-10.5-10.5.21/storage/innobase/row/row0mysql.cc | 4 mariadb-10.5-10.5.21/storage/innobase/row/row0vers.cc | 28 mariadb-10.5-10.5.21/storage/innobase/srv/srv0srv.cc | 48 mariadb-10.5-10.5.21/storage/innobase/srv/srv0start.cc | 31 mariadb-10.5-10.5.21/storage/innobase/trx/trx0purge.cc | 228 mariadb-10.5-10.5.21/storage/innobase/trx/trx0roll.cc | 4 mariadb-10.5-10.5.21/storage/innobase/trx/trx0rseg.cc | 48 mariadb-10.5-10.5.21/storage/innobase/trx/trx0sys.cc | 24 mariadb-10.5-10.5.21/storage/innobase/trx/trx0trx.cc | 96 mariadb-10.5-10.5.21/storage/innobase/trx/trx0undo.cc | 60 mariadb-10.5-10.5.21/storage/maria/ha_maria.cc | 20 mariadb-10.5-10.5.21/storage/maria/ha_maria.h | 2 mariadb-10.5-10.5.21/storage/maria/ha_s3.cc | 2 mariadb-10.5-10.5.21/storage/maria/ma_blockrec.c | 25 mariadb-10.5-10.5.21/storage/maria/ma_open.c | 2 mariadb-10.5-10.5.21/storage/maria/s3_func.c | 6 mariadb-10.5-10.5.21/storage/mroonga/lib/mrn_count_skip_checker.cpp | 3 mariadb-10.5-10.5.21/storage/mroonga/lib/mrn_database_repairer.cpp | 3 mariadb-10.5-10.5.21/storage/mroonga/lib/mrn_field_normalizer.cpp | 3 mariadb-10.5-10.5.21/storage/mroonga/lib/mrn_multiple_column_key_codec.cpp | 3 mariadb-10.5-10.5.21/storage/mroonga/lib/mrn_query_parser.cpp | 3 mariadb-10.5-10.5.21/storage/mroonga/lib/mrn_time_converter.cpp | 6 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/array.hpp | 2 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/cursor.hpp | 4 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/dat.hpp | 10 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/id-cursor.cpp | 2 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/key.hpp | 2 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/predictive-cursor.cpp | 2 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/prefix-cursor.cpp | 2 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/string.hpp | 4 mariadb-10.5-10.5.21/storage/mroonga/vendor/groonga/lib/dat/trie.cpp | 2 mariadb-10.5-10.5.21/storage/myisam/ha_myisam.cc | 14 mariadb-10.5-10.5.21/storage/myisam/ha_myisam.h | 2 mariadb-10.5-10.5.21/storage/perfschema/CMakeLists.txt | 2 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_account.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_account.h | 5 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_host.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_host.h | 5 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_thread.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_thread.h | 5 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_thread_connect_attr.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_thread_connect_attr.h | 5 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_user.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/cursor_by_user.h | 5 mariadb-10.5-10.5.21/storage/perfschema/ha_perfschema.cc | 5 mariadb-10.5-10.5.21/storage/perfschema/ha_perfschema.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs.cc | 5 mariadb-10.5-10.5.21/storage/perfschema/pfs.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_account.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_account.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_atomic.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_autosize.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_buffer_container.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_buffer_container.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_builtin_memory.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_builtin_memory.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_column_types.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_column_values.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_column_values.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_con_slice.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_con_slice.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_defaults.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_defaults.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_digest.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_digest.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_engine_table.cc | 8 mariadb-10.5-10.5.21/storage/perfschema/pfs_engine_table.h | 35 mariadb-10.5-10.5.21/storage/perfschema/pfs_events.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_events_stages.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_events_stages.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_events_statements.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_events_statements.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_events_transactions.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_events_transactions.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_events_waits.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_events_waits.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_global.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_global.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_host.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_host.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_instr.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_instr.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_instr_class.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_instr_class.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_lock.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_memory.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_memory.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_prepared_stmt.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_prepared_stmt.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_program.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_program.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_server.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_server.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_setup_actor.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_setup_actor.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_setup_object.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_setup_object.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_stat.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_status.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_status.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_timer.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_timer.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_user.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_user.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_variable.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_variable.h | 2 mariadb-10.5-10.5.21/storage/perfschema/pfs_visitor.cc | 92 mariadb-10.5-10.5.21/storage/perfschema/pfs_visitor.h | 14 mariadb-10.5-10.5.21/storage/perfschema/table_accounts.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_accounts.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_all_instr.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_all_instr.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_by_account_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_by_account_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_by_host_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_by_host_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_by_thread_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_by_thread_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_by_user_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_by_user_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_global_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esgs_global_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_account_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_account_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_digest.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_digest.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_host_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_host_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_program.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_program.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_thread_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_thread_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_user_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esms_by_user_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_esms_global_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_esms_global_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_ets_by_account_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_by_account_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_by_host_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_by_host_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_by_thread_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_by_thread_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_by_user_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_by_user_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_global_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ets_global_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_events_stages.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_events_stages.h | 14 mariadb-10.5-10.5.21/storage/perfschema/table_events_statements.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_events_statements.h | 14 mariadb-10.5-10.5.21/storage/perfschema/table_events_transactions.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_events_transactions.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_events_waits.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_events_waits.h | 14 mariadb-10.5-10.5.21/storage/perfschema/table_events_waits_summary.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_events_waits_summary.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_ews_by_account_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ews_by_account_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_ews_by_host_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ews_by_host_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_ews_by_thread_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ews_by_thread_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_ews_by_user_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ews_by_user_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_ews_global_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_ews_global_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_file_instances.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_file_instances.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_file_summary_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_file_summary_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_file_summary_by_instance.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_file_summary_by_instance.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_global_status.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_global_status.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_global_variables.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_global_variables.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_helper.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_helper.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_host_cache.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_host_cache.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_hosts.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_hosts.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_md_locks.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_md_locks.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_by_account_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_by_account_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_by_host_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_by_host_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_by_thread_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_by_thread_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_by_user_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_by_user_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_global_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_mems_global_by_event_name.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_os_global_by_type.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_os_global_by_type.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_performance_timers.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_performance_timers.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_prepared_stmt_instances.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_prepared_stmt_instances.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_processlist.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_processlist.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_applier_configuration.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_applier_configuration.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_applier_status.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_applier_status.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_applier_status_by_coordinator.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_applier_status_by_coordinator.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_applier_status_by_worker.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_applier_status_by_worker.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_connection_configuration.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_connection_configuration.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_connection_status.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_connection_status.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_group_member_stats.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_group_member_stats.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_group_members.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_replication_group_members.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_session_account_connect_attrs.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_session_account_connect_attrs.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_session_connect.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_session_connect.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_session_connect_attrs.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_session_connect_attrs.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_session_status.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_session_status.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_session_variables.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_session_variables.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_setup_actors.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_setup_actors.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_setup_consumers.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_setup_consumers.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_setup_instruments.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_setup_instruments.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_setup_objects.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_setup_objects.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_setup_timers.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_setup_timers.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_socket_instances.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_socket_instances.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_socket_summary_by_event_name.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_socket_summary_by_event_name.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_socket_summary_by_instance.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_socket_summary_by_instance.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_status_by_account.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_status_by_account.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_status_by_host.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_status_by_host.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_status_by_thread.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_status_by_thread.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_status_by_user.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_status_by_user.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_sync_instances.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_sync_instances.h | 11 mariadb-10.5-10.5.21/storage/perfschema/table_table_handles.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_table_handles.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_threads.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_threads.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_tiws_by_index_usage.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_tiws_by_index_usage.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_tiws_by_table.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_tiws_by_table.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_tlws_by_table.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_tlws_by_table.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_users.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_users.h | 5 mariadb-10.5-10.5.21/storage/perfschema/table_uvar_by_thread.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_uvar_by_thread.h | 2 mariadb-10.5-10.5.21/storage/perfschema/table_variables_by_thread.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/table_variables_by_thread.h | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/CMakeLists.txt | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/conf.txt | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_account-oom-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_connect_attr-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_host-oom-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_instr-oom-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_instr-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_instr_class-oom-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_instr_class-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_misc-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_noop-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_server_stubs.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_timer-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/pfs_user-oom-t.cc | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/stub_global_status_var.h | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/stub_pfs_defaults.h | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/stub_pfs_global.h | 2 mariadb-10.5-10.5.21/storage/perfschema/unittest/stub_print_error.h | 2 mariadb-10.5-10.5.21/storage/rocksdb/CMakeLists.txt | 5 mariadb-10.5-10.5.21/storage/rocksdb/build_rocksdb.cmake | 10 mariadb-10.5-10.5.21/storage/rocksdb/ha_rocksdb.cc | 2 mariadb-10.5-10.5.21/storage/rocksdb/ha_rocksdb.h | 2 mariadb-10.5-10.5.21/storage/rocksdb/mysql-test/rocksdb/include/restart_mysqld_with_option.inc | 4 mariadb-10.5-10.5.21/storage/rocksdb/mysql-test/rocksdb/t/allow_to_start_after_corruption.test | 1 mariadb-10.5-10.5.21/storage/rocksdb/mysql-test/rocksdb/t/persistent_cache.test | 4 mariadb-10.5-10.5.21/storage/rocksdb/mysql-test/rocksdb/t/validate_datadic.test | 4 mariadb-10.5-10.5.21/storage/rocksdb/mysql-test/rocksdb_sys_vars/t/rocksdb_rate_limiter_bytes_per_sec_basic.test | 4 mariadb-10.5-10.5.21/storage/rocksdb/rdb_compact_filter.h | 4 mariadb-10.5-10.5.21/storage/rocksdb/rdb_datadic.h | 4 mariadb-10.5-10.5.21/storage/rocksdb/rdb_mutex_wrapper.h | 4 mariadb-10.5-10.5.21/storage/rocksdb/rdb_threads.h | 2 mariadb-10.5-10.5.21/storage/rocksdb/ut0counter.h | 2 mariadb-10.5-10.5.21/storage/sequence/sequence.cc | 2 mariadb-10.5-10.5.21/storage/spider/hs_client/hstcpcli.hpp | 2 mariadb-10.5-10.5.21/storage/spider/hs_client/util.hpp | 2 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/include/restart_spider.inc | 8 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/r/mdev_29352.result | 1 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/r/mdev_29644.result | 41 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/r/mdev_29904.result | 4 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/r/self_reference_multi.result | 21 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/t/mdev_29352.test | 2 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/t/mdev_29644.cnf | 3 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/t/mdev_29644.test | 56 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/t/mdev_29904.test | 6 mariadb-10.5-10.5.21/storage/spider/mysql-test/spider/bugfix/t/self_reference_multi.test | 29 mariadb-10.5-10.5.21/storage/spider/spd_db_include.h | 20 mariadb-10.5-10.5.21/storage/spider/spd_db_mysql.cc | 124 mariadb-10.5-10.5.21/storage/spider/spd_db_mysql.h | 4 mariadb-10.5-10.5.21/storage/spider/spd_table.cc | 3 mariadb-10.5-10.5.21/storage/tokudb/PerconaFT/portability/toku_debug_sync.h | 9 mariadb-10.5-10.5.21/strings/conf_to_src.c | 4 mariadb-10.5-10.5.21/strings/ctype-bin.c | 6 mariadb-10.5-10.5.21/strings/ctype-simple.c | 3 mariadb-10.5-10.5.21/strings/ctype-tis620.c | 3 mariadb-10.5-10.5.21/strings/ctype-uca.c | 37 mariadb-10.5-10.5.21/strings/ctype-uca.inl | 27 mariadb-10.5-10.5.21/strings/ctype-ucs2.c | 39 mariadb-10.5-10.5.21/strings/ctype-unidata.h | 3 mariadb-10.5-10.5.21/strings/ctype-utf8.c | 18 mariadb-10.5-10.5.21/strings/ctype.c | 6 mariadb-10.5-10.5.21/strings/strcoll.inl | 3 mariadb-10.5-10.5.21/strings/strings_def.h | 6 mariadb-10.5-10.5.21/strings/uctypedump.c | 4 mariadb-10.5-10.5.21/strings/xml.c | 16 mariadb-10.5-10.5.21/tpool/aio_linux.cc | 1 mariadb-10.5-10.5.21/unittest/strings/strings-t.c | 408 mariadb-10.5-10.5.21/win/packaging/heidisql.cmake | 2 mariadb-10.5-10.5.21/win/packaging/heidisql.wxi.in | 31 mariadb-10.5-10.5.21/wsrep-lib/.github/workflows/build.yml | 52 mariadb-10.5-10.5.21/wsrep-lib/CMakeLists.txt | 6 mariadb-10.5-10.5.21/wsrep-lib/dbsim/db_client_service.cpp | 2 mariadb-10.5-10.5.21/wsrep-lib/dbsim/db_storage_engine.cpp | 3 mariadb-10.5-10.5.21/wsrep-lib/dbsim/db_threads.cpp | 2 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/client_state.hpp | 219 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/condition_variable.hpp | 2 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/mutex.hpp | 2 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/provider.hpp | 1 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/provider_options.hpp | 8 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/server_state.hpp | 10 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/sr_key_set.hpp | 21 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/streaming_context.hpp | 102 mariadb-10.5-10.5.21/wsrep-lib/include/wsrep/transaction.hpp | 3 mariadb-10.5-10.5.21/wsrep-lib/src/CMakeLists.txt | 15 mariadb-10.5-10.5.21/wsrep-lib/src/client_state.cpp | 233 mariadb-10.5-10.5.21/wsrep-lib/src/config_service_v1.cpp | 2 mariadb-10.5-10.5.21/wsrep-lib/src/provider.cpp | 1 mariadb-10.5-10.5.21/wsrep-lib/src/reporter.cpp | 7 mariadb-10.5-10.5.21/wsrep-lib/src/server_state.cpp | 32 mariadb-10.5-10.5.21/wsrep-lib/src/sr_key_set.cpp | 43 mariadb-10.5-10.5.21/wsrep-lib/src/streaming_context.cpp | 95 mariadb-10.5-10.5.21/wsrep-lib/src/transaction.cpp | 104 mariadb-10.5-10.5.21/wsrep-lib/src/wsrep_provider_v26.hpp | 2 mariadb-10.5-10.5.21/wsrep-lib/test/client_state_fixture.hpp | 20 mariadb-10.5-10.5.21/wsrep-lib/test/mock_client_state.cpp | 12 mariadb-10.5-10.5.21/wsrep-lib/test/mock_client_state.hpp | 24 mariadb-10.5-10.5.21/wsrep-lib/test/mock_high_priority_service.hpp | 2 mariadb-10.5-10.5.21/wsrep-lib/test/mock_server_state.hpp | 42 mariadb-10.5-10.5.21/wsrep-lib/test/mock_storage_service.cpp | 2 mariadb-10.5-10.5.21/wsrep-lib/test/mock_storage_service.hpp | 2 mariadb-10.5-10.5.21/wsrep-lib/test/server_context_test.cpp | 51 mariadb-10.5-10.5.21/wsrep-lib/test/test_utils.cpp | 5 mariadb-10.5-10.5.21/wsrep-lib/test/test_utils.hpp | 3 mariadb-10.5-10.5.21/wsrep-lib/test/transaction_test.cpp | 24 mariadb-10.5-10.5.21/wsrep-lib/wsrep-API/v26/wsrep_loader.c | 9 mariadb-10.5-10.5.21/zlib/ChangeLog | 24 mariadb-10.5-10.5.21/zlib/LICENSE | 22 mariadb-10.5-10.5.21/zlib/README | 4 mariadb-10.5-10.5.21/zlib/compress.c | 6 mariadb-10.5-10.5.21/zlib/crc32.c | 33 mariadb-10.5-10.5.21/zlib/deflate.c | 218 mariadb-10.5-10.5.21/zlib/deflate.h | 4 mariadb-10.5-10.5.21/zlib/gzlib.c | 2 mariadb-10.5-10.5.21/zlib/gzread.c | 8 mariadb-10.5-10.5.21/zlib/gzwrite.c | 2 mariadb-10.5-10.5.21/zlib/infback.c | 17 mariadb-10.5-10.5.21/zlib/inflate.c | 7 mariadb-10.5-10.5.21/zlib/inftrees.c | 4 mariadb-10.5-10.5.21/zlib/inftrees.h | 2 mariadb-10.5-10.5.21/zlib/make_vms.com | 4 mariadb-10.5-10.5.21/zlib/qnx/package.qpg | 10 mariadb-10.5-10.5.21/zlib/treebuild.xml | 4 mariadb-10.5-10.5.21/zlib/trees.c | 123 mariadb-10.5-10.5.21/zlib/uncompr.c | 4 mariadb-10.5-10.5.21/zlib/win32/README-WIN32.txt | 4 mariadb-10.5-10.5.21/zlib/win32/zlib1.rc | 2 mariadb-10.5-10.5.21/zlib/zconf.h.cmakein | 19 mariadb-10.5-10.5.21/zlib/zconf.h.in | 19 mariadb-10.5-10.5.21/zlib/zlib.3 | 4 mariadb-10.5-10.5.21/zlib/zlib.h | 18 mariadb-10.5-10.5.21/zlib/zlib2ansi | 4 mariadb-10.5-10.5.21/zlib/zutil.c | 16 mariadb-10.5-10.5.21/zlib/zutil.h | 1 1226 files changed, 87891 insertions(+), 84233 deletions(-) diff -Nru mariadb-10.5-10.5.19/.gitlab-ci.yml mariadb-10.5-10.5.21/.gitlab-ci.yml --- mariadb-10.5-10.5.19/.gitlab-ci.yml 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.5-10.5.21/.gitlab-ci.yml 2023-06-05 16:27:56.000000000 +0000 @@ -0,0 +1,494 @@ +--- +# This Gitlab-CI pipeline offers basic validation that a commit did not +# introduce easily detectable regressions. Builds run primairly on a new Fedora, +# which has all the latest upstream build dependencies and thus is the primary +# testing target, as eventually everything in Fedora becomes the next CentOS and +# Red Hat releases. +# +# In addition test building on CentOS 7 and 8 to ensure that the code base +# remains reasonably backwards compatible. +# +# This is now intentionally simple, to keep it fast and accurate with minimal +# false positive failures. If one wants to extend it, see debian/salsa-ci.yml +# for inspiration on more integration tests to run. +# +# Also make sure the pipeline stays within the bounds of what CI workers on +# Gitlab-CI are capable of executing, thus ensuring that any potential +# contributor can at any point in time fork to their own Gitlab account and +# start working towards meaningful contributions! +# +# NOTE TO MERGERS: Most of the contents in the Gitlab-CI configuration has been +# tailored for a specific release or MariaDB. As a general rule, do not merge +# changes in this file across MariaDB branches to avoid breaking the CI. Updates +# the Gitlab-CI pipeline are most of the time better done manually per major +# release branch. + +stages: + - build + - test + - Salsa-CI + +default: + # Base image for builds and tests unless otherwise defined + image: fedora:latest + # Extend build jobs to have longer timeout as the default GitLab + # timeout (1h) is often not enough + timeout: 3h + +# Define common CMAKE_FLAGS for all builds. Skim down build by omitting all +# submodules (a commit in this repo does not affect their builds anyway) and +# many components that are otherwise slow to build. +variables: + CMAKE_FLAGS: "-DPLUGIN_COLUMNSTORE=NO -DPLUGIN_ROCKSDB=NO -DPLUGIN_S3=NO -DPLUGIN_MROONGA=NO -DPLUGIN_CONNECT=NO -DPLUGIN_MROONGA=NO -DPLUGIN_TOKUDB=NO -DPLUGIN_PERFSCHEMA=NO -DWITH_WSREP=OFF" + # Major version dictates which branches share the same ccache. E.g. 10.6-abc + # and 10.6-xyz will have the same cache. + MARIADB_MAJOR_VERSION: "10.6" + # NOTE! Currently ccache is only used on the Centos8 build. As each job has + # sufficiently different environments they are unable to benefit from each + # other's ccaches. As each build generates about 1 GB of ccache, having + # multiple caches would quickly consume all free storage on Gitlab-CI and + # grind all builds to a halt. Also the network overhead of download/upload + # decreases the benefit of ccache in Gitlab-CI, and current cache:when and + # cache:policy are not flexible enough to have a system where the cache is + # uploaded only once a week and not on every build. Having ccache on at least + # one build still helps ensure that ccache compatibility is at least tested + # and if the Centos 8 build is always significantly faster than all other + # builds (e.g. on self-hosted Gitlab instances) then users would at least be + # able to discover it. + # + # Most steps don't need the source code, only artifacts + GIT_STRATEGY: none + # Hack to satisfy directory name length requirement by CPackRPM in CMake 3.x + # https://cmake.org/cmake/help/v3.7/module/CPackRPM.html#variable:CPACK_RPM_BUILD_SOURCE_DIRS_PREFIX + GIT_CLONE_PATH: $CI_BUILDS_DIR/CPACK_BUILD_SOURCE_DIRS_LONG_NAME_REQUIREMENT + +# Define once, use many times +.rpm_listfiles: &rpm_listfiles + - | + echo "Generating rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log ..." + for package in *.rpm + do + echo "$package" + rpm -qlpv "$package" | awk '{print $1 " " $3 "/" $4 " ." $9 " " $10 " " $11}' | sort -k 3 + echo "------------------------------------------------" + done >> "../rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log" + # CPackRPM lists contents in build log, so no need to show the output of this, + # just store it as a build artifact that can be downloaded and diffed against + # other builds to detect which files where added/removed/moved + +fedora: + stage: build + variables: + GIT_STRATEGY: fetch + GIT_SUBMODULE_STRATEGY: normal + script: + - yum install -y yum-utils rpm-build openssl-devel graphviz clang gnutls-devel + # Accelerate builds with unsafe disk access, as we can afford to loose the entire build anyway + - yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm + # This repository does not have any .spec files, so install dependencies based on Fedora spec file + - yum-builddep -y mariadb-server + - mkdir builddir; cd builddir + - cmake -DRPM=$CI_JOB_NAME $CMAKE_FLAGS -DWITH_SSL=bundled .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - cmake --graphviz=../dependencies.dot .. && dot -Tpng -o ../dependencies.png ../dependencies.dot + - eatmydata make package -j 2 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + # @TODO: Don't use -j without the limit of 2 on Gitlab.com as builds just + # get stuck when running multi-proc and out of memory, see https://jira.mariadb.org/browse/MDEV-25968 + - make test + # - make test-force # mysql-test-runner takes too long, run MTR in a separate job instead + - *rpm_listfiles + - mkdir ../rpm; mv *.rpm ../rpm + artifacts: + when: always # Must be able to see logs + paths: + - build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpm + - builddir/_CPack_Packages/Linux/RPM/SPECS/ + - dependencies.dot + - dependencies.png + +fedora-ninja: + stage: build + variables: + GIT_STRATEGY: fetch + GIT_SUBMODULE_STRATEGY: normal + script: + - yum install -y yum-utils rpm-build openssl-devel graphviz ninja-build gnutls-devel + # Accelerate builds with unsafe disk access, as we can afford to loose the entire build anyway + - yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm + # This repository does not have any .spec files, so install dependencies based on Fedora spec file + - yum-builddep -y mariadb-server + - mkdir builddir; cd builddir + - cmake -DRPM=generic $CMAKE_FLAGS -DWITH_SSL=bundled -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -G Ninja .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - ninja -t graph > ../dependencies.dot && dot -Tpng -o ../dependencies.png ../dependencies.dot + - eatmydata ninja package -j 2 --verbose 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + # @TODO: Unlike other builds, the Ninja builds using Gitlab.com runners don't get stuck, but they do get + # stuck on runners with more processors, see https://jira.mariadb.org/browse/MDEV-25968. + # Thus, use the same limitation on Ninja builds as well to ensure it never gets stuck due to this bug. + - ninja test + - *rpm_listfiles + - mkdir ../rpm; mv *.rpm ../rpm + artifacts: + when: always # Must be able to see logs + paths: + - build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpm + - builddir/_CPack_Packages/Linux/RPM/SPECS/ + - dependencies.dot + - dependencies.png + +fedora-clang: + stage: build + variables: + GIT_STRATEGY: fetch + GIT_SUBMODULE_STRATEGY: normal + script: + - yum install -y yum-utils rpm-build openssl-devel graphviz clang gnutls-devel + # Accelerate builds with unsafe disk access, as we can afford to loose the entire build anyway + - yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm + # This repository does not have any .spec files, so install dependencies based on Fedora spec file + - yum-builddep -y mariadb-server + - mkdir builddir; cd builddir + - export CXX=${CXX:-clang++} + - export CC=${CC:-clang} + - export CXX_FOR_BUILD=${CXX_FOR_BUILD:-clang++} + - export CC_FOR_BUILD=${CC_FOR_BUILD:-clang} + - export CFLAGS='-Wno-unused-command-line-argument' + - export CXXFLAGS='-Wno-unused-command-line-argument' + - cmake -DRPM=generic $CMAKE_FLAGS -DWITH_SSL=bundled .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - cmake --graphviz=../dependencies.dot .. && dot -Tpng -o ../dependencies.png ../dependencies.dot + - eatmydata make package -j 2 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + # @TODO: Don't use -j without the limit of 2 on Gitlab.com as builds just + # get stuck when running multi-proc and out of memory, see https://jira.mariadb.org/browse/MDEV-25968 + - make test + # - make test-force # mysql-test-runner takes too long, run MTr in a separate job instead + - *rpm_listfiles + - mkdir ../rpm; mv *.rpm ../rpm + artifacts: + when: always # Must be able to see logs + paths: + - build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpm + - builddir/_CPack_Packages/Linux/RPM/SPECS/ + - dependencies.dot + - dependencies.png + +fedora-sanitizer: + stage: build + variables: + GIT_STRATEGY: fetch + GIT_SUBMODULE_STRATEGY: normal + script: + - yum install -y yum-utils rpm-build openssl-devel clang gnutls-devel + - yum install -y libasan libtsan libubsan + # This repository does not have any .spec files, so install dependencies based on Fedora spec file + - yum-builddep -y mariadb-server + - mkdir builddir; cd builddir + - export CXX=${CXX:-clang++} + - export CC=${CC:-clang} + - export CXX_FOR_BUILD=${CXX_FOR_BUILD:-clang++} + - export CC_FOR_BUILD=${CC_FOR_BUILD:-clang} + - export CFLAGS='-Wno-unused-command-line-argument' + - export CXXFLAGS='-Wno-unused-command-line-argument' + - cmake -DRPM=$CI_JOB_NAME $CMAKE_FLAGS -DWITH_SSL=bundled $SANITIZER .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + # @TODO: the build will fail consistently at 24% when trying to make using eatmydata + - make package -j 2 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - *rpm_listfiles + - mkdir ../rpm; mv *.rpm ../rpm + artifacts: + when: always # Must be able to see logs + paths: + - build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpm + - builddir/_CPack_Packages/Linux/RPM/SPECS/ + parallel: + matrix: + - SANITIZER: [-DWITH_ASAN=YES, -DWITH_TSAN=YES, -DWITH_UBSAN=YES, -DWITH_MSAN=YES] + +centos8: + stage: build + image: quay.io/centos/centos:stream8 # CentOS 8 is deprecated, use this Stream8 instead + variables: + GIT_STRATEGY: fetch + GIT_SUBMODULE_STRATEGY: normal + script: + - yum install -y yum-utils rpm-build openssl-devel pcre2-devel + - yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm + # dnf --enablerepo=powertools install Judy-devel #--> not found + - dnf config-manager --set-enabled powertools + # Error: + # Problem: conflicting requests + # - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.i686 is filtered out by modular filtering + # - package Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64 is filtered out by modular filtering + # Solution: install Judy-devel directly from downloaded rpm file: + - yum install -y http://vault.centos.org/centos/8/PowerTools/x86_64/os/Packages/Judy-devel-1.0.5-18.module_el8.3.0+757+d382997d.x86_64.rpm + # Use eatmydata to speed up build + - yum install -y https://github.com/stewartsmith/libeatmydata/releases/download/v129/libeatmydata-129-1.fc33.x86_64.rpm + - yum install -y ccache # From EPEL + - source /etc/profile.d/ccache.sh + - export CCACHE_DIR="$(pwd)/.ccache"; ccache --zero-stats + # This repository does not have any .spec files, so install dependencies based on CentOS spec file + - yum-builddep -y mariadb-server + - mkdir builddir; cd builddir + - cmake -DRPM=$CI_JOB_NAME $CMAKE_FLAGS -DWITH_SSL=system .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - eatmydata make package -j 2 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + # @TODO: Don't use -j without the limit of 2 on Gitlab.com as builds just + # get stuck when running multi-proc and out of memory, see https://jira.mariadb.org/browse/MDEV-25968 + - make test + # - make test-force # mysql-test-runner takes too long, run it MTR a separate job instead + - *rpm_listfiles + - mkdir ../rpm; mv *.rpm ../rpm + - ccache -s + artifacts: + when: always # Must be able to see logs + paths: + - build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpm + - builddir/_CPack_Packages/Linux/RPM/SPECS/ + cache: + key: $MARIADB_MAJOR_VERSION + paths: + - .ccache + +centos7: + stage: build + image: centos:7 + variables: + GIT_STRATEGY: fetch + GIT_SUBMODULE_STRATEGY: normal + script: + # This repository does not have any .spec files, so install dependencies based on Fedora spec file + - yum-builddep -y mariadb-server + # ..with a few extra ones, as CentOS 7 is very old and these are added in newer MariaDB releases + - yum install -y yum-utils rpm-build gcc gcc-c++ bison libxml2-devel libevent-devel openssl-devel pcre2-devel + - mkdir builddir; cd builddir + - cmake -DRPM=$CI_JOB_NAME $CMAKE_FLAGS -DWITH_SSL=system .. 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - make package -j 2 2>&1 | tee -a ../build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + # @TODO: Don't use -j without the limit of 2 on Gitlab.com as builds just + # get stuck when running multi-proc and out of memory, see https://jira.mariadb.org/browse/MDEV-25968 + - make test + # - make test-force # mysql-test-runner takes too long, run it in a separate job instead + - *rpm_listfiles + - mkdir ../rpm; mv *.rpm ../rpm + artifacts: + when: always # Must be able to see logs + paths: + - build-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpmlist-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + - rpm + - builddir/_CPack_Packages/Linux/RPM/SPECS/ + +.mysql-test-run: &mysql-test-run-def + stage: test + script: + # Install packages so tests and the dependencies install + # @TODO: RPM missing 'patch' and 'diff' as dependency, so installing it manually for now + - yum install -y rpm/*.rpm patch diffutils + # @TODO: Fix on packaging level for /usr/share/mariadb to work and errormsg.sys be found + - rm -rf /usr/share/mariadb; ln -s /usr/share/mysql /usr/share/mariadb + # mtr expects to be launched in-place and with write access to it's own directories + - cd /usr/share/mysql-test + # Skip failing tests + - | + echo " + main.mysqldump : Field separator argument is not what is expected; check the manual when executing 'SELECT INTO OUTFILE' + main.flush_logs_not_windows : query 'flush logs' succeeded - should have failed with error ER_CANT_CREATE_FILE (1004) + main.mysql_upgrade_noengine : upgrade output order does not match the expected + " > skiplist + - ./mtr --suite=main --force --parallel=auto --xml-report=$CI_PROJECT_DIR/junit.xml --skip-test-list=skiplist $RESTART_POLICY + +mysql-test-run: + stage: test + dependencies: + - fedora + needs: + - fedora + <<: *mysql-test-run-def + artifacts: + when: always # Also show results when tests fail + reports: + junit: + - junit.xml + +# Duplicate of the above jobs, except we use sanitizer build jobs as a dependency. This is so we can keep +# sanitizer errors separate from functional test failures. Currently, there is no way to run the same +# job for different dependencies. +# +# Additionally, for each sanitizer MTR job, we enable --force-restart so that +# sanitizer errors can be traced to individual tests. The difference in test +# suite runtime as a result of this flag is negligable (~30s for the entire test suite). +# (see https://dev.mysql.com/doc/dev/mysql-server/latest/PAGE_MYSQL_TEST_RUN_PL.html) +mysql-test-run-asan: + stage: test + variables: + RESTART_POLICY: "--force-restart" + dependencies: + - "fedora-sanitizer: [-DWITH_ASAN=YES]" + needs: + - "fedora-sanitizer: [-DWITH_ASAN=YES]" + <<: *mysql-test-run-def + artifacts: + when: always # Also show results when tests fail + reports: + junit: + - junit.xml + +mysql-test-run-tsan: + stage: test + variables: + RESTART_POLICY: "--force-restart" + dependencies: + - "fedora-sanitizer: [-DWITH_TSAN=YES]" + needs: + - "fedora-sanitizer: [-DWITH_TSAN=YES]" + <<: *mysql-test-run-def + allow_failure: true + artifacts: + when: always # Also show results when tests fail + reports: + junit: + - junit.xml + +mysql-test-run-ubsan: + stage: test + variables: + RESTART_POLICY: "--force-restart" + dependencies: + - "fedora-sanitizer: [-DWITH_UBSAN=YES]" + needs: + - "fedora-sanitizer: [-DWITH_UBSAN=YES]" + <<: *mysql-test-run-def + allow_failure: true + artifacts: + when: always # Also show results when tests fail + reports: + junit: + - junit.xml + +mysql-test-run-msan: + stage: test + variables: + RESTART_POLICY: "--force-restart" + dependencies: + - "fedora-sanitizer: [-DWITH_MSAN=YES]" + needs: + - "fedora-sanitizer: [-DWITH_MSAN=YES]" + <<: *mysql-test-run-def + allow_failure: true + artifacts: + when: always # Also show results when tests fail + reports: + junit: + - junit.xml + +rpmlint: + stage: test + dependencies: + - fedora + needs: + - fedora + script: + - yum install -y rpmlint + - rm -f rpm/*debuginfo* # Not relevant in this test + # Limit output to 1000 lines as Gitlab-CI max output is 4194304 bytes + # Save everything in a log file so it can be viewed in full via artifacts + - rpmlint --info rpm/*.rpm | tee -a rpmlint-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + artifacts: + when: always # Also show results when tests fail + paths: + - rpmlint-$CI_JOB_NAME-$CI_COMMIT_REF_SLUG.log + allow_failure: true + # @TODO: The package is not rpmlint clean, must allow failure for now + +fedora install: + stage: test + dependencies: + - fedora + needs: + - fedora + script: + - rm -f rpm/*debuginfo* # Not relevant in this test + # Nothing provides galera-4 on Fedora, so this step fails if built with wsrep + - yum install -y rpm/*.rpm + # Fedora does not support running services in Docker (like Debian packages do) so start it manually + - /usr/bin/mariadb-install-db -u mysql + - sudo -u mysql /usr/sbin/mariadbd & sleep 10 + # Dump database contents as is before upgrade + - mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > installed-database.sql + # Since we did a manual start, we also need to run upgrade manually + - /usr/bin/mariadb-upgrade -u root + # Dump database contents as is after upgrade + - mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > upgraded-database.sql + - | + mariadb --skip-column-names -e "SELECT @@version, @@version_comment" | tee /tmp/version + grep $MARIADB_MAJOR_VERSION /tmp/version || echo "MariaDB didn't install properly" + - mariadb --table -e "SELECT * FROM mysql.global_priv; SHOW CREATE USER root@localhost; SHOW CREATE USER 'mariadb.sys'@localhost" + - mariadb --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS" + - mariadb -e "SHUTDOWN;" + - rm -rf /var/lib/mysql/* # Clear datadir before next run + # Start database without install-db step + - sudo -u mysql /usr/sbin/mariadbd --skip-network --skip-grant & sleep 10 + # Dump database contents in initial state + - mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > empty-database.sql + artifacts: + paths: + - installed-database.sql + - upgraded-database.sql + +fedora upgrade: + stage: test + dependencies: + - fedora + needs: + - fedora + script: + - dnf install -y mariadb-server + # Fedora does not support running services in Docker (like Debian packages do) so start it manually + - /usr/libexec/mariadb-check-socket + - /usr/libexec/mariadb-prepare-db-dir + - sudo -u mysql /usr/libexec/mariadbd --basedir=/usr & sleep 10 + # Dump database contents in installed state + - mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > old-installed-database.sql + - /usr/libexec/mariadb-check-upgrade + # Dump database contents in upgraded state + - mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > old-upgraded-database.sql + - mariadb --skip-column-names -e "SELECT @@version, @@version_comment" # Show version + # @TODO: Upgrade from Fedora 33 MariaDB 10.4 to MariaDB.org latest does not work + # so do this manual step to remove conflicts until packaging is fixed + - yum remove -y mariadb-server-utils mariadb-gssapi-server mariadb-cracklib-password-check mariadb-backup mariadb-connector-c-config + - rm -f rpm/*debuginfo* # Not relevant in this test + - yum install -y rpm/*.rpm + # nothing provides galera-4 on Fedora, so this step fails if built with wsrep + - mysql -e "SHUTDOWN;" + - /usr/bin/mariadb-install-db # This step should not do anything on upgrades, just exit + - sudo -u mysql /usr/sbin/mariadbd & sleep 10 + # Dump database contents in installed state + - mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > new-installed-database.sql || true + # The step above fails on: mariadb-dump: Couldn't execute 'show events': Cannot proceed, because event scheduler is disabled (1577) + # @TODO: Since we did a manual start, we also need to run upgrade manually + - /usr/bin/mariadb-upgrade + # Dump database contents in upgraded state + - mariadb-dump --all-databases --all-tablespaces --triggers --routines --events --skip-extended-insert > new-upgraded-database.sql + - | + mariadb --skip-column-names -e "SELECT @@version, @@version_comment" | tee /tmp/version + grep $MARIADB_MAJOR_VERSION /tmp/version || echo "MariaDB didn't upgrade properly" + - mariadb --table -e "SELECT * FROM mysql.global_priv; SHOW CREATE USER root@localhost; SHOW CREATE USER 'mariadb.sys'@localhost" + - mariadb --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS" + artifacts: + paths: + - old-installed-database.sql + - old-upgraded-database.sql + - new-installed-database.sql + - new-upgraded-database.sql + +# Once all RPM builds and tests have passed, also run the DEB builds and tests +# @NOTE: This is likely to work well only on salsa.debian.org as the Gitlab.com +# runners are too small for everything this stage does. +# build_deb: +# stage: Salsa-CI +# trigger: +# include: debian/salsa-ci.yml diff -Nru mariadb-10.5-10.5.19/.gitmodules mariadb-10.5-10.5.21/.gitmodules --- mariadb-10.5-10.5.19/.gitmodules 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/.gitmodules 2023-06-05 16:27:56.000000000 +0000 @@ -1,25 +1,19 @@ [submodule "libmariadb"] path = libmariadb url = https://github.com/MariaDB/mariadb-connector-c.git - ignore = all [submodule "storage/rocksdb/rocksdb"] path = storage/rocksdb/rocksdb url = https://github.com/facebook/rocksdb.git - ignore = all [submodule "wsrep-lib"] path = wsrep-lib url = https://github.com/codership/wsrep-lib.git branch = master - ignore = all [submodule "extra/wolfssl/wolfssl"] path = extra/wolfssl/wolfssl url = https://github.com/wolfSSL/wolfssl.git - ignore = all [submodule "storage/maria/libmarias3"] path = storage/maria/libmarias3 url = https://github.com/mariadb-corporation/libmarias3.git - ignore = all [submodule "storage/columnstore/columnstore"] path = storage/columnstore/columnstore url = https://github.com/mariadb-corporation/mariadb-columnstore-engine.git - ignore = all diff -Nru mariadb-10.5-10.5.19/BUILD/compile-pentium64-asan-max mariadb-10.5-10.5.21/BUILD/compile-pentium64-asan-max --- mariadb-10.5-10.5.19/BUILD/compile-pentium64-asan-max 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/BUILD/compile-pentium64-asan-max 2023-06-05 16:27:56.000000000 +0000 @@ -17,7 +17,7 @@ path=`dirname $0` . "$path/SETUP.sh" -extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address -USAFEMALLOC -UFORCE_INIT_OF_VARS -Wno-uninitialized -Wno-maybe-uninitialized" +extra_flags="$pentium64_cflags $debug_cflags -lasan -O -g -fsanitize=address -USAFEMALLOC -UFORCE_INIT_OF_VARS -Wno-uninitialized -Wno-maybe-uninitialized -DMYSQL_SERVER_SUFFIX=-asan-max" extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs $disable_asan_plugins" export LDFLAGS="-ldl" diff -Nru mariadb-10.5-10.5.19/Docs/INFO_SRC mariadb-10.5-10.5.21/Docs/INFO_SRC --- mariadb-10.5-10.5.19/Docs/INFO_SRC 2023-01-30 20:31:38.000000000 +0000 +++ mariadb-10.5-10.5.21/Docs/INFO_SRC 2023-06-05 16:28:05.000000000 +0000 @@ -1,8 +1,8 @@ -commit: f8a85af8ca1c937b8d4f847477bd282f80251cde -date: 2023-01-30 21:28:21 +0100 -build-date: 2023-01-30 20:31:38 +0000 -short: f8a85af +commit: bed70468ea08c2820647f5e3ac006a9ff88144ac +date: 2023-06-05 17:50:51 +0200 +build-date: 2023-06-05 16:28:05 +0000 +short: bed70468ea0 branch: HEAD -MariaDB source 10.5.19 +MariaDB source 10.5.21 diff -Nru mariadb-10.5-10.5.19/VERSION mariadb-10.5-10.5.21/VERSION --- mariadb-10.5-10.5.19/VERSION 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/VERSION 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=5 -MYSQL_VERSION_PATCH=19 +MYSQL_VERSION_PATCH=21 SERVER_MATURITY=stable diff -Nru mariadb-10.5-10.5.19/client/mysql.cc mariadb-10.5-10.5.21/client/mysql.cc --- mariadb-10.5-10.5.19/client/mysql.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysql.cc 2023-06-05 16:27:56.000000000 +0000 @@ -5369,6 +5369,7 @@ full_username=my_strdup(PSI_NOT_INSTRUMENTED, cur[0],MYF(MY_WME)); part_username=my_strdup(PSI_NOT_INSTRUMENTED, strtok(cur[0],"@"),MYF(MY_WME)); (void) mysql_fetch_row(result); // Read eof + mysql_free_result(result); } } diff -Nru mariadb-10.5-10.5.19/client/mysql_plugin.c mariadb-10.5-10.5.21/client/mysql_plugin.c --- mariadb-10.5-10.5.19/client/mysql_plugin.c 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysql_plugin.c 2023-06-05 16:27:56.000000000 +0000 @@ -102,7 +102,7 @@ MY_INIT(argv[0]); sf_leaking_memory=1; /* don't report memory leaks on early exits */ plugin_data.name= 0; /* initialize name */ - + /* The following operations comprise the method for enabling or disabling a plugin. We begin by processing the command options then check the @@ -110,15 +110,15 @@ --plugin-ini (if specified). If the directories are Ok, we then look for the mysqld executable and the plugin soname. Finally, we build a bootstrap command file for use in bootstraping the server. - + If any step fails, the method issues an error message and the tool exits. - + 1) Parse, execute, and verify command options. 2) Check access to directories. 3) Look for mysqld executable. 4) Look for the plugin. 5) Build a bootstrap file with commands to enable or disable plugin. - + */ if ((error= process_options(argc, argv, operation)) || (error= check_access()) || @@ -126,11 +126,11 @@ (error= find_plugin(tp_path)) || (error= build_bootstrap_file(operation, bootstrap))) goto exit; - + /* Dump the bootstrap file if --verbose specified. */ if (opt_verbose && ((error= dump_bootstrap_file(bootstrap)))) goto exit; - + /* Start the server in bootstrap mode and execute bootstrap commands */ error= bootstrap_server(server_path, bootstrap); @@ -238,7 +238,7 @@ #ifdef __WIN__ /** Check to see if there are spaces in a path. - + @param[in] path The Windows path to examine. @retval int spaces found = 1, no spaces = 0 @@ -253,7 +253,7 @@ /** Convert a Unix path to a Windows path. - + @param[in] path The Windows path to examine. @returns string containing path with / changed to \\ @@ -335,12 +335,12 @@ #ifdef __WIN__ { char *format_str= 0; - + if (has_spaces(tool_path) || has_spaces(defaults_file)) format_str = "\"%s --mysqld > %s\""; else format_str = "%s --mysqld > %s"; - + snprintf(defaults_cmd, sizeof(defaults_cmd), format_str, add_quotes(tool_path), add_quotes(defaults_file)); if (opt_verbose) @@ -675,7 +675,7 @@ { reason= "Bad format in plugin configuration file."; fclose(file_ptr); - goto error; + goto error; } break; } @@ -709,7 +709,7 @@ } } } - + fclose(file_ptr); return 0; @@ -740,7 +740,7 @@ int num_found= 0; /* number of options found (shortcut loop) */ char config_file[FN_REFLEN]; /* configuration file name */ char plugin_name[FN_REFLEN]; /* plugin name */ - + /* Form prefix strings for the options. */ const char *basedir_prefix = "--basedir="; size_t basedir_len= strlen(basedir_prefix); @@ -815,7 +815,7 @@ return 1; } /* If a plugin was specified, read the config file. */ - else if (strlen(plugin_name) > 0) + else if (strlen(plugin_name) > 0) { if (load_plugin_data(plugin_name, config_file)) { @@ -847,22 +847,22 @@ /** Parse, execute, and verify command options. - + This method handles all of the option processing including the optional features for displaying data (--print-defaults, --help ,etc.) that do not result in an attempt to ENABLE or DISABLE of a plugin. - + @param[in] arc Count of arguments @param[in] argv Array of arguments @param[out] operation Operation (ENABLE or DISABLE) - + @retval int error = 1, success = 0, exit program = -1 */ static int process_options(int argc, char *argv[], char *operation) { int error= 0; - + /* Parse and execute command-line options */ if ((error= handle_options(&argc, &argv, my_long_options, get_one_option))) return error; @@ -881,7 +881,7 @@ char buff[FN_REFLEN]; if (basedir_len + 2 > FN_REFLEN) return -1; - + memcpy(buff, opt_basedir, basedir_len); buff[basedir_len]= '/'; buff[basedir_len + 1]= '\0'; @@ -890,7 +890,7 @@ opt_basedir= my_strdup(PSI_NOT_INSTRUMENTED, buff, MYF(MY_FAE)); } } - + /* If the user did not specify the option to skip loading defaults from a config file and the required options are not present or there was an error @@ -925,18 +925,18 @@ /** Check access - + This method checks to ensure all of the directories (opt_basedir, opt_plugin_dir, opt_datadir, and opt_plugin_ini) are accessible by the user. - + @retval int error = 1, success = 0 */ static int check_access() { int error= 0; - + if ((error= my_access(opt_basedir, F_OK))) { fprintf(stderr, "ERROR: Cannot access basedir at '%s'.\n", @@ -1048,13 +1048,13 @@ /** Build the bootstrap file. - + Create a new file and populate it with SQL commands to ENABLE or DISABLE the plugin via REPLACE and DELETE operations on the mysql.plugin table. param[in] operation The type of operation (ENABLE or DISABLE) param[out] bootstrap A FILE* pointer - + @retval int error = 1, success = 0 */ @@ -1062,7 +1062,7 @@ { int error= 0; FILE *file= 0; - + /* Perform plugin operation : ENABLE or DISABLE @@ -1073,10 +1073,10 @@ .ini configuration file. Once the file is built, a call to mysqld is made in read only, bootstrap modes to read the SQL statements and execute them. - + Note: Replace was used so that if a user loads a newer version of a library with a different library name, the new library name is - used for symbols that match. + used for symbols that match. */ if ((error= make_tempfile(bootstrap, "sql"))) { @@ -1123,7 +1123,7 @@ printf("# Disabling %s...\n", plugin_data.name); } } - + exit: fclose(file); return error; @@ -1132,11 +1132,11 @@ /** Dump bootstrap file. - + Read the contents of the bootstrap file and print it out. - + @param[in] bootstrap_file Name of bootstrap file to read - + @retval int error = 1, success = 0 */ @@ -1173,7 +1173,7 @@ /** Bootstrap the server - + Create a command line sequence to launch mysqld in bootstrap mode. This will allow mysqld to launch a minimal server instance to read and execute SQL commands from a file piped in (the bootstrap file). We use @@ -1194,47 +1194,39 @@ static int bootstrap_server(char *server_path, char *bootstrap_file) { - char bootstrap_cmd[FN_REFLEN]; + char bootstrap_cmd[FN_REFLEN]= {0}; + char lc_messages_dir_str[FN_REFLEN]= {0}; int error= 0; #ifdef __WIN__ char *format_str= 0; const char *verbose_str= NULL; - - +#endif + + if (opt_lc_messages_dir != NULL) + snprintf(lc_messages_dir_str, sizeof(lc_messages_dir_str), "--lc-messages-dir=%s", + opt_lc_messages_dir); + +#ifdef __WIN__ if (opt_verbose) verbose_str= "--console"; else verbose_str= ""; + if (has_spaces(opt_datadir) || has_spaces(opt_basedir) || - has_spaces(bootstrap_file)) - { - if (opt_lc_messages_dir != NULL) - format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s --lc-messages-dir=%s <%s\""; - else - format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s <%s\""; - } + has_spaces(bootstrap_file) || has_spaces(lc_messages_dir_str)) + format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s %s <%s\""; else - { - if (opt_lc_messages_dir != NULL) - format_str= "\"%s %s --bootstrap --datadir=%s --basedir=%s --lc-messages-dir=%s <%s\""; - else - format_str= "%s %s --bootstrap --datadir=%s --basedir=%s <%s"; - } + format_str= "%s %s --bootstrap --datadir=%s --basedir=%s %s <%s"; + snprintf(bootstrap_cmd, sizeof(bootstrap_cmd), format_str, add_quotes(convert_path(server_path)), verbose_str, add_quotes(opt_datadir), add_quotes(opt_basedir), - add_quotes(bootstrap_file)); + add_quotes(lc_messages_dir_str), add_quotes(bootstrap_file)); #else - if (opt_lc_messages_dir != NULL) - snprintf(bootstrap_cmd, sizeof(bootstrap_cmd), - "%s --no-defaults --bootstrap --datadir=%s --basedir=%s --lc-messages-dir=%s" - " <%s", server_path, opt_datadir, opt_basedir, opt_lc_messages_dir, bootstrap_file); - else - snprintf(bootstrap_cmd, sizeof(bootstrap_cmd), - "%s --no-defaults --bootstrap --datadir=%s --basedir=%s" - " <%s", server_path, opt_datadir, opt_basedir, bootstrap_file); - + snprintf(bootstrap_cmd, sizeof(bootstrap_cmd), + "%s --no-defaults --bootstrap --datadir=%s --basedir=%s %s" + " <%s", server_path, opt_datadir, opt_basedir, lc_messages_dir_str, bootstrap_file); #endif /* Execute the command */ @@ -1247,6 +1239,6 @@ fprintf(stderr, "ERROR: Unexpected result from bootstrap. Error code: %d.\n", error); - + return error; } diff -Nru mariadb-10.5-10.5.19/client/mysql_upgrade.c mariadb-10.5-10.5.21/client/mysql_upgrade.c --- mariadb-10.5-10.5.19/client/mysql_upgrade.c 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysql_upgrade.c 2023-06-05 16:27:56.000000000 +0000 @@ -76,6 +76,8 @@ static my_bool opt_write_binlog; +static void print_conn_args(const char *tool_name); + #define OPT_SILENT OPT_MAX_CLIENT_OPTION static struct my_option my_long_options[]= @@ -155,7 +157,10 @@ GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"user", 'u', "User for login.", &opt_user, &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, - {"verbose", 'v', "Display more output about the process; Using it twice will print connection argument; Using it 3 times will print out all CHECK, RENAME and ALTER TABLE during the check phase.", + {"verbose", 'v', "Display more output about the process; Using it twice will print connection argument;" + "Using it 3 times will print out all CHECK, RENAME and ALTER TABLE during the check phase;" + "Using it 4 times (added in MariaDB 10.0.14) will also write out all mariadb-check commands used;" + "Using it 5 times will print all the mariadb commands used and their results while running mysql_fix_privilege_tables script.", &opt_not_used, &opt_not_used, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0}, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, @@ -210,6 +215,7 @@ DBUG_ENTER("die"); /* Print the error message */ + print_conn_args("mariadb-check"); fflush(stdout); va_start(args, fmt); if (fmt) @@ -640,6 +646,7 @@ "--database=mysql", "--batch", /* Turns off pager etc. */ force ? "--force": "--skip-force", + opt_verbose >= 5 ? "--verbose" : "", ds_res || opt_silent ? "--silent": "", "<", query_file_path, @@ -866,8 +873,7 @@ "There is no need to run mysql_upgrade again for %s.", upgrade_from_version, version); if (!opt_check_upgrade) - verbose("You can use --force if you still want to run mysql_upgrade", - upgrade_from_version, version); + verbose("You can use --force if you still want to run mysql_upgrade"); } return 0; } @@ -1329,9 +1335,7 @@ dynstr_append(&ds_script, *query_ptr); } - run_query(ds_script.str, - &ds_result, /* Collect result */ - TRUE); + run_query(ds_script.str, (opt_verbose >= 5) ? NULL : &ds_result, TRUE); { /* @@ -1502,6 +1506,7 @@ DBUG_ASSERT(phase == phases_total); end: + print_conn_args("mariadb-check"); free_used_memory(); my_end(my_end_arg); exit(0); diff -Nru mariadb-10.5-10.5.19/client/mysqladmin.cc mariadb-10.5-10.5.21/client/mysqladmin.cc --- mariadb-10.5-10.5.19/client/mysqladmin.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysqladmin.cc 2023-06-05 16:27:56.000000000 +0000 @@ -1593,7 +1593,8 @@ llstr((tmp - last_values[row]), buff)); /* Find the minimum row length needed to output the relative value */ - if ((length=(uint) strlen(buff) > ex_val_max_len[row]) && ex_status_printed) + length=(uint) strlen(buff); + if (length > ex_val_max_len[row] && ex_status_printed) ex_val_max_len[row] = length; last_values[row] = tmp; } diff -Nru mariadb-10.5-10.5.19/client/mysqlbinlog.cc mariadb-10.5-10.5.21/client/mysqlbinlog.cc --- mariadb-10.5-10.5.19/client/mysqlbinlog.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysqlbinlog.cc 2023-06-05 16:27:56.000000000 +0000 @@ -312,8 +312,8 @@ } public: - Load_log_processor() {} - ~Load_log_processor() {} + Load_log_processor() = default; + ~Load_log_processor() = default; int init() { @@ -1832,15 +1832,20 @@ my_free_open_file_info(); load_processor.destroy(); mysql_server_end(); + if (opt_flashback) + { + delete_dynamic(&binlog_events); + delete_dynamic(&events_in_stmt); + } DBUG_VOID_RETURN; } -static void die() +static void die(int err) { cleanup(); my_end(MY_DONT_FREE_DBUG); - exit(1); + exit(err); } @@ -1877,7 +1882,7 @@ l_time.time_type != MYSQL_TIMESTAMP_DATETIME || status.warnings) { error("Incorrect date and time argument: %s", str); - die(); + die(1); } /* Note that Feb 30th, Apr 31st cause no error messages and are mapped to @@ -1940,7 +1945,7 @@ opt->name)) <= 0) { sf_leaking_memory= 1; /* no memory leak reports here */ - die(); + die(1); } break; #ifdef WHEN_FLASHBACK_REVIEW_READY @@ -1961,7 +1966,7 @@ opt->name)) <= 0) { sf_leaking_memory= 1; /* no memory leak reports here */ - die(); + die(1); } opt_base64_output_mode= (enum_base64_output_mode)(val - 1); break; @@ -2046,7 +2051,7 @@ if ((ho_error=handle_options(argc, argv, my_options, get_one_option))) { - die(); + die(ho_error); } if (debug_info_flag) my_end_arg= MY_CHECK_ERROR | MY_GIVE_INFO; @@ -3003,6 +3008,12 @@ my_set_max_open_files(open_files_limit); + if (opt_flashback && opt_raw_mode) + { + error("The --raw mode is not allowed with --flashback mode"); + die(1); + } + if (opt_flashback) { my_init_dynamic_array(PSI_NOT_INSTRUMENTED, &binlog_events, @@ -3018,7 +3029,7 @@ if (!remote_opt) { error("The --raw mode only works with --read-from-remote-server"); - die(); + die(1); } if (one_database) warning("The --database option is ignored in raw mode"); @@ -3040,7 +3051,7 @@ O_WRONLY | O_BINARY, MYF(MY_WME)))) { error("Could not create log file '%s'", result_file_name); - die(); + die(1); } } else @@ -3129,7 +3140,7 @@ /* Set delimiter back to semicolon */ if (retval != ERROR_STOP) { - if (!stop_event_string.is_empty()) + if (!stop_event_string.is_empty() && result_file) fprintf(result_file, "%s", stop_event_string.ptr()); if (!opt_raw_mode && opt_flashback) fprintf(result_file, "DELIMITER ;\n"); diff -Nru mariadb-10.5-10.5.19/client/mysqlcheck.c mariadb-10.5-10.5.21/client/mysqlcheck.c --- mariadb-10.5-10.5.19/client/mysqlcheck.c 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysqlcheck.c 2023-06-05 16:27:56.000000000 +0000 @@ -947,6 +947,7 @@ DBUG_RETURN(1); if (dont_quote) { + DBUG_ASSERT(op); DBUG_ASSERT(strlen(op)+strlen(tables)+strlen(options)+8+1 <= query_size); /* No backticks here as we added them before */ diff -Nru mariadb-10.5-10.5.19/client/mysqldump.c mariadb-10.5-10.5.21/client/mysqldump.c --- mariadb-10.5-10.5.19/client/mysqldump.c 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysqldump.c 2023-06-05 16:27:56.000000000 +0000 @@ -2527,7 +2527,10 @@ /* Get database collation. */ if (fetch_db_collation(db_name_buff, db_cl_name, sizeof (db_cl_name))) + { + mysql_free_result(event_list_res); DBUG_RETURN(1); + } } if (switch_character_set_results(mysql, "binary")) @@ -3329,7 +3332,10 @@ if (path) { if (!(sql_file= open_sql_file_for_table(table, O_WRONLY))) + { + mysql_free_result(result); DBUG_RETURN(0); + } write_header(sql_file, db); } @@ -3730,7 +3736,7 @@ char name_buff[NAME_LEN*4+3]; char query_buff[QUERY_LENGTH]; uint old_opt_compatible_mode= opt_compatible_mode; - MYSQL_RES *show_triggers_rs; + MYSQL_RES *show_triggers_rs= NULL; MYSQL_ROW row; FILE *sql_file= md_result_file; @@ -3814,8 +3820,6 @@ } skip: - mysql_free_result(show_triggers_rs); - if (switch_character_set_results(mysql, default_charset)) goto done; @@ -3830,7 +3834,7 @@ done: if (path) my_fclose(sql_file, MYF(0)); - + mysql_free_result(show_triggers_rs); DBUG_RETURN(ret); } @@ -3936,7 +3940,7 @@ uint num_fields; size_t total_length, init_length; - MYSQL_RES *res; + MYSQL_RES *res= NULL; MYSQL_FIELD *field; MYSQL_ROW row; DBUG_ENTER("dump_table"); @@ -4130,6 +4134,8 @@ fprintf(stderr,"%s: Error in field count for table: %s ! Aborting.\n", my_progname_short, result_table); error= EX_CONSCHECK; + if (!quick) + mysql_free_result(res); goto err; } @@ -4438,6 +4444,7 @@ err: dynstr_free(&query_string); maybe_exit(error); + mysql_free_result(res); DBUG_VOID_RETURN; } /* dump_table */ @@ -4703,7 +4710,11 @@ " '@', QUOTE(DEFAULT_ROLE_HOST))) as r," " CONCAT(QUOTE(mu.USER),'@',QUOTE(mu.HOST)) as u " "FROM mysql.user mu LEFT JOIN mysql.default_roles using (USER, HOST)")) + { + mysql_free_result(tableres); return 1; + } + while ((row= mysql_fetch_row(tableres))) { if (dump_grants(row[1])) @@ -5780,7 +5791,8 @@ lower_case_table_names= atoi(row[1]); mysql_free_result(table_res); } - + if (!row) + mysql_free_result(table_res); return lower_case_table_names; } @@ -6023,7 +6035,11 @@ } if (have_mariadb_gtid && get_gtid_pos(gtid_pos, 1)) + { + mysql_free_result(master); return 1; + } + } /* SHOW MASTER STATUS reports file and position */ @@ -6145,7 +6161,10 @@ { char gtid_pos[MAX_GTID_LENGTH]; if (have_mariadb_gtid && get_gtid_pos(gtid_pos, 0)) + { + mysql_free_result(slave); return 1; + } if (opt_comments) fprintf(md_result_file, "\n--\n-- Gtid position to start replication " "from\n--\n\n"); @@ -6341,7 +6360,7 @@ { const char *end= x + length; ulong found= 0; - uint find; + int find; char buff[255]; *err_pos= 0; /* No error yet */ diff -Nru mariadb-10.5-10.5.19/client/mysqlslap.c mariadb-10.5-10.5.21/client/mysqlslap.c --- mariadb-10.5-10.5.19/client/mysqlslap.c 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysqlslap.c 2023-06-05 16:27:56.000000000 +0000 @@ -1773,6 +1773,7 @@ uint x; struct timeval start_time, end_time; thread_context con; + int error; pthread_t mainthread; /* Thread descriptor */ pthread_attr_t attr; /* Thread attributes */ DBUG_ENTER("run_scheduler"); @@ -1781,8 +1782,11 @@ con.limit= limit; pthread_attr_init(&attr); - pthread_attr_setdetachstate(&attr, - PTHREAD_CREATE_DETACHED); + if ((error= pthread_attr_setdetachstate(&attr, PTHREAD_CREATE_DETACHED))) + { + printf("Got error: %d from pthread_attr_setdetachstate\n", error); + exit(1); + } pthread_mutex_lock(&counter_mutex); thread_counter= 0; diff -Nru mariadb-10.5-10.5.19/client/mysqltest.cc mariadb-10.5-10.5.21/client/mysqltest.cc --- mariadb-10.5-10.5.19/client/mysqltest.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/client/mysqltest.cc 2023-06-05 16:27:56.000000000 +0000 @@ -3564,9 +3564,11 @@ /* returns TRUE if path is inside a sandbox */ bool is_sub_path(const char *path, size_t plen, const char *sandbox) { - size_t len= strlen(sandbox); - if (!sandbox || !len || plen <= len || memcmp(path, sandbox, len - 1) - || path[len] != '/') + size_t len; + if (!sandbox) + return false; + len= strlen(sandbox); + if (plen <= len || memcmp(path, sandbox, len-1) || path[len] != '/') return false; return true; } @@ -3813,9 +3815,21 @@ sizeof(move_file_args)/sizeof(struct command_arg), ' '); - if (bad_path(ds_to_file.str)) - DBUG_VOID_RETURN; + size_t from_plen = strlen(ds_from_file.str); + size_t to_plen = strlen(ds_to_file.str); + const char *vardir= getenv("MYSQLTEST_VARDIR"); + const char *tmpdir= getenv("MYSQL_TMP_DIR"); + if (!((is_sub_path(ds_from_file.str, from_plen, vardir) && + is_sub_path(ds_to_file.str, to_plen, vardir)) || + (is_sub_path(ds_from_file.str, from_plen, tmpdir) && + is_sub_path(ds_to_file.str, to_plen, tmpdir)))) { + report_or_die("Paths '%s' and '%s' are not both under MYSQLTEST_VARDIR '%s'" + "or both under MYSQL_TMP_DIR '%s'", + ds_from_file, ds_to_file, vardir, tmpdir); + DBUG_VOID_RETURN; + } + DBUG_PRINT("info", ("Move %s to %s", ds_from_file.str, ds_to_file.str)); error= (my_rename(ds_from_file.str, ds_to_file.str, MYF(disable_warnings ? 0 : MY_WME)) != 0); @@ -5181,6 +5195,7 @@ if (!timeout || wait_until_dead(pid, timeout < 5 ? 5 : timeout)) { (void) my_kill(pid, SIGKILL); + wait_until_dead(pid, 5); } } DBUG_VOID_RETURN; @@ -11752,7 +11767,7 @@ /* Sort array */ qsort(lines.buffer, lines.elements, - sizeof(char**), (qsort_cmp)comp_lines); + sizeof(uchar *), (qsort_cmp)comp_lines); /* Create new result */ for (i= 0; i < lines.elements ; i++) diff -Nru mariadb-10.5-10.5.19/debian/changelog mariadb-10.5-10.5.21/debian/changelog --- mariadb-10.5-10.5.19/debian/changelog 2023-04-15 19:50:35.000000000 +0000 +++ mariadb-10.5-10.5.21/debian/changelog 2023-07-23 21:26:58.000000000 +0000 @@ -1,3 +1,13 @@ +mariadb-10.5 (1:10.5.21-0+deb11u1) bullseye; urgency=medium + + * New upstream version 10.5.21. Includes fixes for several severe regressions, + see details at https://mariadb.com/kb/en/mariadb-10-5-21-release-notes/ + * Previous release 10.5.21 included security fix for: + - CVE-2022-47015 + * Make SysV init script explicit on its dependencies (Related: #1035949) + + -- Otto Kekäläinen Sun, 23 Jul 2023 14:26:58 -0700 + mariadb-10.5 (1:10.5.19-0+deb11u2) bullseye; urgency=medium * Add patch to revert upstream libmariadb API change (Closes: #1033654) diff -Nru mariadb-10.5-10.5.19/debian/libmariadb-dev.install mariadb-10.5-10.5.21/debian/libmariadb-dev.install --- mariadb-10.5-10.5.19/debian/libmariadb-dev.install 2023-02-10 07:39:59.000000000 +0000 +++ mariadb-10.5-10.5.21/debian/libmariadb-dev.install 2023-05-15 00:31:13.000000000 +0000 @@ -11,6 +11,7 @@ usr/include/mariadb/mariadb_rpl.h usr/include/mariadb/mariadb_stmt.h usr/include/mariadb/mariadb_version.h +usr/include/mariadb/my_alloca.h usr/include/mariadb/my_config.h usr/include/mariadb/my_global.h usr/include/mariadb/my_sys.h diff -Nru mariadb-10.5-10.5.19/debian/mariadb-server-10.5.mariadb.init mariadb-10.5-10.5.21/debian/mariadb-server-10.5.mariadb.init --- mariadb-10.5-10.5.19/debian/mariadb-server-10.5.mariadb.init 2023-02-10 07:39:59.000000000 +0000 +++ mariadb-10.5-10.5.21/debian/mariadb-server-10.5.mariadb.init 2023-05-26 06:10:59.000000000 +0000 @@ -21,9 +21,18 @@ . /lib/lsb/init-functions -SELF=$(cd $(dirname $0); pwd -P)/$(basename $0) +SELF=$(cd "$(dirname $0)"; pwd -P)/$(basename $0) -MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" +if [ -x /usr/bin/mariadb-admin ] +then + MYADMIN="/usr/bin/mariadb-admin --defaults-file=/etc/mysql/debian.cnf" +elif [ -x /usr/bin/mysqladmin ] +then + MYADMIN="/usr/bin/mysqladmin --defaults-file=/etc/mysql/debian.cnf" +else + log_failure_msg "Command mariadb-admin/mysqladmin not found! This SysV init script depends on it." + exit -1 +fi # priority can be overridden and "-s" adds output to stderr ERR_LOGGER="logger -p daemon.err -t /etc/init.d/mariadb -i" diff -Nru mariadb-10.5-10.5.19/debian/patches/mariadb-client-version-id.patch mariadb-10.5-10.5.21/debian/patches/mariadb-client-version-id.patch --- mariadb-10.5-10.5.19/debian/patches/mariadb-client-version-id.patch 2023-04-15 19:40:37.000000000 +0000 +++ mariadb-10.5-10.5.21/debian/patches/mariadb-client-version-id.patch 2023-05-15 00:31:13.000000000 +0000 @@ -33,7 +33,7 @@ --- a/libmariadb/libmariadb/mariadb_lib.c +++ b/libmariadb/libmariadb/mariadb_lib.c -@@ -2866,7 +2866,7 @@ mysql_get_proto_info(MYSQL *mysql) +@@ -2867,7 +2867,7 @@ mysql_get_proto_info(MYSQL *mysql) const char * STDCALL mysql_get_client_info(void) { @@ -42,7 +42,7 @@ } static size_t get_store_length(size_t length) -@@ -3881,7 +3881,7 @@ int STDCALL mysql_set_server_option(MYSQ +@@ -3882,7 +3882,7 @@ int STDCALL mysql_set_server_option(MYSQ ulong STDCALL mysql_get_client_version(void) { diff -Nru mariadb-10.5-10.5.19/debian/salsa-ci.yml mariadb-10.5-10.5.21/debian/salsa-ci.yml --- mariadb-10.5-10.5.19/debian/salsa-ci.yml 2023-04-15 19:40:37.000000000 +0000 +++ mariadb-10.5-10.5.21/debian/salsa-ci.yml 2023-07-23 21:11:43.000000000 +0000 @@ -85,11 +85,6 @@ variables: RELEASE: buster-backports -build stretch-backports: - extends: .build-package - variables: - RELEASE: stretch-backports - autopkgtest: extends: .test-autopkgtest artifacts: @@ -288,10 +283,19 @@ paths: - ${WORKING_DIR}/debug script: + # The official Stretch repository has been deprecated, so use last snapshot instead + - | + cat > /etc/apt/sources.list < /etc/apt/sources.list < /etc/apt/sources.list < /etc/apt/sources.list.d/ubuntu.list - - apt-get update - - apt-get install -y 'mysql*' 'libmysqlc*' - - *test-verify-initial - # Enable backports to make libzstd1, rocksdb-tools - - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/backports.list - # Enable backports to make galera-4 available - - echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list.d/backports.list && apt-get update - # Remove plugin that requires libcurl4, not available in Debian Stretch - - rm mariadb-plugin-s3*.deb - - *test-install - - service mysql status - - sleep 5 # Give the mysql_upgrade a bit of time to complete before querying the server - - *test-verify-final - variables: - GIT_STRATEGY: none - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - # As Bullseye already has MariaDB 10.5, upstream does not provide any <10.5 # packages for Bullseye and thus no upgrades on lower versions can be tested # inside Bullseye @@ -668,58 +651,6 @@ except: variables: - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ - -mariadb.org-10.2 to mariadb-10.5 upgrade: - stage: upgrade extras - needs: - - job: build stretch-backports - image: debian:${RELEASE} - artifacts: - when: always - name: "$CI_BUILD_NAME" - paths: - - ${WORKING_DIR}/debug - script: - - *test-prepare-container - - apt install -y curl apt-transport-https - - curl -sS https://mariadb.org/mariadb_release_signing_key.asc -o /etc/apt/trusted.gpg.d/mariadb.asc - - echo "deb https://archive.mariadb.org/mariadb-10.2/repo/debian ${RELEASE} main" > /etc/apt/sources.list.d/mariadb.list - - apt-get update - - apt-get install -y mariadb-server-10.2 - # Verify initial state before upgrade - - dpkg -l | grep -iE 'maria|mysql|galera' || true # List installed - - service mysql status - # prepending with --defaults-file=/etc/mysql/debian.cnf is needed in upstream 5.5–10.3 - - | - mysql --defaults-file=/etc/mysql/debian.cnf --skip-column-names -e "SELECT @@version, @@version_comment" - mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SHOW DATABASES;" - mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.user; SHOW CREATE USER root@localhost;" - mysql --defaults-file=/etc/mysql/debian.cnf --table -e "SELECT * FROM mysql.plugin; SHOW PLUGINS;" - # Enable backports to make libzstd1, rocksdb-tools - - echo "deb http://deb.debian.org/debian stretch-backports main" >> /etc/apt/sources.list.d/backports.list - # Enable backports to make galera-4 available - - echo "deb http://deb.debian.org/debian stretch-backports-sloppy main" >> /etc/apt/sources.list.d/backports.list && apt-get update - # Increase default backports priority policy from '100' to '500' so it can actually be used - - | - cat << EOF > /etc/apt/preferences.d/enable-backports-to-satisfy-dependencies - Package: * - Pin: release n=stretch-* - Pin-Priority: 500 - EOF - # Remove plugin that requires libcurl4, not available in Debian Stretch - - rm mariadb-plugin-s3*.deb - - *test-install - - service mysql status - # Give the mariadb-upgrade plenty of time to complete, otherwise next commands - # fail on non-existing mariadb.sys user - - sleep 15 - - *test-verify-final - variables: - GIT_STRATEGY: none - RELEASE: stretch # Last Debian release that MariaDB.org published 10.2 binaries for - except: - variables: - - $CI_COMMIT_TAG != null && $SALSA_CI_ENABLE_PIPELINE_ON_TAGS !~ /^(1|yes|true)$/ mysql.com-5.7 to mariadb-10.5 upgrade: stage: upgrade extras diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/backup_copy.cc mariadb-10.5-10.5.21/extra/mariabackup/backup_copy.cc --- mariadb-10.5-10.5.19/extra/mariabackup/backup_copy.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/backup_copy.cc 2023-06-05 16:27:56.000000000 +0000 @@ -73,9 +73,8 @@ static void rocksdb_create_checkpoint(); static bool has_rocksdb_plugin(); -static void copy_or_move_dir(const char *from, const char *to, bool copy, bool allow_hardlinks); -static void rocksdb_backup_checkpoint(); -static void rocksdb_copy_back(); +static void rocksdb_backup_checkpoint(ds_ctxt *ds_data); +static void rocksdb_copy_back(ds_ctxt *ds_data); static bool is_abs_path(const char *path) { @@ -131,7 +130,9 @@ bool ret; }; -static bool backup_files_from_datadir(const char *dir_path); +static bool backup_files_from_datadir(ds_ctxt_t *ds_data, + const char *dir_path, + const char *prefix); /************************************************************************ Retirn true if character if file separator */ @@ -803,7 +804,7 @@ @return true if file backed up or skipped successfully. */ static bool -datafile_copy_backup(const char *filepath, uint thread_n) +datafile_copy_backup(ds_ctxt *ds_data, const char *filepath, uint thread_n) { const char *ext_list[] = {"frm", "isl", "MYD", "MYI", "MAD", "MAI", "MRG", "TRG", "TRN", "ARM", "ARZ", "CSM", "CSV", "opt", "par", @@ -824,7 +825,7 @@ } if (filename_matches(filepath, ext_list)) { - return copy_file(ds_data, filepath, filepath, thread_n); + return ds_data->copy_file(filepath, filepath, thread_n); } return(true); @@ -865,7 +866,8 @@ return(true); } -bool backup_file_print_buf(const char *filename, const char *buf, int buf_len) +bool ds_ctxt_t::backup_file_print_buf(const char *filename, + const char *buf, int buf_len) { ds_file_t *dstfile = NULL; MY_STAT stat; /* unused for now */ @@ -876,7 +878,7 @@ stat.st_size = buf_len; stat.st_mtime = my_time(0); - dstfile = ds_open(ds_data, filename, &stat); + dstfile = ds_open(this, filename, &stat); if (dstfile == NULL) { msg("error: Can't open the destination stream for %s", filename); @@ -915,9 +917,9 @@ return true; }; -static bool -backup_file_vprintf(const char *filename, const char *fmt, va_list ap) +ds_ctxt_t::backup_file_vprintf(const char *filename, + const char *fmt, va_list ap) { char *buf = 0; int buf_len; @@ -928,7 +930,7 @@ } bool -backup_file_printf(const char *filename, const char *fmt, ...) +ds_ctxt_t::backup_file_printf(const char *filename, const char *fmt, ...) { bool result; va_list ap; @@ -1054,16 +1056,15 @@ Copy file for backup/restore. @return true in case of success. */ bool -copy_file(ds_ctxt_t *datasink, - const char *src_file_path, - const char *dst_file_path, - uint thread_n) +ds_ctxt_t::copy_file(const char *src_file_path, + const char *dst_file_path, + uint thread_n) { char dst_name[FN_REFLEN]; ds_file_t *dstfile = NULL; datafile_cur_t cursor; xb_fil_cur_result_t res; - DBUG_ASSERT(datasink->datasink->remove); + DBUG_ASSERT(datasink->remove); const char *dst_path = (xtrabackup_copy_back || xtrabackup_move_back)? dst_file_path : trim_dotslash(dst_file_path); @@ -1074,7 +1075,7 @@ strncpy(dst_name, cursor.rel_path, sizeof(dst_name)); - dstfile = ds_open(datasink, dst_path, &cursor.statinfo); + dstfile = ds_open(this, dst_path, &cursor.statinfo); if (dstfile == NULL) { msg(thread_n,"error: " "cannot open the destination stream for %s", dst_name); @@ -1111,7 +1112,7 @@ error: datafile_close(&cursor); if (dstfile != NULL) { - datasink->datasink->remove(dstfile->path); + datasink->remove(dstfile->path); ds_close(dstfile); } @@ -1125,12 +1126,10 @@ Try to move file by renaming it. If source and destination are on different devices fall back to copy and unlink. @return true in case of success. */ -static bool -move_file(ds_ctxt_t *datasink, - const char *src_file_path, - const char *dst_file_path, - const char *dst_dir, uint thread_n) +ds_ctxt_t::move_file(const char *src_file_path, + const char *dst_file_path, + const char *dst_dir, uint thread_n) { char errbuf[MYSYS_STRERROR_SIZE]; char dst_file_path_abs[FN_REFLEN]; @@ -1157,7 +1156,7 @@ if (my_rename(src_file_path, dst_file_path_abs, MYF(0)) != 0) { if (my_errno == EXDEV) { /* Fallback to copy/unlink */ - if(!copy_file(datasink, src_file_path, + if(!copy_file(src_file_path, dst_file_path, thread_n)) return false; msg(thread_n,"Removing %s", src_file_path); @@ -1241,13 +1240,13 @@ @return true in case of success. */ static bool -copy_or_move_file(const char *src_file_path, +copy_or_move_file(ds_ctxt *datasink0, const char *src_file_path, const char *dst_file_path, const char *dst_dir, uint thread_n, bool copy = xtrabackup_copy_back) { - ds_ctxt_t *datasink = ds_data; /* copy to datadir by default */ + ds_ctxt_t *datasink = datasink0; /* copy to datadir by default */ char filedir[FN_REFLEN]; size_t filedir_len; bool ret; @@ -1295,13 +1294,13 @@ } ret = (copy ? - copy_file(datasink, src_file_path, dst_file_path, thread_n) : - move_file(datasink, src_file_path, dst_file_path, + datasink->copy_file(src_file_path, dst_file_path, thread_n) : + datasink->move_file(src_file_path, dst_file_path, dst_dir, thread_n)); cleanup: - if (datasink != ds_data) { + if (datasink != datasink0) { ds_destroy(datasink); } @@ -1313,7 +1312,7 @@ static bool -backup_files(const char *from, bool prep_mode) +backup_files(ds_ctxt *ds_data, const char *from, bool prep_mode) { char rsync_tmpfile_name[FN_REFLEN]; FILE *rsync_tmpfile = NULL; @@ -1351,7 +1350,7 @@ ret = datafile_rsync_backup(node.filepath, !prep_mode, rsync_tmpfile); } else { - ret = datafile_copy_backup(node.filepath, 1); + ret = datafile_copy_backup(ds_data, node.filepath, 1); } if (!ret) { msg("Failed to copy file %s", node.filepath); @@ -1362,7 +1361,7 @@ char path[FN_REFLEN]; snprintf(path, sizeof(path), "%s/db.opt", node.filepath); - if (!(ret = backup_file_printf( + if (!(ret = ds_data->backup_file_printf( trim_dotslash(path), "%s", ""))) { msg("Failed to create file %s", path); goto out; @@ -1451,7 +1450,6 @@ return(ret); } -void backup_fix_ddl(CorruptedPages &); lsn_t get_current_lsn(MYSQL *connection) { @@ -1476,7 +1474,8 @@ lsn_t server_lsn_after_lock; extern void backup_wait_for_lsn(lsn_t lsn); /** Start --backup */ -bool backup_start(CorruptedPages &corrupted_pages) +bool backup_start(ds_ctxt *ds_data, ds_ctxt *ds_meta, + CorruptedPages &corrupted_pages) { if (!opt_no_lock) { if (opt_safe_slave_backup) { @@ -1485,7 +1484,7 @@ } } - if (!backup_files(fil_path_to_mysql_datadir, true)) { + if (!backup_files(ds_data, fil_path_to_mysql_datadir, true)) { return(false); } @@ -1497,11 +1496,15 @@ server_lsn_after_lock = get_current_lsn(mysql_connection); } - if (!backup_files(fil_path_to_mysql_datadir, false)) { + if (!backup_files(ds_data, fil_path_to_mysql_datadir, false)) { return(false); } - if (!backup_files_from_datadir(fil_path_to_mysql_datadir)) { + if (!backup_files_from_datadir(ds_data, fil_path_to_mysql_datadir, + "aws-kms-key") || + !backup_files_from_datadir(ds_data, + aria_log_dir_path, + "aria_log")) { return false; } @@ -1511,7 +1514,7 @@ msg("Waiting for log copy thread to read lsn %llu", (ulonglong)server_lsn_after_lock); backup_wait_for_lsn(server_lsn_after_lock); - backup_fix_ddl(corrupted_pages); + corrupted_pages.backup_fix_ddl(ds_data, ds_meta); // There is no need to stop slave thread before coping non-Innodb data when // --no-lock option is used because --no-lock option requires that no DDL or @@ -1527,7 +1530,7 @@ if (opt_slave_info) { lock_binlog_maybe(mysql_connection); - if (!write_slave_info(mysql_connection)) { + if (!write_slave_info(ds_data, mysql_connection)) { return(false); } } @@ -1539,7 +1542,7 @@ avoid that is to have a single process, i.e. merge innobackupex and xtrabackup. */ if (opt_galera_info) { - if (!write_galera_info(mysql_connection)) { + if (!write_galera_info(ds_data, mysql_connection)) { return(false); } } @@ -1547,7 +1550,7 @@ if (opt_binlog_info == BINLOG_INFO_ON) { lock_binlog_maybe(mysql_connection); - write_binlog_info(mysql_connection); + write_binlog_info(ds_data, mysql_connection); } if (have_flush_engine_logs && !opt_no_lock) { @@ -1584,20 +1587,20 @@ static const char *default_buffer_pool_file = "ib_buffer_pool"; /** Finish after backup_start() and backup_release() */ -bool backup_finish() +bool backup_finish(ds_ctxt *ds_data) { /* Copy buffer pool dump or LRU dump */ if (!opt_rsync && opt_galera_info) { if (buffer_pool_filename && file_exists(buffer_pool_filename)) { - copy_file(ds_data, buffer_pool_filename, default_buffer_pool_file, 0); + ds_data->copy_file(buffer_pool_filename, default_buffer_pool_file, 0); } if (file_exists("ib_lru_dump")) { - copy_file(ds_data, "ib_lru_dump", "ib_lru_dump", 0); + ds_data->copy_file("ib_lru_dump", "ib_lru_dump", 0); } } if (has_rocksdb_plugin()) { - rocksdb_backup_checkpoint(); + rocksdb_backup_checkpoint(ds_data); } msg("Backup created in directory '%s'", xtrabackup_target_dir); @@ -1609,11 +1612,11 @@ mysql_slave_position); } - if (!write_backup_config_file()) { + if (!write_backup_config_file(ds_data)) { return(false); } - if (!write_xtrabackup_info(mysql_connection, XTRABACKUP_INFO, + if (!write_xtrabackup_info(ds_data, mysql_connection, XTRABACKUP_INFO, opt_history != 0, true)) { return(false); } @@ -1680,6 +1683,7 @@ bool ret = true; char path[FN_REFLEN]; int i; + ds_ctxt *ds_data= NULL; DBUG_ASSERT(!opt_galera_info); datadir_node_init(&node); @@ -1707,15 +1711,20 @@ unlink(node.filepath_rel); } - if (!(ret = copy_file(ds_data, node.filepath, - node.filepath_rel, 1))) { + if (!(ret = ds_data->copy_file(node.filepath, + node.filepath_rel, 1))) { msg("Failed to copy file %s", node.filepath); goto cleanup; } } - if (!(ret = backup_files_from_datadir(xtrabackup_incremental_dir))) + if (!(ret = backup_files_from_datadir(ds_data, + xtrabackup_incremental_dir, + "aws-kms-key")) || + !(ret = backup_files_from_datadir(ds_data, + xtrabackup_incremental_dir, + "aria_log"))) goto cleanup; /* copy supplementary files */ @@ -1730,7 +1739,7 @@ if (file_exists(sup_files[i])) { unlink(sup_files[i]); } - copy_file(ds_data, path, sup_files[i], 0); + ds_data->copy_file(path, sup_files[i], 0); } } @@ -1744,7 +1753,7 @@ if (my_mkdir(ROCKSDB_BACKUP_DIR, 0777, MYF(0))) { die("my_mkdir failed for " ROCKSDB_BACKUP_DIR); } - copy_or_move_dir(path, ROCKSDB_BACKUP_DIR, true, true); + ds_data->copy_or_move_dir(path, ROCKSDB_BACKUP_DIR, true, true); } ibx_incremental_drop_databases(xtrabackup_target_dir, xtrabackup_incremental_dir); @@ -1815,13 +1824,61 @@ return(true); } +class Copy_back_dst_dir +{ + std::string buf; + +public: + const char *make(const char *path) + { + if (!path || !path[0]) + return mysql_data_home; + if (is_absolute_path(path)) + return path; + return buf.assign(mysql_data_home).append(path).c_str(); + } +}; + + +static inline bool +is_aria_log_dir_file(const datadir_node_t &node) +{ + return starts_with(node.filepath_rel, "aria_log"); +} + + +bool +copy_back_aria_logs(const char *dstdir) +{ + std::unique_ptr + ds_ctxt_aria_log_dir_path(ds_create(dstdir, DS_TYPE_LOCAL), ds_destroy); + + datadir_node_t node; + datadir_node_init(&node); + datadir_iter_t *it = datadir_iter_new(".", false); + + while (datadir_iter_next(it, &node)) + { + if (!is_aria_log_dir_file(node)) + continue; + if (!copy_or_move_file(ds_ctxt_aria_log_dir_path.get(), + node.filepath, node.filepath_rel, + dstdir, 1)) + return false; + } + datadir_node_free(&node); + datadir_iter_free(it); + return true; +} + + bool copy_back() { bool ret = false; datadir_iter_t *it = NULL; datadir_node_t node; - char *dst_dir; + const char *dst_dir; memset(&node, 0, sizeof(node)); @@ -1848,6 +1905,13 @@ return(false); } + Copy_back_dst_dir aria_log_dir_path_dst; + const char *aria_log_dir_path_abs= aria_log_dir_path_dst.make(aria_log_dir_path); + if (aria_log_dir_path && *aria_log_dir_path + && !directory_exists(aria_log_dir_path_abs, true)) { + return false; + } + /* cd to backup directory */ if (my_setwd(xtrabackup_target_dir, MYF(MY_WME))) { @@ -1855,6 +1919,9 @@ return(false); } + if (!copy_back_aria_logs(aria_log_dir_path_abs)) + return false; + /* parse data file path */ if (!innobase_data_file_path) { @@ -1873,11 +1940,11 @@ /* copy undo tablespaces */ + Copy_back_dst_dir dst_dir_buf; - dst_dir = (srv_undo_dir && *srv_undo_dir) - ? srv_undo_dir : mysql_data_home; + dst_dir = dst_dir_buf.make(srv_undo_dir); - ds_data = ds_create(dst_dir, DS_TYPE_LOCAL); + ds_ctxt *ds_tmp = ds_create(dst_dir, DS_TYPE_LOCAL); for (uint i = 1; i <= TRX_SYS_MAX_UNDO_SPACES; i++) { char filename[20]; @@ -1885,24 +1952,23 @@ if (!file_exists(filename)) { break; } - if (!(ret = copy_or_move_file(filename, filename, + if (!(ret = copy_or_move_file(ds_tmp, filename, filename, dst_dir, 1))) { goto cleanup; } } - ds_destroy(ds_data); - ds_data = NULL; + ds_destroy(ds_tmp); + ds_tmp = NULL; /* copy redo logs */ - dst_dir = (srv_log_group_home_dir && *srv_log_group_home_dir) - ? srv_log_group_home_dir : mysql_data_home; + dst_dir = dst_dir_buf.make(srv_log_group_home_dir); /* --backup generates a single LOG_FILE_NAME, which we must copy if it exists. */ - ds_data = ds_create(dst_dir, DS_TYPE_LOCAL); + ds_tmp = ds_create(dst_dir, DS_TYPE_LOCAL); MY_STAT stat_arg; if (!my_stat(LOG_FILE_NAME, &stat_arg, MYF(0)) || !stat_arg.st_size) { /* After completed --prepare, redo log files are redundant. @@ -1917,18 +1983,17 @@ snprintf(filename, sizeof filename, "%s/%s101", dst_dir, LOG_FILE_NAME_PREFIX); unlink(filename); - } else if (!(ret = copy_or_move_file(LOG_FILE_NAME, LOG_FILE_NAME, + } else if (!(ret = copy_or_move_file(ds_tmp, LOG_FILE_NAME, LOG_FILE_NAME, dst_dir, 1))) { goto cleanup; } - ds_destroy(ds_data); + ds_destroy(ds_tmp); /* copy innodb system tablespace(s) */ - dst_dir = (innobase_data_home_dir && *innobase_data_home_dir) - ? innobase_data_home_dir : mysql_data_home; + dst_dir = dst_dir_buf.make(innobase_data_home_dir); - ds_data = ds_create(dst_dir, DS_TYPE_LOCAL); + ds_tmp = ds_create(dst_dir, DS_TYPE_LOCAL); for (Tablespace::const_iterator iter(srv_sys_space.begin()), end(srv_sys_space.end()); @@ -1936,16 +2001,16 @@ ++iter) { const char *filename = base_name(iter->name()); - if (!(ret = copy_or_move_file(filename, iter->name(), + if (!(ret = copy_or_move_file(ds_tmp, filename, iter->name(), dst_dir, 1))) { goto cleanup; } } - ds_destroy(ds_data); + ds_destroy(ds_tmp); /* copy the rest of tablespaces */ - ds_data = ds_create(mysql_data_home, DS_TYPE_LOCAL); + ds_tmp = ds_create(mysql_data_home, DS_TYPE_LOCAL); it = datadir_iter_new(".", false); @@ -1961,6 +2026,10 @@ int i_tmp; bool is_ibdata_file; + /* Skip aria log files */ + if (is_aria_log_dir_file(node)) + continue; + if (strstr(node.filepath,"/" ROCKSDB_BACKUP_DIR "/") #ifdef _WIN32 || strstr(node.filepath,"\\" ROCKSDB_BACKUP_DIR "\\") @@ -2032,7 +2101,7 @@ continue; } - if (!(ret = copy_or_move_file(node.filepath, node.filepath_rel, + if (!(ret = copy_or_move_file(ds_tmp, node.filepath, node.filepath_rel, mysql_data_home, 1))) { goto cleanup; } @@ -2042,12 +2111,12 @@ if (file_exists(default_buffer_pool_file) && innobase_buffer_pool_filename) { - copy_or_move_file(default_buffer_pool_file, + copy_or_move_file(ds_tmp, default_buffer_pool_file, innobase_buffer_pool_filename, mysql_data_home, 0); } - rocksdb_copy_back(); + rocksdb_copy_back(ds_tmp); cleanup: if (it != NULL) { @@ -2056,11 +2125,11 @@ datadir_node_free(&node); - if (ds_data != NULL) { - ds_destroy(ds_data); + if (ds_tmp != NULL) { + ds_destroy(ds_tmp); } - ds_data = NULL; + ds_tmp = NULL; sync_check_close(); return(ret); @@ -2168,7 +2237,7 @@ } /* copy the rest of tablespaces */ - ds_data = ds_create(".", DS_TYPE_LOCAL); + ds_ctxt *ds_tmp = ds_create(".", DS_TYPE_LOCAL); it = datadir_iter_new(".", false); @@ -2181,11 +2250,11 @@ datadir_iter_free(it); } - if (ds_data != NULL) { - ds_destroy(ds_data); + if (ds_tmp != NULL) { + ds_destroy(ds_tmp); } - ds_data = NULL; + ds_tmp = NULL; sync_check_close(); @@ -2197,7 +2266,9 @@ Do not copy the Innodb files (ibdata1, redo log files), as this is done in a separate step. */ -static bool backup_files_from_datadir(const char *dir_path) +static bool backup_files_from_datadir(ds_ctxt_t *ds_data, + const char *dir_path, + const char *prefix) { os_file_dir_t dir = os_file_opendir(dir_path); if (dir == IF_WIN(INVALID_HANDLE_VALUE, nullptr)) return false; @@ -2213,8 +2284,7 @@ if (!pname) pname = info.name; - if (!starts_with(pname, "aws-kms-key") && - !starts_with(pname, "aria_log")) + if (!starts_with(pname, prefix)) /* For ES exchange the above line with the following code: (!xtrabackup_prepare || !xtrabackup_incremental_dir || !starts_with(pname, "aria_log"))) @@ -2227,7 +2297,7 @@ std::string full_path(dir_path); full_path.append(1, OS_PATH_SEPARATOR).append(info.name); - if (!(ret = copy_file(ds_data, full_path.c_str() , info.name, 1))) + if (!(ret = ds_data->copy_file(full_path.c_str() , info.name, 1))) break; } os_file_closedir(dir); @@ -2277,13 +2347,14 @@ Create a file hardlink. @return true on success, false on error. */ -static bool make_hardlink(const char *from_path, const char *to_path) +bool +ds_ctxt_t::make_hardlink(const char *from_path, const char *to_path) { DBUG_EXECUTE_IF("no_hardlinks", return false;); char to_path_full[FN_REFLEN]; if (!is_abs_path(to_path)) { - fn_format(to_path_full, to_path, ds_data->root, "", MYF(MY_RELATIVE_PATH)); + fn_format(to_path_full, to_path, root, "", MYF(MY_RELATIVE_PATH)); } else { @@ -2304,7 +2375,9 @@ Has optimization that allows to use hardlinks when possible (source and destination are directories on the same device) */ -static void copy_or_move_dir(const char *from, const char *to, bool do_copy, bool allow_hardlinks) +void +ds_ctxt_t::copy_or_move_dir(const char *from, const char *to, + bool do_copy, bool allow_hardlinks) { datadir_node_t node; datadir_node_init(&node); @@ -2332,8 +2405,8 @@ if (!rc) { rc = (do_copy ? - copy_file(ds_data, from_path, to_path, 1) : - move_file(ds_data, from_path, node.filepath_rel, + copy_file(from_path, to_path, 1) : + move_file(from_path, node.filepath_rel, to, 1)); } if (!rc) @@ -2430,7 +2503,7 @@ remove temp.checkpoint directory (in server's datadir) and release user level lock acquired inside rocksdb_create_checkpoint(). */ -static void rocksdb_backup_checkpoint() +static void rocksdb_backup_checkpoint(ds_ctxt *ds_data) { msg("Backing up rocksdb files."); char rocksdb_backup_dir[FN_REFLEN]; @@ -2442,7 +2515,7 @@ die("Can't create rocksdb backup directory %s", rocksdb_backup_dir); } } - copy_or_move_dir(rocksdb_checkpoint_dir, ROCKSDB_BACKUP_DIR, true, backup_to_directory); + ds_data->copy_or_move_dir(rocksdb_checkpoint_dir, ROCKSDB_BACKUP_DIR, true, backup_to_directory); rocksdb_remove_checkpoint_directory(); rocksdb_unlock_checkpoint(); } @@ -2450,7 +2523,7 @@ /* Copies #rocksdb directory to the $rockdb_data_dir, on copy-back */ -static void rocksdb_copy_back() { +static void rocksdb_copy_back(ds_ctxt *ds_data) { if (access(ROCKSDB_BACKUP_DIR, 0)) return; char rocksdb_home_dir[FN_REFLEN]; @@ -2462,5 +2535,5 @@ xb_rocksdb_datadir?trim_dotslash(xb_rocksdb_datadir): ROCKSDB_BACKUP_DIR); } mkdirp(rocksdb_home_dir, 0777, MYF(0)); - copy_or_move_dir(ROCKSDB_BACKUP_DIR, rocksdb_home_dir, xtrabackup_copy_back, xtrabackup_copy_back); + ds_data->copy_or_move_dir(ROCKSDB_BACKUP_DIR, rocksdb_home_dir, xtrabackup_copy_back, xtrabackup_copy_back); } diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/backup_copy.h mariadb-10.5-10.5.21/extra/mariabackup/backup_copy.h --- mariadb-10.5-10.5.19/extra/mariabackup/backup_copy.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/backup_copy.h 2023-06-05 16:27:56.000000000 +0000 @@ -14,30 +14,18 @@ extern bool binlog_locked; -bool -backup_file_printf(const char *filename, const char *fmt, ...) - ATTRIBUTE_FORMAT(printf, 2, 0); - /************************************************************************ Return true if first and second arguments are the same path. */ bool equal_paths(const char *first, const char *second); -/************************************************************************ -Copy file for backup/restore. -@return true in case of success. */ -bool -copy_file(ds_ctxt_t *datasink, - const char *src_file_path, - const char *dst_file_path, - uint thread_n); - /** Start --backup */ -bool backup_start(CorruptedPages &corrupted_pages); +bool backup_start(ds_ctxt *ds_data, ds_ctxt *ds_meta, + CorruptedPages &corrupted_pages); /** Release resources after backup_start() */ void backup_release(); /** Finish after backup_start() and backup_release() */ -bool backup_finish(); +bool backup_finish(ds_ctxt *ds_data); bool apply_log_finish(); bool @@ -51,6 +39,5 @@ lsn_t get_current_lsn(MYSQL *connection); -bool backup_file_print_buf(const char *filename, const char *buf, int buf_len); #endif diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/backup_mysql.cc mariadb-10.5-10.5.21/extra/mariabackup/backup_mysql.cc --- mariadb-10.5-10.5.19/extra/mariabackup/backup_mysql.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/backup_mysql.cc 2023-06-05 16:27:56.000000000 +0000 @@ -366,6 +366,7 @@ char *innodb_undo_directory_var= NULL; char *innodb_page_size_var= NULL; char *innodb_undo_tablespaces_var= NULL; + char *aria_log_dir_path_var= NULL; char *page_zip_level_var= NULL; char *ignore_db_dirs= NULL; char *endptr; @@ -396,6 +397,7 @@ {"innodb_undo_tablespaces", &innodb_undo_tablespaces_var}, {"innodb_compression_level", &page_zip_level_var}, {"ignore_db_dirs", &ignore_db_dirs}, + {"aria_log_dir_path", &aria_log_dir_path_var}, {NULL, NULL}}; read_mysql_variables(connection, "SHOW VARIABLES", mysql_vars, true); @@ -527,6 +529,12 @@ ut_ad(*endptr == 0); } + if (aria_log_dir_path_var) + { + aria_log_dir_path= my_strdup(PSI_NOT_INSTRUMENTED, + aria_log_dir_path_var, MYF(MY_FAE)); + } + if (page_zip_level_var != NULL) { page_zip_level= static_cast(strtoul(page_zip_level_var, &endptr, @@ -1373,7 +1381,7 @@ @returns true on success */ bool -write_slave_info(MYSQL *connection) +write_slave_info(ds_ctxt *datasink, MYSQL *connection) { String sql, comment; bool show_all_slaves_status= false; @@ -1403,7 +1411,8 @@ } mysql_slave_position= strdup(comment.c_ptr()); - return backup_file_print_buf(XTRABACKUP_SLAVE_INFO, sql.ptr(), sql.length()); + return datasink->backup_file_print_buf(XTRABACKUP_SLAVE_INFO, + sql.ptr(), sql.length()); } @@ -1411,7 +1420,7 @@ Retrieves MySQL Galera and saves it in a file. It also prints it to stdout. */ bool -write_galera_info(MYSQL *connection) +write_galera_info(ds_ctxt *datasink, MYSQL *connection) { char *state_uuid = NULL, *state_uuid55 = NULL; char *last_committed = NULL, *last_committed55 = NULL; @@ -1443,12 +1452,12 @@ goto cleanup; } - result = backup_file_printf(XTRABACKUP_GALERA_INFO, + result = datasink->backup_file_printf(XTRABACKUP_GALERA_INFO, "%s:%s\n", state_uuid ? state_uuid : state_uuid55, last_committed ? last_committed : last_committed55); if (result) { - write_current_binlog_file(connection); + write_current_binlog_file(datasink, connection); } cleanup: @@ -1462,7 +1471,7 @@ Flush and copy the current binary log file into the backup, if GTID is enabled */ bool -write_current_binlog_file(MYSQL *connection) +write_current_binlog_file(ds_ctxt *datasink, MYSQL *connection) { char *executed_gtid_set = NULL; char *gtid_binlog_state = NULL; @@ -1532,7 +1541,7 @@ snprintf(filepath, sizeof(filepath), "%s%c%s", log_bin_dir, FN_LIBCHAR, log_bin_file); - result = copy_file(ds_data, filepath, log_bin_file, 0); + result = datasink->copy_file(filepath, log_bin_file, 0); } cleanup: @@ -1548,7 +1557,7 @@ Retrieves MySQL binlog position and saves it in a file. It also prints it to stdout. */ bool -write_binlog_info(MYSQL *connection) +write_binlog_info(ds_ctxt *datasink, MYSQL *connection) { char *filename = NULL; char *position = NULL; @@ -1593,14 +1602,14 @@ "filename '%s', position '%s', " "GTID of the last change '%s'", filename, position, gtid) != -1); - result = backup_file_printf(XTRABACKUP_BINLOG_INFO, + result = datasink->backup_file_printf(XTRABACKUP_BINLOG_INFO, "%s\t%s\t%s\n", filename, position, gtid); } else { ut_a(asprintf(&mysql_binlog_position, "filename '%s', position '%s'", filename, position) != -1); - result = backup_file_printf(XTRABACKUP_BINLOG_INFO, + result = datasink->backup_file_printf(XTRABACKUP_BINLOG_INFO, "%s\t%s\n", filename, position); } @@ -1640,8 +1649,9 @@ table containing all the history info particular to the just completed backup. */ bool -write_xtrabackup_info(MYSQL *connection, const char * filename, bool history, - bool stream) +write_xtrabackup_info(ds_ctxt *datasink, + MYSQL *connection, const char * filename, bool history, + bool stream) { bool result = true; @@ -1717,7 +1727,7 @@ } if (stream) { - backup_file_printf(filename, "%s", buf); + datasink->backup_file_printf(filename, "%s", buf); } else { fp = fopen(filename, "w"); if (!fp) { @@ -1838,9 +1848,9 @@ return buf.str(); } -bool write_backup_config_file() +bool write_backup_config_file(ds_ctxt *datasink) { - int rc= backup_file_printf("backup-my.cnf", + int rc= datasink->backup_file_printf("backup-my.cnf", "# This options file was generated by innobackupex.\n\n" "# The server\n" "[mysqld]\n" diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/backup_mysql.h mariadb-10.5-10.5.21/extra/mariabackup/backup_mysql.h --- mariadb-10.5-10.5.19/extra/mariabackup/backup_mysql.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/backup_mysql.h 2023-06-05 16:27:56.000000000 +0000 @@ -62,17 +62,18 @@ unlock_all(MYSQL *connection); bool -write_current_binlog_file(MYSQL *connection); +write_current_binlog_file(ds_ctxt *datasink, MYSQL *connection); bool -write_binlog_info(MYSQL *connection); +write_binlog_info(ds_ctxt *datasink, MYSQL *connection); bool -write_xtrabackup_info(MYSQL *connection, const char * filename, bool history, - bool stream); +write_xtrabackup_info(ds_ctxt *datasink, + MYSQL *connection, const char * filename, bool history, + bool stream); bool -write_backup_config_file(); +write_backup_config_file(ds_ctxt *datasink); bool lock_binlog_maybe(MYSQL *connection); @@ -84,10 +85,10 @@ wait_for_safe_slave(MYSQL *connection); bool -write_galera_info(MYSQL *connection); +write_galera_info(ds_ctxt *datasink, MYSQL *connection); bool -write_slave_info(MYSQL *connection); +write_slave_info(ds_ctxt *datasink, MYSQL *connection); #endif diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/datasink.h mariadb-10.5-10.5.21/extra/mariabackup/datasink.h --- mariadb-10.5-10.5.19/extra/mariabackup/datasink.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/datasink.h 2023-06-05 16:27:56.000000000 +0000 @@ -37,6 +37,35 @@ char *root; void *ptr; struct ds_ctxt *pipe_ctxt; + /* + Copy file for backup/restore. + @return true in case of success. + */ + bool copy_file(const char *src_file_path, + const char *dst_file_path, + uint thread_n); + + bool move_file(const char *src_file_path, + const char *dst_file_path, + const char *dst_dir, + uint thread_n); + + bool make_hardlink(const char *from_path, const char *to_path); + + void copy_or_move_dir(const char *from, const char *to, + bool do_copy, bool allow_hardlinks); + + bool backup_file_vprintf(const char *filename, + const char *fmt, va_list ap); + + bool backup_file_print_buf(const char *filename, + const char *buf, + int buf_len); + + bool backup_file_printf(const char *filename, + const char *fmt, ...) + ATTRIBUTE_FORMAT(printf, 2, 0); + } ds_ctxt_t; typedef struct { diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/write_filt.cc mariadb-10.5-10.5.21/extra/mariabackup/write_filt.cc --- mariadb-10.5-10.5.19/extra/mariabackup/write_filt.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/write_filt.cc 2023-06-05 16:27:56.000000000 +0000 @@ -31,7 +31,8 @@ /************************************************************************ Write-through page write filter. */ -static my_bool wf_wt_init(xb_write_filt_ctxt_t *ctxt, char *dst_name, +static my_bool wf_wt_init(ds_ctxt *ds_meta, + xb_write_filt_ctxt_t *ctxt, char *dst_name, xb_fil_cur_t *cursor, CorruptedPages *corrupted_pages); static my_bool wf_wt_process(xb_write_filt_ctxt_t *ctxt, ds_file_t *dstfile); @@ -44,7 +45,8 @@ /************************************************************************ Incremental page write filter. */ -static my_bool wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name, +static my_bool wf_incremental_init(ds_ctxt *ds_meta, + xb_write_filt_ctxt_t *ctxt, char *dst_name, xb_fil_cur_t *cursor, CorruptedPages *corrupted_pages); static my_bool wf_incremental_process(xb_write_filt_ctxt_t *ctxt, ds_file_t *dstfile); @@ -64,7 +66,8 @@ @return TRUE on success, FALSE on error. */ static my_bool -wf_incremental_init(xb_write_filt_ctxt_t *ctxt, char *dst_name, +wf_incremental_init(ds_ctxt *ds_meta, + xb_write_filt_ctxt_t *ctxt, char *dst_name, xb_fil_cur_t *cursor, CorruptedPages *corrupted_pages) { char meta_name[FN_REFLEN]; @@ -88,7 +91,7 @@ XB_DELTA_INFO_SUFFIX); const xb_delta_info_t info(cursor->page_size, cursor->zip_size, cursor->space_id); - if (!xb_write_delta_metadata(meta_name, &info)) { + if (!xb_write_delta_metadata(ds_meta, meta_name, &info)) { msg(cursor->thread_n,"Error: " "failed to write meta info for %s", cursor->rel_path); @@ -195,7 +198,8 @@ @return TRUE on success, FALSE on error. */ static my_bool -wf_wt_init(xb_write_filt_ctxt_t *ctxt, char *dst_name __attribute__((unused)), +wf_wt_init(ds_ctxt *ds_meta __attribute__((unused)), + xb_write_filt_ctxt_t *ctxt, char *dst_name __attribute__((unused)), xb_fil_cur_t *cursor, CorruptedPages *) { ctxt->cursor = cursor; diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/write_filt.h mariadb-10.5-10.5.21/extra/mariabackup/write_filt.h --- mariadb-10.5-10.5.19/extra/mariabackup/write_filt.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/write_filt.h 2023-06-05 16:27:56.000000000 +0000 @@ -45,7 +45,8 @@ typedef struct { - my_bool (*init)(xb_write_filt_ctxt_t *ctxt, char *dst_name, + my_bool (*init)(ds_ctxt *ds_meta, + xb_write_filt_ctxt_t *ctxt, char *dst_name, xb_fil_cur_t *cursor, CorruptedPages *corrupted_pages); my_bool (*process)(xb_write_filt_ctxt_t *ctxt, ds_file_t *dstfile); my_bool (*finalize)(xb_write_filt_ctxt_t *, ds_file_t *dstfile); diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/xbcloud.cc mariadb-10.5-10.5.21/extra/mariabackup/xbcloud.cc --- mariadb-10.5-10.5.19/extra/mariabackup/xbcloud.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/xbcloud.cc 2023-06-05 16:27:56.000000000 +0000 @@ -2534,7 +2534,7 @@ } else if (opt_swift_project != NULL) { snprintf(scope, sizeof(scope), ",\"scope\":{\"project\":{\"name\":\"%s\"%s}}", - opt_swift_project_id, domain); + opt_swift_project, domain); } snprintf(payload, sizeof(payload), "{\"auth\":{\"identity\":" diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/xtrabackup.cc mariadb-10.5-10.5.21/extra/mariabackup/xtrabackup.cc --- mariadb-10.5-10.5.19/extra/mariabackup/xtrabackup.cc 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/xtrabackup.cc 2023-06-05 16:27:56.000000000 +0000 @@ -118,6 +118,12 @@ #define MB_CORRUPTED_PAGES_FILE "innodb_corrupted_pages" +// disable server's systemd notification code +extern "C" { +int sd_notify() { return 0; } +int sd_notifyf() { return 0; } +} + int sys_var_init(); /* === xtrabackup specific options === */ @@ -261,6 +267,7 @@ char* innobase_data_home_dir; char* innobase_data_file_path; +char *aria_log_dir_path; my_bool xtrabackup_incremental_force_scan = FALSE; @@ -278,10 +285,66 @@ char *xb_plugin_load; my_bool xb_close_files; -/* Datasinks */ -ds_ctxt_t *ds_data = NULL; -ds_ctxt_t *ds_meta = NULL; -ds_ctxt_t *ds_redo = NULL; + +class Datasink_free_list +{ +protected: + /* + Simple datasink creation tracking... + add datasinks in the reverse order you want them destroyed. + */ +#define XTRABACKUP_MAX_DATASINKS 10 + ds_ctxt_t *m_datasinks_to_destroy[XTRABACKUP_MAX_DATASINKS]; + uint m_actual_datasinks_to_destroy; +public: + Datasink_free_list() + :m_actual_datasinks_to_destroy(0) + { } + + void add_datasink_to_destroy(ds_ctxt_t *ds) + { + xb_ad(m_actual_datasinks_to_destroy < XTRABACKUP_MAX_DATASINKS); + m_datasinks_to_destroy[m_actual_datasinks_to_destroy] = ds; + m_actual_datasinks_to_destroy++; + } + + /* + Destroy datasinks. + Destruction is done in the specific order to not violate their order in the + pipeline so that each datasink is able to flush data down the pipeline. + */ + void destroy() + { + for (uint i= m_actual_datasinks_to_destroy; i > 0; i--) + { + ds_destroy(m_datasinks_to_destroy[i - 1]); + m_datasinks_to_destroy[i - 1] = NULL; + } + } +}; + + +class Backup_datasinks: public Datasink_free_list +{ +public: + ds_ctxt_t *m_data; + ds_ctxt_t *m_meta; + ds_ctxt_t *m_redo; + + Backup_datasinks() + :m_data(NULL), + m_meta(NULL), + m_redo(NULL) + { } + void init(); + void destroy() + { + Datasink_free_list::destroy(); + *this= Backup_datasinks(); + } + bool backup_low(); +}; + static bool innobackupex_mode = false; @@ -430,7 +493,8 @@ ut_a(!pthread_mutex_unlock(&m_mutex)); } -bool CorruptedPages::print_to_file(const char *filename) const +bool CorruptedPages::print_to_file(ds_ctxt *ds_data, + const char *filename) const { std::ostringstream out; ut_a(!pthread_mutex_lock(&m_mutex)); @@ -458,8 +522,8 @@ out << "\n"; } ut_a(!pthread_mutex_unlock(&m_mutex)); - if (xtrabackup_backup) - return backup_file_print_buf(filename, out.str().c_str(), + if (ds_data) + return ds_data->backup_file_print_buf(filename, out.str().c_str(), static_cast(out.str().size())); std::ofstream outfile; outfile.open(filename); @@ -580,19 +644,6 @@ aligned_free(zero_page); } -/* Simple datasink creation tracking...add datasinks in the reverse order you -want them destroyed. */ -#define XTRABACKUP_MAX_DATASINKS 10 -static ds_ctxt_t *datasinks[XTRABACKUP_MAX_DATASINKS]; -static uint actual_datasinks = 0; -static inline -void -xtrabackup_add_datasink(ds_ctxt_t *ds) -{ - xb_ad(actual_datasinks < XTRABACKUP_MAX_DATASINKS); - datasinks[actual_datasinks] = ds; actual_datasinks++; -} - typedef void (*process_single_tablespace_func_t)(const char *dirname, const char *filname, bool is_remote, @@ -927,6 +978,7 @@ pthread_mutex_t* count_mutex; os_thread_id_t id; CorruptedPages *corrupted_pages; + Backup_datasinks *datasinks; } data_thread_ctxt_t; /* ======== for option and variables ======== */ @@ -1030,7 +1082,8 @@ OPT_XTRA_CHECK_PRIVILEGES, OPT_XTRA_MYSQLD_ARGS, OPT_XB_IGNORE_INNODB_PAGE_CORRUPTION, - OPT_INNODB_FORCE_RECOVERY + OPT_INNODB_FORCE_RECOVERY, + OPT_ARIA_LOG_DIR_PATH }; struct my_option xb_client_options[]= { @@ -1058,7 +1111,8 @@ (G_PTR *) &xtrabackup_print_param, (G_PTR *) &xtrabackup_print_param, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, {"use-memory", OPT_XTRA_USE_MEMORY, - "The value is used instead of buffer_pool_size", + "The value is used in place of innodb_buffer_pool_size. " + "This option is only relevant when the --prepare option is specified.", (G_PTR *) &xtrabackup_use_memory, (G_PTR *) &xtrabackup_use_memory, 0, GET_LL, REQUIRED_ARG, 100 * 1024 * 1024L, 1024 * 1024L, LONGLONG_MAX, 0, 1024 * 1024L, 0}, @@ -1242,7 +1296,7 @@ {"rsync", OPT_RSYNC, "Uses the rsync utility to optimize local file " - "transfers. When this option is specified, innobackupex uses rsync " + "transfers. When this option is specified, " XB_TOOL_NAME " uses rsync " "to copy all non-InnoDB files instead of spawning a separate cp for " "each file, which can be much faster for servers with a large number " "of databases or tables. This option cannot be used together with " @@ -1350,7 +1404,7 @@ {"ftwrl-wait-query-type", OPT_LOCK_WAIT_QUERY_TYPE, "This option specifies which types of queries are allowed to complete " - "before innobackupex will issue the global lock. Default is all.", + "before " XB_TOOL_NAME " will issue the global lock. Default is all.", (uchar *) &opt_lock_wait_query_type, (uchar *) &opt_lock_wait_query_type, &query_type_typelib, GET_ENUM, REQUIRED_ARG, QUERY_TYPE_ALL, 0, 0, 0, 0, 0}, @@ -1370,26 +1424,26 @@ NULL, NULL, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, {"kill-long-queries-timeout", OPT_KILL_LONG_QUERIES_TIMEOUT, - "This option specifies the number of seconds innobackupex waits " + "This option specifies the number of seconds " XB_TOOL_NAME " waits " "between starting FLUSH TABLES WITH READ LOCK and killing those " "queries that block it. Default is 0 seconds, which means " - "innobackupex will not attempt to kill any queries.", + XB_TOOL_NAME " will not attempt to kill any queries.", (uchar *) &opt_kill_long_queries_timeout, (uchar *) &opt_kill_long_queries_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ftwrl-wait-timeout", OPT_LOCK_WAIT_TIMEOUT, - "This option specifies time in seconds that innobackupex should wait " + "This option specifies time in seconds that " XB_TOOL_NAME " should wait " "for queries that would block FTWRL before running it. If there are " - "still such queries when the timeout expires, innobackupex terminates " - "with an error. Default is 0, in which case innobackupex does not " + "still such queries when the timeout expires, " XB_TOOL_NAME " terminates " + "with an error. Default is 0, in which case " XB_TOOL_NAME " does not " "wait for queries to complete and starts FTWRL immediately.", (uchar *) &opt_lock_wait_timeout, (uchar *) &opt_lock_wait_timeout, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"ftwrl-wait-threshold", OPT_LOCK_WAIT_THRESHOLD, "This option specifies the query run time threshold which is used by " - "innobackupex to detect long-running queries with a non-zero value " + XB_TOOL_NAME " to detect long-running queries with a non-zero value " "of --ftwrl-wait-timeout. FTWRL is not started until such " "long-running queries exist. This option has no effect if " "--ftwrl-wait-timeout is 0. Default value is 60 seconds.", @@ -1613,6 +1667,11 @@ &xb_plugin_dir, &xb_plugin_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 }, + {"aria_log_dir_path", OPT_ARIA_LOG_DIR_PATH, + "Path to individual files and their sizes.", + &aria_log_dir_path, &aria_log_dir_path, + 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"open_files_limit", OPT_OPEN_FILES_LIMIT, "the maximum number of file " "descriptors to reserve with setrlimit().", (G_PTR*) &xb_open_files_limit, (G_PTR*) &xb_open_files_limit, 0, GET_ULONG, @@ -1785,6 +1844,12 @@ my_progname, MYSQL_SERVER_VERSION, SYSTEM_TYPE, MACHINE_TYPE); } +static void concatenate_default_groups(std::vector &backup_load_groups, const char **default_groups) +{ + for ( ; *default_groups ; default_groups++) + backup_load_groups.push_back(*default_groups); +} + static void usage(void) { puts("Open source backup tool for InnoDB and XtraDB\n\ @@ -1805,7 +1870,11 @@ You can download full text of the license on http://www.gnu.org/licenses/gpl-2.0.txt\n"); printf("Usage: %s [--defaults-file=#] [--backup | --prepare | --copy-back | --move-back] [OPTIONS]\n",my_progname); - print_defaults("my", load_default_groups); + std::vector backup_load_default_groups; + concatenate_default_groups(backup_load_default_groups, backup_default_groups); + concatenate_default_groups(backup_load_default_groups, load_default_groups); + backup_load_default_groups.push_back(nullptr); + print_defaults("my", &backup_load_default_groups[0]); my_print_help(xb_client_options); my_print_help(xb_server_options); my_print_variables(xb_server_options); @@ -1864,6 +1933,17 @@ break; case OPT_INNODB_FLUSH_METHOD: +#ifdef _WIN32 + /* From: storage/innobase/handler/ha_innodb.cc:innodb_init_params */ + switch (srv_file_flush_method) { + case SRV_ALL_O_DIRECT_FSYNC + 1 /* "async_unbuffered"="unbuffered" */: + srv_file_flush_method= SRV_ALL_O_DIRECT_FSYNC; + break; + case SRV_ALL_O_DIRECT_FSYNC + 2 /* "normal"="fsync" */: + srv_file_flush_method= SRV_FSYNC; + break; + } +#endif ut_a(srv_file_flush_method <= IF_WIN(SRV_ALL_O_DIRECT_FSYNC, SRV_O_DIRECT_NO_FSYNC)); ADD_PRINT_PARAM_OPT(innodb_flush_method_names[srv_file_flush_method]); @@ -1907,6 +1987,10 @@ } break; + case OPT_ARIA_LOG_DIR_PATH: + ADD_PRINT_PARAM_OPT(aria_log_dir_path); + break; + case OPT_XTRA_TARGET_DIR: strmake(xtrabackup_real_target_dir,argument, sizeof(xtrabackup_real_target_dir)-1); xtrabackup_target_dir= xtrabackup_real_target_dir; @@ -2392,7 +2476,8 @@ Write meta info for an incremental delta. @return TRUE on success, FALSE on failure. */ my_bool -xb_write_delta_metadata(const char *filename, const xb_delta_info_t *info) +xb_write_delta_metadata(ds_ctxt *ds_meta, + const char *filename, const xb_delta_info_t *info) { ds_file_t *f; char buf[64]; @@ -2703,7 +2788,9 @@ for full backup, pages filter for incremental backup, etc. @return FALSE on success and TRUE on error */ -static my_bool xtrabackup_copy_datafile(fil_node_t *node, uint thread_n, +static my_bool xtrabackup_copy_datafile(ds_ctxt *ds_data, + ds_ctxt *ds_meta, + fil_node_t *node, uint thread_n, const char *dest_name, const xb_write_filt_t &write_filter, CorruptedPages &corrupted_pages) @@ -2771,7 +2858,7 @@ ut_a(write_filter.process != NULL); if (write_filter.init != NULL && - !write_filter.init(&write_filt_ctxt, dst_name, &cursor, + !write_filter.init(ds_meta, &write_filt_ctxt, dst_name, &cursor, opt_log_innodb_page_corruption ? &corrupted_pages : NULL)) { msg (thread_n, "mariabackup: error: failed to initialize page write filter."); goto error; @@ -2999,7 +3086,9 @@ ut_ad(start_lsn == log_sys.log.scanned_lsn); - msg(">> log scanned up to (" LSN_PF ")", start_lsn); + if (verbose) { + msg(">> log scanned up to (" LSN_PF ")", start_lsn); + } /* update global variable*/ pthread_mutex_lock(&backup_mutex); @@ -3142,7 +3231,8 @@ DBUG_EXECUTE_FOR_KEY("wait_innodb_redo_before_copy", node->space->name, backup_wait_for_lsn(get_current_lsn(mysql_connection));); /* copy the datafile */ - if (xtrabackup_copy_datafile(node, num, NULL, + if (xtrabackup_copy_datafile(ctxt->datasinks->m_data, + ctxt->datasinks->m_meta, node, num, NULL, xtrabackup_incremental ? wf_incremental : wf_write_through, *ctxt->corrupted_pages)) die("failed to copy datafile."); @@ -3168,22 +3258,21 @@ for the data stream (and don't allow parallel data copying) and for metainfo files (including LOG_FILE_NAME). The second datasink writes to temporary files first, and then streams them in a serialized way when closed. */ -static void -xtrabackup_init_datasinks(void) +void Backup_datasinks::init() { /* Start building out the pipelines from the terminus back */ if (xtrabackup_stream) { /* All streaming goes to stdout */ - ds_data = ds_meta = ds_redo = ds_create(xtrabackup_target_dir, - DS_TYPE_STDOUT); + m_data = m_meta = m_redo = ds_create(xtrabackup_target_dir, + DS_TYPE_STDOUT); } else { /* Local filesystem */ - ds_data = ds_meta = ds_redo = ds_create(xtrabackup_target_dir, - DS_TYPE_LOCAL); + m_data = m_meta = m_redo = ds_create(xtrabackup_target_dir, + DS_TYPE_LOCAL); } /* Track it for destruction */ - xtrabackup_add_datasink(ds_data); + add_datasink_to_destroy(m_data); /* Stream formatting */ if (xtrabackup_stream) { @@ -3192,66 +3281,50 @@ ut_a(xtrabackup_stream_fmt == XB_STREAM_FMT_XBSTREAM); ds = ds_create(xtrabackup_target_dir, DS_TYPE_XBSTREAM); - xtrabackup_add_datasink(ds); + add_datasink_to_destroy(ds); - ds_set_pipe(ds, ds_data); - ds_data = ds; + ds_set_pipe(ds, m_data); + m_data = ds; - ds_redo = ds_meta = ds_data; + m_redo = m_meta = m_data; } - /* Compression for ds_data and ds_redo */ + /* Compression for m_data and m_redo */ if (xtrabackup_compress) { ds_ctxt_t *ds; /* Use a 1 MB buffer for compressed output stream */ ds = ds_create(xtrabackup_target_dir, DS_TYPE_BUFFER); ds_buffer_set_size(ds, 1024 * 1024); - xtrabackup_add_datasink(ds); - ds_set_pipe(ds, ds_data); - if (ds_data != ds_redo) { - ds_data = ds; + add_datasink_to_destroy(ds); + ds_set_pipe(ds, m_data); + if (m_data != m_redo) { + m_data = ds; ds = ds_create(xtrabackup_target_dir, DS_TYPE_BUFFER); ds_buffer_set_size(ds, 1024 * 1024); - xtrabackup_add_datasink(ds); - ds_set_pipe(ds, ds_redo); - ds_redo = ds; + add_datasink_to_destroy(ds); + ds_set_pipe(ds, m_redo); + m_redo = ds; } else { - ds_redo = ds_data = ds; + m_redo = m_data = ds; } ds = ds_create(xtrabackup_target_dir, DS_TYPE_COMPRESS); - xtrabackup_add_datasink(ds); - ds_set_pipe(ds, ds_data); - if (ds_data != ds_redo) { - ds_data = ds; + add_datasink_to_destroy(ds); + ds_set_pipe(ds, m_data); + if (m_data != m_redo) { + m_data = ds; ds = ds_create(xtrabackup_target_dir, DS_TYPE_COMPRESS); - xtrabackup_add_datasink(ds); - ds_set_pipe(ds, ds_redo); - ds_redo = ds; + add_datasink_to_destroy(ds); + ds_set_pipe(ds, m_redo); + m_redo = ds; } else { - ds_redo = ds_data = ds; + m_redo = m_data = ds; } } } -/************************************************************************ -Destroy datasinks. - -Destruction is done in the specific order to not violate their order in the -pipeline so that each datasink is able to flush data down the pipeline. */ -static void xtrabackup_destroy_datasinks(void) -{ - for (uint i = actual_datasinks; i > 0; i--) { - ds_destroy(datasinks[i-1]); - datasinks[i-1] = NULL; - } - ds_data = NULL; - ds_meta = NULL; - ds_redo = NULL; -} - #define SRV_MAX_N_PENDING_SYNC_IOS 100 /** Initialize the tablespace cache subsystem. */ @@ -3348,7 +3421,9 @@ if (err == DB_SUCCESS && file->space_id() != SRV_TMP_SPACE_ID) { space = fil_space_t::create( name, file->space_id(), file->flags(), - FIL_TYPE_TABLESPACE, NULL/* TODO: crypt_data */); + FIL_TYPE_TABLESPACE, NULL/* TODO: crypt_data */, + FIL_ENCRYPTION_DEFAULT, + file->handle() != OS_FILE_CLOSED); ut_a(space != NULL); space->add(file->filepath(), @@ -4349,7 +4424,7 @@ /** Implement the core of --backup @return whether the operation succeeded */ -static bool xtrabackup_backup_low() +bool Backup_datasinks::backup_low() { ut_ad(!metadata_to_lsn); @@ -4420,7 +4495,7 @@ } metadata_last_lsn = log_copy_scanned_lsn; - if (!xtrabackup_stream_metadata(ds_meta)) { + if (!xtrabackup_stream_metadata(m_meta)) { msg("Error: failed to stream metadata."); return false; } @@ -4436,7 +4511,8 @@ } sprintf(filename, "%s/%s", xtrabackup_extra_lsndir, XTRABACKUP_INFO); - if (!write_xtrabackup_info(mysql_connection, filename, false, false)) { + if (!write_xtrabackup_info(m_data, + mysql_connection, filename, false, false)) { msg("Error: failed to write info " "to '%s'.", filename); return false; @@ -4456,6 +4532,7 @@ pthread_mutex_t count_mutex; CorruptedPages corrupted_pages; data_thread_ctxt_t *data_threads; + Backup_datasinks backup_datasinks; pthread_mutex_init(&backup_mutex, NULL); pthread_cond_init(&scanned_lsn_cond, NULL); @@ -4596,7 +4673,7 @@ if (err != DB_SUCCESS) goto fail; - xtrabackup_init_datasinks(); + backup_datasinks.init(); if (!select_history()) { goto fail; @@ -4604,7 +4681,7 @@ /* open the log file */ memset(&stat_info, 0, sizeof(MY_STAT)); - dst_log_file = ds_open(ds_redo, LOG_FILE_NAME, &stat_info); + dst_log_file = ds_open(backup_datasinks.m_redo, LOG_FILE_NAME, &stat_info); if (dst_log_file == NULL) { msg("Error: failed to open the target stream for '%s'.", LOG_FILE_NAME); @@ -4721,6 +4798,7 @@ data_threads[i].count = &count; data_threads[i].count_mutex = &count_mutex; data_threads[i].corrupted_pages = &corrupted_pages; + data_threads[i].datasinks= &backup_datasinks; data_threads[i].id = os_thread_create(data_copy_thread_func, data_threads + i); } @@ -4741,10 +4819,13 @@ datafiles_iter_free(it); } - bool ok = backup_start(corrupted_pages); + DBUG_ASSERT(backup_datasinks.m_data); + DBUG_ASSERT(backup_datasinks.m_meta); + bool ok = backup_start(backup_datasinks.m_data, + backup_datasinks.m_meta, corrupted_pages); if (ok) { - ok = xtrabackup_backup_low(); + ok = backup_datasinks.backup_low(); backup_release(); @@ -4754,12 +4835,13 @@ ); if (ok) { - backup_finish(); + backup_finish(backup_datasinks.m_data); } } if (opt_log_innodb_page_corruption) - ok = corrupted_pages.print_to_file(MB_CORRUPTED_PAGES_FILE); + ok = corrupted_pages.print_to_file(backup_datasinks.m_data, + MB_CORRUPTED_PAGES_FILE); if (!ok) { goto fail; @@ -4768,7 +4850,7 @@ if (changed_page_bitmap) { xb_page_bitmap_deinit(changed_page_bitmap); } - xtrabackup_destroy_datasinks(); + backup_datasinks.destroy(); msg("Redo log (from LSN " LSN_PF " to " LSN_PF ") was copied.", checkpoint_lsn_start, log_copy_scanned_lsn); @@ -4816,7 +4898,7 @@ It is the responsibility of the prepare phase to deal with .new, .ren, and .del files. */ -void backup_fix_ddl(CorruptedPages &corrupted_pages) +void CorruptedPages::backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta) { std::set new_tables; std::set dropped_tables; @@ -4838,7 +4920,7 @@ if (ddl_tracker.drops.find(id) != ddl_tracker.drops.end()) { dropped_tables.insert(name); - corrupted_pages.drop_space(id); + drop_space(id); continue; } @@ -4851,7 +4933,7 @@ if (new_name != name) { renamed_tables[name] = new_name; if (opt_log_innodb_page_corruption) - corrupted_pages.rename_space(id, new_name); + rename_space(id, new_name); } } @@ -4872,7 +4954,7 @@ dropped_tables.erase(name); new_tables.insert(name); if (opt_log_innodb_page_corruption) - corrupted_pages.drop_space(id); + drop_space(id); } } @@ -4881,7 +4963,8 @@ iter != renamed_tables.end(); ++iter) { const std::string old_name = iter->first; std::string new_name = iter->second; - backup_file_printf((old_name + ".ren").c_str(), "%s", new_name.c_str()); + DBUG_ASSERT(ds_data); + ds_data->backup_file_printf((old_name + ".ren").c_str(), "%s", new_name.c_str()); } // Mark tablespaces for drop @@ -4889,7 +4972,7 @@ iter != dropped_tables.end(); iter++) { const std::string name(*iter); - backup_file_printf((name + ".del").c_str(), "%s", ""); + ds_data->backup_file_printf((name + ".del").c_str(), "%s", ""); } // Load and copy new tables. @@ -4933,8 +5016,9 @@ continue; std::string dest_name(node->space->name); dest_name.append(".new"); - xtrabackup_copy_datafile(node, 0, dest_name.c_str(), wf_write_through, - corrupted_pages); + xtrabackup_copy_datafile(ds_data, ds_meta, + node, 0, dest_name.c_str(), + wf_write_through, *this); } datafiles_iter_free(it); @@ -5229,7 +5313,8 @@ ut_ad(fil_space_t::physical_size(flags) == info.page_size); if (fil_space_t::create(dest_space_name, info.space_id, flags, - FIL_TYPE_TABLESPACE, 0)) { + FIL_TYPE_TABLESPACE, 0, FIL_ENCRYPTION_DEFAULT, + true)) { *success = xb_space_create_file(real_name, info.space_id, flags, &file); } else { @@ -6048,7 +6133,7 @@ } } else - corrupted_pages.print_to_file(MB_CORRUPTED_PAGES_FILE); + corrupted_pages.print_to_file(NULL, MB_CORRUPTED_PAGES_FILE); if (ok) { msg("Last binlog file %s, position %lld", @@ -6678,6 +6763,7 @@ */ if (strcmp(argv[1], "--mysqld") == 0) { + srv_operation= SRV_OPERATION_EXPORT_RESTORED; extern int mysqld_main(int argc, char **argv); argc--; argv++; diff -Nru mariadb-10.5-10.5.19/extra/mariabackup/xtrabackup.h mariadb-10.5-10.5.21/extra/mariabackup/xtrabackup.h --- mariadb-10.5-10.5.19/extra/mariabackup/xtrabackup.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/mariabackup/xtrabackup.h 2023-06-05 16:27:56.000000000 +0000 @@ -27,6 +27,8 @@ #include "changed_page_bitmap.h" #include +#define XB_TOOL_NAME "mariadb-backup" + struct xb_delta_info_t { xb_delta_info_t(ulint page_size, ulint zip_size, ulint space_id) @@ -46,11 +48,13 @@ bool contains(ulint space_id, unsigned page_no) const; void drop_space(ulint space_id); void rename_space(ulint space_id, const std::string &new_name); - bool print_to_file(const char *file_name) const; + bool print_to_file(ds_ctxt *ds_data, const char *file_name) const; void read_from_file(const char *file_name); bool empty() const; void zero_out_free_pages(); + void backup_fix_ddl(ds_ctxt *ds_data, ds_ctxt *ds_meta); + private: void add_page_no_lock(const char *space_name, ulint space_id, unsigned page_no, bool convert_space_name); @@ -63,6 +67,7 @@ container_t m_spaces; }; + /* value of the --incremental option */ extern lsn_t incremental_lsn; @@ -71,13 +76,12 @@ extern char *xtrabackup_incremental_basedir; extern char *innobase_data_home_dir; extern char *innobase_buffer_pool_filename; +extern char *aria_log_dir_path; extern char *xb_plugin_dir; extern char *xb_rocksdb_datadir; extern my_bool xb_backup_rocksdb; extern uint opt_protocol; -extern ds_ctxt_t *ds_meta; -extern ds_ctxt_t *ds_data; /* The last checkpoint LSN at the backup startup time */ extern lsn_t checkpoint_lsn_start; @@ -177,7 +181,8 @@ extern ulong xtrabackup_innodb_force_recovery; void xtrabackup_io_throttling(void); -my_bool xb_write_delta_metadata(const char *filename, +my_bool xb_write_delta_metadata(ds_ctxt *ds_meta, + const char *filename, const xb_delta_info_t *info); /************************************************************************ diff -Nru mariadb-10.5-10.5.19/extra/wolfssl/CMakeLists.txt mariadb-10.5-10.5.21/extra/wolfssl/CMakeLists.txt --- mariadb-10.5-10.5.19/extra/wolfssl/CMakeLists.txt 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/extra/wolfssl/CMakeLists.txt 2023-06-05 16:27:56.000000000 +0000 @@ -12,6 +12,9 @@ SET(WOLFSSL_X86_64_BUILD 1) SET(HAVE_INTEL_RDSEED 1) SET(HAVE_INTEL_RDRAND 1) +ELSEIF(CMAKE_ASM_COMPILER_ID MATCHES "Clang" AND CMAKE_VERSION VERSION_LESS 3.16) + + # WolfSSL 5.5.4 bug workaround below does not work, due to some CMake bug ELSEIF(CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64|amd64") SET(WOLFSSL_X86_64_BUILD 1) IF(CMAKE_C_COMPILER_ID MATCHES GNU AND CMAKE_C_COMPILER_VERSION VERSION_LESS 4.9) diff -Nru mariadb-10.5-10.5.19/include/CMakeLists.txt mariadb-10.5-10.5.21/include/CMakeLists.txt --- mariadb-10.5-10.5.19/include/CMakeLists.txt 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/CMakeLists.txt 2023-06-05 16:27:56.000000000 +0000 @@ -37,6 +37,7 @@ ma_dyncol.h my_list.h my_alloc.h + my_alloca.h typelib.h my_dbug.h m_string.h @@ -111,7 +112,9 @@ ENDMACRO() INSTALL_COMPAT_HEADER(my_global.h "") +INSTALL_COMPAT_HEADER(my_alloca.h "") INSTALL_COMPAT_HEADER(my_config.h "") +INSTALL_COMPAT_HEADER(my_alloca.h "") INSTALL_COMPAT_HEADER(my_sys.h "") INSTALL_COMPAT_HEADER(mysql_version.h " #include diff -Nru mariadb-10.5-10.5.19/include/ilist.h mariadb-10.5-10.5.21/include/ilist.h --- mariadb-10.5-10.5.19/include/ilist.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/ilist.h 2023-06-05 16:27:56.000000000 +0000 @@ -27,12 +27,11 @@ // Derive your class from this struct to insert to a linked list. template struct ilist_node { - ilist_node() noexcept #ifndef DBUG_OFF - : next(NULL), prev(NULL) + ilist_node() noexcept : next(NULL), prev(NULL) {} +#else + ilist_node() = default; #endif - { - } ilist_node(ilist_node *next, ilist_node *prev) noexcept : next(next), prev(prev) diff -Nru mariadb-10.5-10.5.19/include/m_ctype.h mariadb-10.5-10.5.21/include/m_ctype.h --- mariadb-10.5-10.5.19/include/m_ctype.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/m_ctype.h 2023-06-05 16:27:56.000000000 +0000 @@ -267,6 +267,28 @@ #define MY_STRXFRM_REVERSE_LEVEL6 0x00200000 /* if reverse order for level6 */ #define MY_STRXFRM_REVERSE_SHIFT 16 +/* Flags to strnncollsp_nchars */ +/* + MY_STRNNCOLLSP_NCHARS_EMULATE_TRIMMED_TRAILING_SPACES - + defines if inside strnncollsp_nchars() + short strings should be virtually extended to "nchars" + characters by emulating trimmed trailing spaces. + + This flag is needed when comparing packed strings of the CHAR + data type, when trailing spaces are trimmed on storage (like in InnoDB), + however the actual values (after unpacking) will have those trailing + spaces. + + If this flag is passed, strnncollsp_nchars() performs both + truncating longer strings and extending shorter strings + to exactly "nchars". + + If this flag is not passed, strnncollsp_nchars() only truncates longer + strings to "nchars", but does not extend shorter strings to "nchars". +*/ +#define MY_STRNNCOLLSP_NCHARS_EMULATE_TRIMMED_TRAILING_SPACES 1 + + /* Collation IDs for MariaDB that should not conflict with MySQL. We reserve 256..511, because MySQL will most likely use this range @@ -402,7 +424,8 @@ int (*strnncollsp_nchars)(CHARSET_INFO *, const uchar *str1, size_t len1, const uchar *str2, size_t len2, - size_t nchars); + size_t nchars, + uint flags); size_t (*strnxfrm)(CHARSET_INFO *, uchar *dst, size_t dstlen, uint nweights, const uchar *src, size_t srclen, uint flags); diff -Nru mariadb-10.5-10.5.19/include/m_string.h mariadb-10.5-10.5.21/include/m_string.h --- mariadb-10.5-10.5.19/include/m_string.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/m_string.h 2023-06-05 16:27:56.000000000 +0000 @@ -199,9 +199,22 @@ #include -#define STRING_WITH_LEN(X) (X), ((size_t) (sizeof(X) - 1)) -#define USTRING_WITH_LEN(X) ((uchar*) X), ((size_t) (sizeof(X) - 1)) -#define C_STRING_WITH_LEN(X) ((char *) (X)), ((size_t) (sizeof(X) - 1)) +#ifdef __cplusplus +#include +template inline const char *_swl_check(T s) +{ + static_assert(std::is_same::value + || std::is_same::value, + "Wrong argument for STRING_WITH_LEN()"); + return s; +} +#define STRING_WITH_LEN(X) _swl_check(X), ((size_t) (sizeof(X) - 1)) +#else +#define STRING_WITH_LEN(X) (X ""), ((size_t) (sizeof(X) - 1)) +#endif + +#define USTRING_WITH_LEN(X) (uchar*) STRING_WITH_LEN(X) +#define C_STRING_WITH_LEN(X) (char *) STRING_WITH_LEN(X) #define LEX_STRING_WITH_LEN(X) (X).str, (X).length typedef struct st_mysql_const_lex_string LEX_CSTRING; diff -Nru mariadb-10.5-10.5.19/include/my_alloca.h mariadb-10.5-10.5.21/include/my_alloca.h --- mariadb-10.5-10.5.19/include/my_alloca.h 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.5-10.5.21/include/my_alloca.h 2023-06-05 16:27:56.000000000 +0000 @@ -0,0 +1,47 @@ +/* Copyright (c) 2023, MariaDB Corporation. + + 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 + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA */ + +#ifndef MY_ALLOCA_INCLUDED +#define MY_ALLOCA_INCLUDED + +#ifdef _WIN32 +#include /*for alloca*/ +/* + MSVC may define "alloca" when compiling in /Ze mode + (with extensions from Microsoft), but otherwise only + the _alloca function is defined: +*/ +#ifndef alloca +#define alloca _alloca +#endif +#else +#ifdef HAVE_ALLOCA_H +#include +#endif +#endif + +#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) +#pragma alloca +#endif /* _AIX */ + +/* + If the GCC/LLVM compiler from the MinGW is used, + alloca may not be defined when using the MSVC CRT: +*/ +#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && !defined(alloca) +#define alloca __builtin_alloca +#endif /* GNUC */ + +#endif /* MY_ALLOCA_INCLUDED */ diff -Nru mariadb-10.5-10.5.19/include/my_atomic_wrapper.h mariadb-10.5-10.5.21/include/my_atomic_wrapper.h --- mariadb-10.5-10.5.19/include/my_atomic_wrapper.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/my_atomic_wrapper.h 2023-06-05 16:27:56.000000000 +0000 @@ -39,7 +39,7 @@ Atomic_relaxed(const Atomic_relaxed &rhs) { m.store(rhs, std::memory_order_relaxed); } Atomic_relaxed(Type val) : m(val) {} - Atomic_relaxed() {} + Atomic_relaxed() = default; Type load(std::memory_order o= std::memory_order_relaxed) const { return m.load(o); } diff -Nru mariadb-10.5-10.5.19/include/my_counter.h mariadb-10.5-10.5.21/include/my_counter.h --- mariadb-10.5-10.5.19/include/my_counter.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/my_counter.h 2023-06-05 16:27:56.000000000 +0000 @@ -31,7 +31,7 @@ Atomic_counter(const Atomic_counter &rhs) { m_counter.store(rhs, std::memory_order_relaxed); } Atomic_counter(Type val): m_counter(val) {} - Atomic_counter() {} + Atomic_counter() = default; Type operator++(int) { return add(1); } Type operator--(int) { return sub(1); } diff -Nru mariadb-10.5-10.5.19/include/my_global.h mariadb-10.5-10.5.21/include/my_global.h --- mariadb-10.5-10.5.19/include/my_global.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/my_global.h 2023-06-05 16:27:56.000000000 +0000 @@ -318,13 +318,6 @@ #ifdef HAVE_UNISTD_H #include #endif -#if defined(__cplusplus) && defined(NO_CPLUSPLUS_ALLOCA) -#undef HAVE_ALLOCA -#undef HAVE_ALLOCA_H -#endif -#ifdef HAVE_ALLOCA_H -#include -#endif #include /* Recommended by debian */ /* We need the following to go around a problem with openssl on solaris */ @@ -481,6 +474,7 @@ #endif #include +#include /* Wen using the embedded library, users might run into link problems, diff -Nru mariadb-10.5-10.5.19/include/my_sys.h mariadb-10.5-10.5.21/include/my_sys.h --- mariadb-10.5-10.5.19/include/my_sys.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/my_sys.h 2023-06-05 16:27:56.000000000 +0000 @@ -28,9 +28,7 @@ #include /* for CHARSET_INFO */ #include #include -#ifdef _WIN32 -#include /*for alloca*/ -#endif +#include #include #include @@ -185,16 +183,6 @@ extern my_bool my_may_have_atomic_write; #if defined(HAVE_ALLOCA) && !defined(HAVE_valgrind) -#if defined(_AIX) && !defined(__GNUC__) && !defined(_AIX43) -#pragma alloca -#endif /* _AIX */ -#if defined(__MWERKS__) -#undef alloca -#define alloca _alloca -#endif /* __MWERKS__ */ -#if defined(__GNUC__) && !defined(HAVE_ALLOCA_H) && ! defined(alloca) -#define alloca __builtin_alloca -#endif /* GNUC */ #define my_alloca(SZ) alloca((size_t) (SZ)) #define my_afree(PTR) ((void)0) #define MAX_ALLOCA_SZ 4096 diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_file.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_file.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_file.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_file.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_idle.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_idle.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_idle.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_idle.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2022, Oracle and/or its affiliates +/* Copyright (c) 2011, 2023, Oracle and/or its affiliates Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_mdl.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_mdl.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_mdl.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_mdl.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2012, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_memory.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_memory.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_memory.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_memory.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2012, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2012, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_ps.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_ps.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_ps.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_ps.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2014, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2014, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_socket.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_socket.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_socket.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_socket.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2023, Oracle and/or its affiliates. Copyright (c) 2017, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_sp.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_sp.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_sp.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_sp.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_stage.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_stage.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_stage.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_stage.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_statement.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_statement.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_statement.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_statement.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2010, 2023, Oracle and/or its affiliates. Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_table.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_table.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_table.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_table.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2010, 2021, Oracle and/or its affiliates. All rights reserved. +/* Copyright (c) 2010, 2023, Oracle and/or its affiliates. All rights reserved. Copyright (c) 2017, 2019, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_thread.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_thread.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_thread.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_thread.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. Copyright (c) 2020, MariaDB Corporation. This program is free software; you can redistribute it and/or modify diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/mysql_transaction.h mariadb-10.5-10.5.21/include/mysql/psi/mysql_transaction.h --- mariadb-10.5-10.5.19/include/mysql/psi/mysql_transaction.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/mysql_transaction.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/psi.h mariadb-10.5-10.5.21/include/mysql/psi/psi.h --- mariadb-10.5-10.5.19/include/mysql/psi/psi.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/psi.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/psi_abi_v0.h mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v0.h --- mariadb-10.5-10.5.19/include/mysql/psi/psi_abi_v0.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v0.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2011, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2011, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/psi_abi_v1.h mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v1.h --- mariadb-10.5-10.5.19/include/mysql/psi/psi_abi_v1.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v1.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/psi_abi_v2.h mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v2.h --- mariadb-10.5-10.5.19/include/mysql/psi/psi_abi_v2.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/psi_abi_v2.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/psi_base.h mariadb-10.5-10.5.21/include/mysql/psi/psi_base.h --- mariadb-10.5-10.5.19/include/mysql/psi/psi_base.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/psi_base.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2008, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2008, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/psi/psi_memory.h mariadb-10.5-10.5.21/include/mysql/psi/psi_memory.h --- mariadb-10.5-10.5.19/include/mysql/psi/psi_memory.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/psi/psi_memory.h 2023-06-05 16:27:56.000000000 +0000 @@ -1,4 +1,4 @@ -/* Copyright (c) 2013, 2022, Oracle and/or its affiliates. +/* Copyright (c) 2013, 2023, Oracle and/or its affiliates. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2.0, diff -Nru mariadb-10.5-10.5.19/include/mysql/service_encryption.h mariadb-10.5-10.5.21/include/mysql/service_encryption.h --- mariadb-10.5-10.5.19/include/mysql/service_encryption.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/mysql/service_encryption.h 2023-06-05 16:27:56.000000000 +0000 @@ -24,22 +24,17 @@ *provider* (encryption plugin). */ -#ifdef __cplusplus -extern "C" { -#endif - #ifndef MYSQL_ABI_CHECK +#include #ifdef _WIN32 -#include #ifndef __cplusplus #define inline __inline #endif -#else -#include -#ifdef HAVE_ALLOCA_H -#include #endif #endif + +#ifdef __cplusplus +extern "C" { #endif /* returned from encryption_key_get_latest_version() */ diff -Nru mariadb-10.5-10.5.19/include/source_revision.h mariadb-10.5-10.5.21/include/source_revision.h --- mariadb-10.5-10.5.19/include/source_revision.h 2023-01-30 20:31:38.000000000 +0000 +++ mariadb-10.5-10.5.21/include/source_revision.h 2023-06-05 16:28:05.000000000 +0000 @@ -1 +1 @@ -#define SOURCE_REVISION "f8a85af8ca1c937b8d4f847477bd282f80251cde" +#define SOURCE_REVISION "bed70468ea08c2820647f5e3ac006a9ff88144ac" diff -Nru mariadb-10.5-10.5.19/include/span.h mariadb-10.5-10.5.21/include/span.h --- mariadb-10.5-10.5.19/include/span.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/span.h 2023-06-05 16:27:56.000000000 +0000 @@ -81,7 +81,7 @@ span(const span &other) : data_(other.data_), size_(other.size_) {} - ~span(){}; + ~span() = default; span &operator=(const span &other) { diff -Nru mariadb-10.5-10.5.19/include/ssl_compat.h mariadb-10.5-10.5.21/include/ssl_compat.h --- mariadb-10.5-10.5.19/include/ssl_compat.h 2023-01-30 20:31:34.000000000 +0000 +++ mariadb-10.5-10.5.21/include/ssl_compat.h 2023-06-05 16:27:56.000000000 +0000 @@ -19,7 +19,8 @@ /* OpenSSL version specific definitions */ #if defined(OPENSSL_VERSION_NUMBER) -#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER) +#if OPENSSL_VERSION_NUMBER >= 0x10100000L && \ + !(defined(LIBRESSL_VERSION_NUMBER) && LIBRESSL_VERSION_NUMBER < 0x30500000L) #define HAVE_OPENSSL11 1 #define SSL_LIBRARY OpenSSL_version(OPENSSL_VERSION) #define ERR_remove_state(X) ERR_clear_error() diff -Nru mariadb-10.5-10.5.19/libmariadb/.travis.yml mariadb-10.5-10.5.21/libmariadb/.travis.yml --- mariadb-10.5-10.5.19/libmariadb/.travis.yml 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/.travis.yml 2023-06-05 16:28:03.000000000 +0000 @@ -36,38 +36,27 @@ jobs: fast_finish: true allow_failures: - - env: srv=build v=10.6 - - env: srv=mariadb v=10.5 - os: windows - language: shell + - env: srv=mysql v=5.7 native=1 + - env: srv=mysql v=8.0 native=1 include: - - env: srv=mariadb v=10.5 + - env: srv=mariadb v=10.11 os: windows language: shell - - env: srv=mariadb v=10.3 local=1 - dist: bionic - env: srv=mariadb v=10.4 local=1 - env: srv=mariadb v=10.5 local=1 - env: srv=mariadb v=10.6 local=1 + - env: srv=mariadb v=10.11 local=1 - if: type = push AND fork = false env: srv=mariadb-es v=10.5 - if: type = push AND fork = false env: srv=maxscale - - if: type = push AND fork = false - env: srv=build v=10.6 - env: srv=mysql v=5.7 native=1 - env: srv=mysql v=8.0 native=1 - if: type = push AND fork = false env: srv=skysql - if: type = push AND fork = false env: srv=skysql-ha - - env: server_branch=10.3 - - env: server_branch=10.3 TEST_OPTION=--ps-protocol - - env: server_branch=10.4 - - env: server_branch=10.4 TEST_OPTION=--ps-protocol - env: server_branch=10.5 - env: server_branch=10.5 TEST_OPTION=--ps-protocol - - env: server_branch=10.6 - - env: server_branch=10.6 TEST_OPTION=--ps-protocol script: ./travis.sh diff -Nru mariadb-10.5-10.5.19/libmariadb/CMakeLists.txt mariadb-10.5-10.5.21/libmariadb/CMakeLists.txt --- mariadb-10.5-10.5.19/libmariadb/CMakeLists.txt 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/CMakeLists.txt 2023-06-05 16:28:03.000000000 +0000 @@ -4,6 +4,7 @@ CMAKE_MINIMUM_REQUIRED(VERSION 2.8.12 FATAL_ERROR) INCLUDE(CheckFunctionExists) +INCLUDE(FeatureSummary) IF(COMMAND CMAKE_POLICY) SET(NEW_POLICIES CMP0003 CMP0022 CMP0023 CMP0057 CMP0077 CMP0069 CMP0075) FOREACH(TYPE OLD NEW) @@ -36,7 +37,7 @@ SET(CPACK_PACKAGE_VERSION_MAJOR 3) SET(CPACK_PACKAGE_VERSION_MINOR 1) -SET(CPACK_PACKAGE_VERSION_PATCH 20) +SET(CPACK_PACKAGE_VERSION_PATCH 21) SET(CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}") MATH(EXPR MARIADB_PACKAGE_VERSION_ID "${CPACK_PACKAGE_VERSION_MAJOR} * 10000 + ${CPACK_PACKAGE_VERSION_MINOR} * 100 + @@ -172,7 +173,7 @@ ELSE() SET(MARIADB_CLIENT_VERSION_MAJOR "10") SET(MARIADB_CLIENT_VERSION_MINOR "5") - SET(MARIADB_CLIENT_VERSION_PATCH "19") + SET(MARIADB_CLIENT_VERSION_PATCH "20") SET(MARIADB_CLIENT_VERSION_EXTRA "") ENDIF() SET(MARIADB_CLIENT_VERSION "${MARIADB_CLIENT_VERSION_MAJOR}.${MARIADB_CLIENT_VERSION_MINOR}.${MARIADB_CLIENT_VERSION_PATCH}${MARIADB_CLIENT_VERSION_EXTRA}") @@ -188,6 +189,8 @@ SET(MARIADB_UNIX_ADDR "/tmp/mysql.sock") ENDIF() +SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CC_SOURCE_DIR}/cmake) + INCLUDE("${CC_SOURCE_DIR}/cmake/install.cmake") IF(NOT PLUGINDIR) SET(PLUGINDIR "${CMAKE_INSTALL_PREFIX}/${INSTALL_PLUGINDIR}") @@ -216,11 +219,11 @@ ENDIF() # check for various include files -INCLUDE(${CC_SOURCE_DIR}/cmake/CheckIncludeFiles.cmake) +INCLUDE(${CC_SOURCE_DIR}/cmake/check_include_files.cmake) # check for various functions -INCLUDE(${CC_SOURCE_DIR}/cmake/CheckFunctions.cmake) +INCLUDE(${CC_SOURCE_DIR}/cmake/check_functions.cmake) # check for various types -INCLUDE(${CC_SOURCE_DIR}/cmake/CheckTypes.cmake) +INCLUDE(${CC_SOURCE_DIR}/cmake/check_types.cmake) IF(UNIX) SEARCH_LIBRARY(LIBM floor m) @@ -387,7 +390,8 @@ ENDIF() IF(NOT WIN32) IF(NOT AUTH_GSSAPI_PLUGIN_TYPE MATCHES "OFF") - INCLUDE(${CC_SOURCE_DIR}/cmake/FindGSSAPI.cmake) + FIND_PACKAGE(GSSAPI) + SET_PACKAGE_PROPERTIES(GSSAPI PROPERTIES TYPE OPTIONAL) IF(GSSAPI_FOUND) INCLUDE_DIRECTORIES(${GSSAPI_INCS}) IF(AUTH_GSSAPI_PLUGIN_TYPE MATCHES "STATIC") diff -Nru mariadb-10.5-10.5.19/libmariadb/cmake/CheckFunctions.cmake mariadb-10.5-10.5.21/libmariadb/cmake/CheckFunctions.cmake --- mariadb-10.5-10.5.19/libmariadb/cmake/CheckFunctions.cmake 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/cmake/CheckFunctions.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,30 +0,0 @@ -# -# Copyright (C) 2013-2016 MariaDB Corporation AB -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# For details see the COPYING-CMAKE-SCRIPTS file. -# - -# This file is included by CMakeLists.txt and -# checks for various functions. -# You will find the appropriate defines in -# include/my_config.h.in - -INCLUDE(CheckFunctionExists) - -CHECK_FUNCTION_EXISTS (alloca HAVE_ALLOCA) -CHECK_FUNCTION_EXISTS (dlerror HAVE_DLERROR) -CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN) -CHECK_FUNCTION_EXISTS (fcntl HAVE_FCNTL) -CHECK_FUNCTION_EXISTS (memcpy HAVE_MEMCPY) -CHECK_FUNCTION_EXISTS (nl_langinfo HAVE_NL_LANGINFO) -CHECK_FUNCTION_EXISTS (setlocale HAVE_SETLOCALE) -CHECK_FUNCTION_EXISTS (poll HAVE_POLL) -CHECK_FUNCTION_EXISTS (getpwuid HAVE_GETPWUID) - -IF(HAVE_FILE_UCONTEXT_H) - CHECK_FUNCTION_EXISTS (makecontext HAVE_UCONTEXT_H) -ENDIF() - -CHECK_FUNCTION_EXISTS (cuserid HAVE_CUSERID) \ No newline at end of file diff -Nru mariadb-10.5-10.5.19/libmariadb/cmake/CheckIncludeFiles.cmake mariadb-10.5-10.5.21/libmariadb/cmake/CheckIncludeFiles.cmake --- mariadb-10.5-10.5.19/libmariadb/cmake/CheckIncludeFiles.cmake 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/cmake/CheckIncludeFiles.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -# -# Copyright (C) 2013-2016 MariaDB Corporation AB -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# For details see the COPYING-CMAKE-SCRIPTS file. -# -# This file is included by CMakeLists.txt and -# checks for various header files. -# You will find the appropriate defines in -# include/my_config.h.in - -INCLUDE(CheckIncludeFiles) - -CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H) -CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H) -CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H) -CHECK_INCLUDE_FILES (fcntl.h HAVE_FCNTL_H) -CHECK_INCLUDE_FILES (float.h HAVE_FLOAT_H) -CHECK_INCLUDE_FILES (limits.h HAVE_LIMITS_H) -CHECK_INCLUDE_FILES (linux/limits.h HAVE_LINUX_LIMITS_H) -CHECK_INCLUDE_FILES (pwd.h HAVE_PWD_H) -CHECK_INCLUDE_FILES (sched.h HAVE_SCHED_H) -CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H) - -CHECK_INCLUDE_FILES (signal.h INCLUDE_SIGNAL) -IF(INCLUDE_SIGNAL) - SET(HAVE_SIGNAL 1) - SET(CMAKE_EXTRA_INCLUDE_FILES signal.h) -ENDIF(INCLUDE_SIGNAL) - -CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H) - -CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H) -IF(HAVE_STDINT_H) - SET(CMAKE_EXTRA_INCLUDE_FILES stdint.h) -ENDIF(HAVE_STDINT_H) - -CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H) -CHECK_INCLUDE_FILES (string.h HAVE_STRING_H) -CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H) - -CHECK_INCLUDE_FILES (sys/ioctl.h HAVE_SYS_IOCTL_H) -CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H) -CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H) -CHECK_INCLUDE_FILES (sys/types.h HAVE_SYS_TYPES_H) -CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H) -CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H) -CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H) -CHECK_INCLUDE_FILES (utime.h HAVE_UTIME_H) - -IF(APPLE) - SET(CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE=600) -ENDIF() -CHECK_INCLUDE_FILES (ucontext.h HAVE_FILE_UCONTEXT_H) -IF(NOT HAVE_FILE_UCONTEXT_H) - CHECK_INCLUDE_FILES (sys/ucontext.h HAVE_FILE_UCONTEXT_H) -ENDIF() diff -Nru mariadb-10.5-10.5.19/libmariadb/cmake/CheckTypes.cmake mariadb-10.5-10.5.21/libmariadb/cmake/CheckTypes.cmake --- mariadb-10.5-10.5.19/libmariadb/cmake/CheckTypes.cmake 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/cmake/CheckTypes.cmake 1970-01-01 00:00:00.000000000 +0000 @@ -1,63 +0,0 @@ -# -# Copyright (C) 2013-2016 MariaDB Corporation AB -# -# Redistribution and use is allowed according to the terms of the New -# BSD license. -# For details see the COPYING-CMAKE-SCRIPTS file. -# -# This file is included by CMakeLists.txt and -# checks for type sizes. -# You will find the appropriate defines in -# include/my_config.h.in -INCLUDE (CheckTypeSize) - -SET(CMAKE_EXTRA_INCLUDE_FILES signal.h) - -CHECK_TYPE_SIZE("char *" SIZEOF_CHARP) -CHECK_TYPE_SIZE(int SIZEOF_INT) -CHECK_TYPE_SIZE(long SIZEOF_LONG) -CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG) -SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h) -CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T) -SET(CMAKE_EXTRA_INCLUDE_FILES sys/types.h) -CHECK_TYPE_SIZE(uchar SIZEOF_UCHAR) -CHECK_TYPE_SIZE(uint SIZEOF_UINT) -CHECK_TYPE_SIZE(uint SIZEOF_USHORT) -CHECK_TYPE_SIZE(ulong SIZEOF_ULONG) -CHECK_TYPE_SIZE(int8 SIZEOF_INT8) -CHECK_TYPE_SIZE(uint8 SIZEOF_UINT8) -CHECK_TYPE_SIZE(int16 SIZEOF_INT16) -CHECK_TYPE_SIZE(uint16 SIZEOF_UINT16) -CHECK_TYPE_SIZE(int32 SIZEOF_INT32) -CHECK_TYPE_SIZE(uint32 SIZEOF_UINT32) -CHECK_TYPE_SIZE(int64 SIZEOF_INT64) -CHECK_TYPE_SIZE(uint64 SIZEOF_UINT64) -CHECK_TYPE_SIZE(socklen_t SIZEOF_SOCKLEN_T) - -# -# Compile testing -# -INCLUDE (CheckCSourceCompiles) - -# -# SOCKET_SIZE -# -IF(WIN32) - SET(SOCKET_SIZE_TYPE int) -ELSE(WIN32) - FOREACH(CHECK_TYPE "socklen_t" "size_t" "int") - IF (NOT SOCKET_SIZE_TYPE) - CHECK_C_SOURCE_COMPILES(" - #include - int main(int argc, char **argv) - { - getsockname(0, 0, (${CHECK_TYPE} *)0); - return 0; - }" - SOCKET_SIZE_FOUND_${CHECK_TYPE}) - IF(SOCKET_SIZE_FOUND_${CHECK_TYPE}) - SET(SOCKET_SIZE_TYPE ${CHECK_TYPE}) - ENDIF(SOCKET_SIZE_FOUND_${CHECK_TYPE}) - ENDIF (NOT SOCKET_SIZE_TYPE) - ENDFOREACH() -ENDIF(WIN32) diff -Nru mariadb-10.5-10.5.19/libmariadb/cmake/check_functions.cmake mariadb-10.5-10.5.21/libmariadb/cmake/check_functions.cmake --- mariadb-10.5-10.5.19/libmariadb/cmake/check_functions.cmake 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/cmake/check_functions.cmake 2023-06-05 16:28:03.000000000 +0000 @@ -0,0 +1,30 @@ +# +# Copyright (C) 2013-2016 MariaDB Corporation AB +# +# Redistribution and use is allowed according to the terms of the New +# BSD license. +# For details see the COPYING-CMAKE-SCRIPTS file. +# + +# This file is included by CMakeLists.txt and +# checks for various functions. +# You will find the appropriate defines in +# include/my_config.h.in + +INCLUDE(CheckFunctionExists) + +CHECK_FUNCTION_EXISTS (alloca HAVE_ALLOCA) +CHECK_FUNCTION_EXISTS (dlerror HAVE_DLERROR) +CHECK_FUNCTION_EXISTS (dlopen HAVE_DLOPEN) +CHECK_FUNCTION_EXISTS (fcntl HAVE_FCNTL) +CHECK_FUNCTION_EXISTS (memcpy HAVE_MEMCPY) +CHECK_FUNCTION_EXISTS (nl_langinfo HAVE_NL_LANGINFO) +CHECK_FUNCTION_EXISTS (setlocale HAVE_SETLOCALE) +CHECK_FUNCTION_EXISTS (poll HAVE_POLL) +CHECK_FUNCTION_EXISTS (getpwuid HAVE_GETPWUID) + +IF(HAVE_FILE_UCONTEXT_H) + CHECK_FUNCTION_EXISTS (makecontext HAVE_UCONTEXT_H) +ENDIF() + +CHECK_FUNCTION_EXISTS (cuserid HAVE_CUSERID) \ No newline at end of file diff -Nru mariadb-10.5-10.5.19/libmariadb/cmake/check_include_files.cmake mariadb-10.5-10.5.21/libmariadb/cmake/check_include_files.cmake --- mariadb-10.5-10.5.19/libmariadb/cmake/check_include_files.cmake 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/cmake/check_include_files.cmake 2023-06-05 16:28:03.000000000 +0000 @@ -0,0 +1,58 @@ +# +# Copyright (C) 2013-2016 MariaDB Corporation AB +# +# Redistribution and use is allowed according to the terms of the New +# BSD license. +# For details see the COPYING-CMAKE-SCRIPTS file. +# +# This file is included by CMakeLists.txt and +# checks for various header files. +# You will find the appropriate defines in +# include/my_config.h.in + +INCLUDE(CheckIncludeFiles) + +CHECK_INCLUDE_FILES (alloca.h HAVE_ALLOCA_H) +CHECK_INCLUDE_FILES (arpa/inet.h HAVE_ARPA_INET_H) +CHECK_INCLUDE_FILES (dlfcn.h HAVE_DLFCN_H) +CHECK_INCLUDE_FILES (fcntl.h HAVE_FCNTL_H) +CHECK_INCLUDE_FILES (float.h HAVE_FLOAT_H) +CHECK_INCLUDE_FILES (limits.h HAVE_LIMITS_H) +CHECK_INCLUDE_FILES (linux/limits.h HAVE_LINUX_LIMITS_H) +CHECK_INCLUDE_FILES (pwd.h HAVE_PWD_H) +CHECK_INCLUDE_FILES (sched.h HAVE_SCHED_H) +CHECK_INCLUDE_FILES (select.h HAVE_SELECT_H) + +CHECK_INCLUDE_FILES (signal.h INCLUDE_SIGNAL) +IF(INCLUDE_SIGNAL) + SET(HAVE_SIGNAL 1) + SET(CMAKE_EXTRA_INCLUDE_FILES signal.h) +ENDIF(INCLUDE_SIGNAL) + +CHECK_INCLUDE_FILES (stddef.h HAVE_STDDEF_H) + +CHECK_INCLUDE_FILES (stdint.h HAVE_STDINT_H) +IF(HAVE_STDINT_H) + SET(CMAKE_EXTRA_INCLUDE_FILES stdint.h) +ENDIF(HAVE_STDINT_H) + +CHECK_INCLUDE_FILES (stdlib.h HAVE_STDLIB_H) +CHECK_INCLUDE_FILES (string.h HAVE_STRING_H) +CHECK_INCLUDE_FILES (strings.h HAVE_STRINGS_H) + +CHECK_INCLUDE_FILES (sys/ioctl.h HAVE_SYS_IOCTL_H) +CHECK_INCLUDE_FILES (sys/select.h HAVE_SYS_SELECT_H) +CHECK_INCLUDE_FILES (sys/socket.h HAVE_SYS_SOCKET_H) +CHECK_INCLUDE_FILES (sys/types.h HAVE_SYS_TYPES_H) +CHECK_INCLUDE_FILES (sys/stat.h HAVE_SYS_STAT_H) +CHECK_INCLUDE_FILES (sys/un.h HAVE_SYS_UN_H) +CHECK_INCLUDE_FILES (unistd.h HAVE_UNISTD_H) +CHECK_INCLUDE_FILES (utime.h HAVE_UTIME_H) + +IF(APPLE) + SET(CMAKE_REQUIRED_DEFINITIONS -D_XOPEN_SOURCE=600) +ENDIF() +CHECK_INCLUDE_FILES (ucontext.h HAVE_FILE_UCONTEXT_H) +IF(NOT HAVE_FILE_UCONTEXT_H) + CHECK_INCLUDE_FILES (sys/ucontext.h HAVE_FILE_UCONTEXT_H) +ENDIF() diff -Nru mariadb-10.5-10.5.19/libmariadb/cmake/check_types.cmake mariadb-10.5-10.5.21/libmariadb/cmake/check_types.cmake --- mariadb-10.5-10.5.19/libmariadb/cmake/check_types.cmake 1970-01-01 00:00:00.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/cmake/check_types.cmake 2023-06-05 16:28:03.000000000 +0000 @@ -0,0 +1,63 @@ +# +# Copyright (C) 2013-2016 MariaDB Corporation AB +# +# Redistribution and use is allowed according to the terms of the New +# BSD license. +# For details see the COPYING-CMAKE-SCRIPTS file. +# +# This file is included by CMakeLists.txt and +# checks for type sizes. +# You will find the appropriate defines in +# include/my_config.h.in +INCLUDE (CheckTypeSize) + +SET(CMAKE_EXTRA_INCLUDE_FILES signal.h) + +CHECK_TYPE_SIZE("char *" SIZEOF_CHARP) +CHECK_TYPE_SIZE(int SIZEOF_INT) +CHECK_TYPE_SIZE(long SIZEOF_LONG) +CHECK_TYPE_SIZE("long long" SIZEOF_LONG_LONG) +SET(CMAKE_EXTRA_INCLUDE_FILES stdio.h) +CHECK_TYPE_SIZE(size_t SIZEOF_SIZE_T) +SET(CMAKE_EXTRA_INCLUDE_FILES sys/types.h) +CHECK_TYPE_SIZE(uchar SIZEOF_UCHAR) +CHECK_TYPE_SIZE(uint SIZEOF_UINT) +CHECK_TYPE_SIZE(uint SIZEOF_USHORT) +CHECK_TYPE_SIZE(ulong SIZEOF_ULONG) +CHECK_TYPE_SIZE(int8 SIZEOF_INT8) +CHECK_TYPE_SIZE(uint8 SIZEOF_UINT8) +CHECK_TYPE_SIZE(int16 SIZEOF_INT16) +CHECK_TYPE_SIZE(uint16 SIZEOF_UINT16) +CHECK_TYPE_SIZE(int32 SIZEOF_INT32) +CHECK_TYPE_SIZE(uint32 SIZEOF_UINT32) +CHECK_TYPE_SIZE(int64 SIZEOF_INT64) +CHECK_TYPE_SIZE(uint64 SIZEOF_UINT64) +CHECK_TYPE_SIZE(socklen_t SIZEOF_SOCKLEN_T) + +# +# Compile testing +# +INCLUDE (CheckCSourceCompiles) + +# +# SOCKET_SIZE +# +IF(WIN32) + SET(SOCKET_SIZE_TYPE int) +ELSE(WIN32) + FOREACH(CHECK_TYPE "socklen_t" "size_t" "int") + IF (NOT SOCKET_SIZE_TYPE) + CHECK_C_SOURCE_COMPILES(" + #include + int main(int argc, char **argv) + { + getsockname(0, 0, (${CHECK_TYPE} *)0); + return 0; + }" + SOCKET_SIZE_FOUND_${CHECK_TYPE}) + IF(SOCKET_SIZE_FOUND_${CHECK_TYPE}) + SET(SOCKET_SIZE_TYPE ${CHECK_TYPE}) + ENDIF(SOCKET_SIZE_FOUND_${CHECK_TYPE}) + ENDIF (NOT SOCKET_SIZE_TYPE) + ENDFOREACH() +ENDIF(WIN32) diff -Nru mariadb-10.5-10.5.19/libmariadb/include/errmsg.h mariadb-10.5-10.5.21/libmariadb/include/errmsg.h --- mariadb-10.5-10.5.19/libmariadb/include/errmsg.h 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/include/errmsg.h 2023-06-05 16:28:03.000000000 +0000 @@ -108,8 +108,8 @@ #define CR_MARIADB_LAST_ERROR CR_ERR_NET_UNCOMPRESS #endif -#define IS_MYSQL_ERROR(code) ((code) > CR_MIN_ERROR && (code) < CR_MYSQL_LAST_ERROR) -#define IS_MARIADB_ERROR(code) ((code) > CER_MIN_ERROR && (code) < CR_MARIADB_LAST_ERROR) +#define IS_MYSQL_ERROR(code) ((code) > CR_MIN_ERROR && (code) <= CR_MYSQL_LAST_ERROR) +#define IS_MARIADB_ERROR(code) ((code) > CER_MIN_ERROR && (code) <= CR_MARIADB_LAST_ERROR) #define ER(code) IS_MYSQL_ERROR((code)) ? client_errors[(code) - CR_MIN_ERROR] : \ IS_MARIADB_ERROR((code)) ? mariadb_client_errors[(code) - CER_MIN_ERROR] : \ diff -Nru mariadb-10.5-10.5.19/libmariadb/include/mariadb_stmt.h mariadb-10.5-10.5.21/libmariadb/include/mariadb_stmt.h --- mariadb-10.5-10.5.19/libmariadb/include/mariadb_stmt.h 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/include/mariadb_stmt.h 2023-06-05 16:28:03.000000000 +0000 @@ -34,9 +34,6 @@ ((stmt)->mysql->extension->mariadb_server_capabilities & \ (MARIADB_CLIENT_STMT_BULK_OPERATIONS >> 32)))) -#define SET_CLIENT_STMT_ERROR(a, b, c, d, ...) \ - stmt_set_error((a),(b),(c),(d), ##__VA_ARGS__) - #define CLEAR_CLIENT_STMT_ERROR(a) \ do { \ (a)->last_errno= 0;\ diff -Nru mariadb-10.5-10.5.19/libmariadb/libmariadb/mariadb_lib.c mariadb-10.5-10.5.21/libmariadb/libmariadb/mariadb_lib.c --- mariadb-10.5-10.5.19/libmariadb/libmariadb/mariadb_lib.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/libmariadb/mariadb_lib.c 2023-06-05 16:28:03.000000000 +0000 @@ -891,7 +891,7 @@ for (i=0; i < field_count; i++) { uint length= (uint)(row->data[i+1] - row->data[i] - 1); - if (!row->data[i] && row->data[i][length]) + if (!row->data[i] || row->data[i][length]) goto error; *(char **)(((char *)field) + rset_field_offsets[i*2])= @@ -1356,7 +1356,6 @@ MA_PVIO_CINFO cinfo= {NULL, NULL, 0, -1, NULL}; MARIADB_PVIO *pvio= NULL; char *scramble_data; - my_bool is_maria= 0; const char *scramble_plugin; uint pkt_length, scramble_len, pkt_scramble_len= 0; NET *net= &mysql->net; @@ -1566,7 +1565,6 @@ if (strncmp(end, MA_RPL_VERSION_HACK, sizeof(MA_RPL_VERSION_HACK) - 1) == 0) { mysql->server_version= strdup(end + sizeof(MA_RPL_VERSION_HACK) - 1); - is_maria= 1; } else { @@ -1575,7 +1573,6 @@ SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); goto error; } - is_maria= mariadb_connection(mysql); } end+= strlen(end) + 1; @@ -1606,7 +1603,7 @@ pkt_scramble_len= uint1korr(end + 7); /* check if MariaD2B specific capabilities are available */ - if (is_maria && !(mysql->server_capabilities & CLIENT_MYSQL)) + if (mariadb_connection(mysql) && !(mysql->server_capabilities & CLIENT_MYSQL)) { mysql->extension->mariadb_server_capabilities= (ulonglong) uint4korr(end + 14); } @@ -1814,7 +1811,7 @@ if (stmt->state != MYSQL_STMT_INITTED) { stmt->state= MYSQL_STMT_INITTED; - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); } } @@ -1851,7 +1848,7 @@ { MYSQL_STMT *stmt= (MYSQL_STMT *)li_stmt->data; stmt->mysql= NULL; - SET_CLIENT_STMT_ERROR(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, 0, function_name); + stmt_set_error(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, 0, function_name); } mysql->stmts= NULL; } @@ -2482,12 +2479,16 @@ } if (!(result=(MYSQL_RES*) calloc(1, sizeof(*result)+ sizeof(ulong)*mysql->field_count))) + { + SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(0); + } result->lengths=(ulong*) (result+1); if (!(result->row=(MYSQL_ROW) malloc(sizeof(result->row[0])*(mysql->field_count+1)))) { /* Ptrs: to one row */ free(result); + SET_CLIENT_ERROR(mysql, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(0); } result->fields= mysql->fields; @@ -4240,13 +4241,22 @@ /* skip result sets */ if (mysql->status == MYSQL_STATUS_USE_RESULT || - mysql->status == MYSQL_STATUS_GET_RESULT || - mysql->status & SERVER_MORE_RESULTS_EXIST) + mysql->status == MYSQL_STATUS_GET_RESULT) { mthd_my_skip_result(mysql); - mysql->status= MYSQL_STATUS_READY; } + if (mysql->server_status & SERVER_MORE_RESULTS_EXIST) + { + while (mysql_next_result(mysql)) + { + MYSQL_RES *res= mysql_use_result(mysql); + mysql_free_result(res); + } + } + + mysql->status= MYSQL_STATUS_READY; + rc= ma_simple_command(mysql, COM_RESET_CONNECTION, 0, 0, 0, 0); if (rc && mysql->options.reconnect) { diff -Nru mariadb-10.5-10.5.19/libmariadb/libmariadb/mariadb_stmt.c mariadb-10.5-10.5.21/libmariadb/libmariadb/mariadb_stmt.c --- mariadb-10.5-10.5.19/libmariadb/libmariadb/mariadb_stmt.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/libmariadb/mariadb_stmt.c 2023-06-05 16:28:03.000000000 +0000 @@ -59,7 +59,7 @@ #define UPDATE_STMT_ERROR(stmt)\ -SET_CLIENT_STMT_ERROR((stmt), (stmt)->mysql->net.last_errno, (stmt)->mysql->net.sqlstate, (stmt)->mysql->net.last_error) +stmt_set_error((stmt), (stmt)->mysql->net.last_errno, (stmt)->mysql->net.sqlstate, (stmt)->mysql->net.last_error) #define STMT_NUM_OFS(type, a, r) (((type *)(a))[r]) #define MADB_RESET_ERROR 1 @@ -222,7 +222,7 @@ /* allocate space for rows */ if (!(current= (MYSQL_ROWS *)ma_alloc_root(&result->alloc, sizeof(MYSQL_ROWS) + packet_len))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } current->data= (MYSQL_ROW)(current + 1); @@ -312,7 +312,7 @@ } } stmt->result_cursor= 0; - SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, + stmt_set_error(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, stmt->mysql->net.last_error); return(1); } @@ -324,7 +324,7 @@ if (stmt->state < MYSQL_STMT_USE_OR_STORE_CALLED) { - SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } @@ -691,7 +691,7 @@ default: /* unsupported parameter type */ - SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); return 1; } return 0; @@ -871,7 +871,7 @@ *request_len = (size_t)(p - start); return start; mem_error: - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); free(start); *request_len= 0; return NULL; @@ -1081,7 +1081,7 @@ *request_len = (size_t)(p - start); return start; mem_error: - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); free(start); *request_len= 0; return NULL; @@ -1144,7 +1144,7 @@ case STMT_ATTR_CURSOR_TYPE: if (*(ulong *)value > (unsigned long) CURSOR_TYPE_READ_ONLY) { - SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); return(1); } stmt->flags = *(ulong *)value; @@ -1181,7 +1181,7 @@ stmt->user_data= (void *)value; break; default: - SET_CLIENT_STMT_ERROR(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_NOT_IMPLEMENTED, SQLSTATE_UNKNOWN, 0); return(1); } return(0); @@ -1193,7 +1193,7 @@ if (!mysql) { - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1207,7 +1207,7 @@ { if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->prebind_params * sizeof(MYSQL_BIND)))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } memset(stmt->params, '\0', stmt->prebind_params * sizeof(MYSQL_BIND)); @@ -1215,7 +1215,7 @@ stmt->param_count= stmt->prebind_params; } else if (stmt->state < MYSQL_STMT_PREPARED) { - SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1231,7 +1231,7 @@ if (stmt->mysql->methods->db_supported_buffer_type && !stmt->mysql->methods->db_supported_buffer_type(stmt->params[i].buffer_type)) { - SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->params[i].is_null) @@ -1283,7 +1283,7 @@ case MYSQL_TYPE_NEWDECIMAL: break; default: - SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); return(1); break; } @@ -1301,13 +1301,13 @@ if (stmt->state < MYSQL_STMT_PREPARED) { - SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); return(1); } if (!stmt->field_count) { - SET_CLIENT_STMT_ERROR(stmt, CR_NO_STMT_METADATA, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_NO_STMT_METADATA, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1324,7 +1324,7 @@ &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND)))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } } @@ -1336,7 +1336,7 @@ if (stmt->mysql->methods->db_supported_buffer_type && !stmt->mysql->methods->db_supported_buffer_type(bind[i].buffer_type)) { - SET_CLIENT_STMT_ERROR(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_UNSUPPORTED_PARAM_TYPE, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1477,13 +1477,13 @@ if (stmt->state <= MYSQL_STMT_EXECUTED) { - SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_WAITING_USE_OR_STORE || !stmt->field_count) { - SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } else if (stmt->state== MYSQL_STMT_WAITING_USE_OR_STORE) { @@ -1513,7 +1513,7 @@ { if (stmt->state < MYSQL_STMT_USER_FETCHING || column >= stmt->field_count || stmt->state == MYSQL_STMT_FETCH_DONE) { - SET_CLIENT_STMT_ERROR(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_NO_DATA, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1661,7 +1661,7 @@ if (!stmt->mysql) { - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1734,13 +1734,13 @@ { if (stmt->prebind_params != stmt->param_count) { - SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0); goto fail; } } else { if (!(stmt->params= (MYSQL_BIND *)ma_alloc_root(&stmt->mem_root, stmt->param_count * sizeof(MYSQL_BIND)))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); goto fail; } memset(stmt->params, '\0', stmt->param_count * sizeof(MYSQL_BIND)); @@ -1752,7 +1752,7 @@ MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND)))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); goto fail; } memset(stmt->bind, 0, sizeof(MYSQL_BIND) * stmt->field_count); @@ -1772,7 +1772,7 @@ if (!stmt->mysql) { - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1786,7 +1786,7 @@ if (stmt->state < MYSQL_STMT_EXECUTED) { SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); - SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1809,7 +1809,7 @@ else if (stmt->mysql->status != MYSQL_STATUS_STMT_RESULT) { SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); - SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } @@ -1858,7 +1858,7 @@ if (!(stmt->fields= (MYSQL_FIELD *)ma_alloc_root(fields_ma_alloc_root, sizeof(MYSQL_FIELD) * stmt->mysql->field_count))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } stmt->field_count= stmt->mysql->field_count; @@ -1892,7 +1892,7 @@ } if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND)))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } memset(stmt->bind, 0, stmt->field_count * sizeof(MYSQL_BIND)); @@ -1920,7 +1920,7 @@ if (ret) { - SET_CLIENT_STMT_ERROR(stmt, mysql->net.last_errno, mysql->net.sqlstate, + stmt_set_error(stmt, mysql->net.last_errno, mysql->net.sqlstate, mysql->net.last_error); /* if mariadb_stmt_execute_direct was used, we need to send the number of parameters to the specified prebinded value to prevent possible @@ -1957,7 +1957,7 @@ !(stmt->fields= (MYSQL_FIELD *)ma_alloc_root(fields_ma_alloc_root, sizeof(MYSQL_FIELD) * mysql->field_count))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(1); } memset(stmt->bind, 0, sizeof(MYSQL_BIND) * mysql->field_count); @@ -2042,7 +2042,7 @@ } else { /* table was altered, see test_wl4166_2 */ - SET_CLIENT_STMT_ERROR(stmt, CR_NEW_STMT_METADATA, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_NEW_STMT_METADATA, SQLSTATE_UNKNOWN, 0); return(1); } } @@ -2058,20 +2058,20 @@ if (!stmt->mysql) { - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_PREPARED) { SET_CLIENT_ERROR(mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); - SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->param_count && !stmt->bind_param_done) { - SET_CLIENT_STMT_ERROR(stmt, CR_PARAMS_NOT_BOUND, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_PARAMS_NOT_BOUND, SQLSTATE_UNKNOWN, 0); return(1); } @@ -2131,7 +2131,7 @@ if (!stmt->mysql) { - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } @@ -2216,7 +2216,7 @@ { /* connection could be invalid, e.g. after mysql_stmt_close or failed reconnect attempt (see bug CONC-97) */ - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } @@ -2271,7 +2271,7 @@ /* aloocate result set structutr and copy stmt information */ if (!(res= (MYSQL_RES *)calloc(1, sizeof(MYSQL_RES)))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); return(NULL); } @@ -2322,13 +2322,13 @@ if (stmt->state < MYSQL_STMT_PREPARED || !stmt->params) { - SET_CLIENT_STMT_ERROR(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_NO_PREPARE_STMT, SQLSTATE_UNKNOWN, 0); return(1); } if (param_number >= stmt->param_count) { - SET_CLIENT_STMT_ERROR(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_INVALID_PARAMETER_NO, SQLSTATE_UNKNOWN, 0); return(1); } @@ -2388,14 +2388,14 @@ if (!stmt->mysql) { - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return(1); } if (stmt->state < MYSQL_STMT_EXECUTED) { SET_CLIENT_ERROR(stmt->mysql, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); - SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return(1); } @@ -2410,7 +2410,7 @@ if (mysql_next_result(stmt->mysql)) { stmt->state= MYSQL_STMT_FETCH_DONE; - SET_CLIENT_STMT_ERROR(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, + stmt_set_error(stmt, stmt->mysql->net.last_errno, stmt->mysql->net.sqlstate, stmt->mysql->net.last_error); return(1); } @@ -2448,7 +2448,7 @@ mysql= stmt->mysql; if (!mysql) { - SET_CLIENT_STMT_ERROR(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_SERVER_LOST, SQLSTATE_UNKNOWN, 0); return 1; } @@ -2470,7 +2470,7 @@ if (ma_multi_command(mysql, COM_MULTI_ENABLED)) { - SET_CLIENT_STMT_ERROR(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_COMMANDS_OUT_OF_SYNC, SQLSTATE_UNKNOWN, 0); return 1; } @@ -2551,7 +2551,7 @@ MA_MEM_ROOT *fields_ma_alloc_root= &((MADB_STMT_EXTENSION *)stmt->extension)->fields_ma_alloc_root; if (!(stmt->bind= (MYSQL_BIND *)ma_alloc_root(fields_ma_alloc_root, stmt->field_count * sizeof(MYSQL_BIND)))) { - SET_CLIENT_STMT_ERROR(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, CR_OUT_OF_MEMORY, SQLSTATE_UNKNOWN, 0); goto fail; } memset(stmt->bind, 0, sizeof(MYSQL_BIND) * stmt->field_count); @@ -2569,7 +2569,14 @@ stmt->mysql->methods->db_stmt_flush_unbuffered(stmt); } while(mysql_stmt_more_results(stmt)); } - stmt->state= MYSQL_STMT_INITTED; + + /* CONC-633: If prepare returned an error, we ignore error from execute */ + if (mysql_stmt_errno(stmt)) + { + my_set_error(mysql, mysql_stmt_errno(stmt), mysql_stmt_sqlstate(stmt), + mysql_stmt_error(stmt)); + stmt->state= MYSQL_STMT_INITTED; + } return 1; } diff -Nru mariadb-10.5-10.5.19/libmariadb/plugins/auth/CMakeLists.txt mariadb-10.5-10.5.21/libmariadb/plugins/auth/CMakeLists.txt --- mariadb-10.5-10.5.19/libmariadb/plugins/auth/CMakeLists.txt 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/plugins/auth/CMakeLists.txt 2023-06-05 16:28:03.000000000 +0000 @@ -96,7 +96,8 @@ #GSSAPI client authentication plugin IF(NOT WIN32) - INCLUDE(${CC_SOURCE_DIR}/cmake/FindGSSAPI.cmake) + FIND_PACKAGE(GSSAPI) + SET_PACKAGE_PROPERTIES(GSSAPI PROPERTIES TYPE OPTIONAL) IF(GSSAPI_FOUND) SET(GSSAPI_SOURCES ${AUTH_DIR}/auth_gssapi_client.c ${AUTH_DIR}/gssapi_client.c ${AUTH_DIR}/gssapi_errmsg.c) IF (CMAKE_VERSION VERSION_GREATER 3.18) @@ -119,7 +120,7 @@ IF(CMAKE_C_COMPILER_ID MATCHES "Clang") SET_SOURCE_FILES_PROPERTIES(${GSSAPI_SOURCES} PROPERTY COMPILE_FLAGS "-Wno-deprecated-declarations") ENDIF() - IF(have__Wl___as_needed) + IF(have__Wl___as_needed AND TARGET auth_gssapi_client) SET_TARGET_PROPERTIES(auth_gssapi_client PROPERTIES LINK_FLAGS "-Wl,--as-needed") ENDIF() ENDIF() diff -Nru mariadb-10.5-10.5.19/libmariadb/plugins/auth/my_auth.c mariadb-10.5-10.5.21/libmariadb/plugins/auth/my_auth.c --- mariadb-10.5-10.5.19/libmariadb/plugins/auth/my_auth.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/plugins/auth/my_auth.c 2023-06-05 16:28:03.000000000 +0000 @@ -200,8 +200,6 @@ return res; } - - static int send_client_reply_packet(MCPVIO_EXT *mpvio, const uchar *data, int data_len) { @@ -237,6 +235,16 @@ to unset CLIENT_CONNECT_WITH_DB flag */ mysql->client_flag&= ~CLIENT_CONNECT_WITH_DB; + /* CONC-635: For connections via named pipe or shared memory the server + indicates the capability for secure connections (TLS), but + doesn't support it. */ + if ((mysql->server_capabilities & CLIENT_SSL) && + (mysql->net.pvio->type == PVIO_TYPE_NAMEDPIPE || + mysql->net.pvio->type == PVIO_TYPE_SHAREDMEM)) + { + mysql->server_capabilities &= ~(CLIENT_SSL); + } + /* if server doesn't support SSL and verification of server certificate was set to mandatory, we need to return an error */ if (mysql->options.use_ssl && !(mysql->server_capabilities & CLIENT_SSL)) diff -Nru mariadb-10.5-10.5.19/libmariadb/unittest/libmariadb/basic-t.c mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/basic-t.c --- mariadb-10.5-10.5.19/libmariadb/unittest/libmariadb/basic-t.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/basic-t.c 2023-06-05 16:28:03.000000000 +0000 @@ -810,16 +810,16 @@ MYSQL_STMT *stmt= mysql_stmt_init(mysql); char errmsg[MYSQL_ERRMSG_SIZE]; - SET_CLIENT_STMT_ERROR(stmt, 9000, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, 9000, SQLSTATE_UNKNOWN, 0); snprintf(errmsg, MYSQL_ERRMSG_SIZE, ER_UNKNOWN_ERROR_CODE, 9000); diag("stmt_error: %s", mysql_stmt_error(stmt)); FAIL_IF(strcmp(mysql_stmt_error(stmt), errmsg), "expected undefined error 9000"); - SET_CLIENT_STMT_ERROR(stmt, 0, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, 0, SQLSTATE_UNKNOWN, 0); snprintf(errmsg, MYSQL_ERRMSG_SIZE, ER_UNKNOWN_ERROR_CODE, 0); FAIL_IF(strcmp(mysql_stmt_error(stmt), errmsg), "expected undefined error 0"); - SET_CLIENT_STMT_ERROR(stmt, 4999, SQLSTATE_UNKNOWN, 0); + stmt_set_error(stmt, 4999, SQLSTATE_UNKNOWN, 0); snprintf(errmsg, MYSQL_ERRMSG_SIZE, ER_UNKNOWN_ERROR_CODE, 4999); FAIL_IF(strcmp(mysql_stmt_error(stmt), errmsg), "expected undefined error 4999"); @@ -835,8 +835,8 @@ snprintf(errmsg, MYSQL_ERRMSG_SIZE, ER_UNKNOWN_ERROR_CODE, 9000); FAIL_IF(strcmp(mysql_error(mysql), errmsg), "expected undefined error 9000"); - /* test if SET_CLIENT_STMT_ERROR works with variadic arguments */ - SET_CLIENT_STMT_ERROR(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, 0, "foobar"); + /* test if stmt_set_error works with variadic arguments */ + stmt_set_error(stmt, CR_STMT_CLOSED, SQLSTATE_UNKNOWN, 0, "foobar"); snprintf(errmsg, MYSQL_ERRMSG_SIZE, ER(CR_STMT_CLOSED), "foobar"); FAIL_IF(strcmp(mysql_stmt_error(stmt), errmsg), "error when passing variadic arguments to prepared stmt error function"); diff -Nru mariadb-10.5-10.5.19/libmariadb/unittest/libmariadb/connection.c mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/connection.c --- mariadb-10.5-10.5.19/libmariadb/unittest/libmariadb/connection.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/connection.c 2023-06-05 16:28:03.000000000 +0000 @@ -618,6 +618,12 @@ int major=0, minor= 0, patch=0; SKIP_MAXSCALE; + if (strlen(mysql_get_server_info(mysql)) > 63) + { + diag("server name is too long - skip until rpl hack was removed"); + return SKIP; + } + rc= mysql_query(mysql, "SELECT @@version"); check_mysql_rc(rc, mysql); @@ -1202,6 +1208,7 @@ if (!my_test_connect(mysql, hostname, "sha256user", "foo", NULL, port, socketname, 0)) { diag("error: %s", mysql_error(mysql)); + diag("host: %s", this_host); mysql_close(mysql); return FAIL; } @@ -1922,7 +1929,45 @@ return OK; } +static int test_conc632(MYSQL *my __attribute__((unused))) +{ + MYSQL *mysql= mysql_init(NULL); + int rc; + + if (!my_test_connect(mysql, hostname, username, password, schema, port, socketname, CLIENT_REMEMBER_OPTIONS)) + { + diag("Connection failed. Error: %s", mysql_error(mysql)); + mysql_close(mysql); + return FAIL; + } + + rc= mysql_query(mysql, "DROP PROCEDURE conc632"); + + rc= mysql_query(mysql, "CREATE PROCEDURE conc632() " + "BEGIN " + " SELECT 1;" + " SELECT 2;" + "END"); + check_mysql_rc(rc, mysql); + + rc= mysql_query(mysql, "CALL conc632()"); + check_mysql_rc(rc, mysql); + + rc= mysql_reset_connection(mysql); + check_mysql_rc(rc, mysql); + + rc= mysql_ping(mysql); + check_mysql_rc(rc, mysql); + + rc= mysql_query(mysql, "DROP PROCEDURE conc632"); + check_mysql_rc(rc, mysql); + + mysql_close(mysql); + return OK; +} + struct my_tests_st my_tests[] = { + {"test_conc632", test_conc632, TEST_CONNECTION_NONE, 0, NULL, NULL}, {"test_conc490", test_conc490, TEST_CONNECTION_NONE, 0, NULL, NULL}, {"test_gtid", test_gtid, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, {"test_conc496", test_conc496, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, diff -Nru mariadb-10.5-10.5.19/libmariadb/unittest/libmariadb/ps_bugs.c mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/ps_bugs.c --- mariadb-10.5-10.5.19/libmariadb/unittest/libmariadb/ps_bugs.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/unittest/libmariadb/ps_bugs.c 2023-06-05 16:28:03.000000000 +0000 @@ -5489,9 +5489,13 @@ static int test_conc627(MYSQL *mysql) { - MYSQL_STMT *stmt= mysql_stmt_init(mysql); + MYSQL_STMT *stmt; int rc; + SKIP_MYSQL(mysql); + + stmt= mysql_stmt_init(mysql); + rc= mysql_stmt_prepare(stmt, SL("show grants for mysqltest_8")); check_stmt_rc(rc, stmt); @@ -5507,7 +5511,83 @@ return OK; } +static int test_conc633(MYSQL *mysql) +{ + MYSQL_STMT *stmt= mysql_stmt_init(mysql); + MYSQL *my= NULL; + int ret= FAIL; + int rc; + + if (!mariadb_stmt_execute_direct(stmt, SL("SÄLECT 1"))) + { + diag("Syntax error expected"); + goto end; + } + + if (mysql_errno(mysql) != mysql_stmt_errno(stmt)) + { + diag("Different error codes. mysql_errno= %d, mysql_stmt_errno=%d", + mysql_errno(mysql), mysql_stmt_errno(stmt)); + goto end; + } + + if ((long)stmt->stmt_id != -1) + { + diag("Error: expected stmt_id=-1"); + goto end; + } + + if (!(my= test_connect(NULL))) + { + diag("Can establish connection (%s)", mysql_error(my)); + goto end; + } + + rc= mysql_query(my, "CREATE OR REPLACE TABLE conc633 (a int)"); + check_mysql_rc(rc, mysql); + + rc= mysql_query(mysql, "SET @@lock_wait_timeout=3"); + + rc= mysql_query(my, "LOCK TABLES conc633 WRITE"); + check_mysql_rc(rc, mysql); + + rc= mysql_query(mysql, "SET @@lock_wait_timeout=3"); + check_mysql_rc(rc, mysql); + + if (!mariadb_stmt_execute_direct(stmt, SL("INSERT INTO conc633 VALUES (1)"))) + { + diag("lock wait timeout error expected"); + goto end; + } + + if (stmt->state != MYSQL_STMT_PREPARED) + { + diag("Error: stmt hasn't prepared status"); + goto end; + } + + if ((long)stmt->stmt_id == -1) + { + diag("Error: no stmt_id assigned"); + goto end; + } + + rc= mysql_query(my, "UNLOCK TABLES"); + check_mysql_rc(rc, mysql); + rc= mysql_query(my, "DROP TABLE conc633"); + check_mysql_rc(rc, mysql); + + ret= OK; + +end: + if (my) + mysql_close(my); + mysql_stmt_close(stmt); + return ret; +} + struct my_tests_st my_tests[] = { + {"test_conc633", test_conc633, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, {"test_conc627", test_conc627, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, {"test_mdev19838", test_mdev19838, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, {"test_conc566", test_conc566, TEST_CONNECTION_DEFAULT, 0, NULL, NULL}, diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/CMakeLists.txt mariadb-10.5-10.5.21/libmariadb/zlib/CMakeLists.txt --- mariadb-10.5-10.5.19/libmariadb/zlib/CMakeLists.txt 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/CMakeLists.txt 2023-06-05 16:28:03.000000000 +0000 @@ -3,10 +3,7 @@ project(zlib C) -set(VERSION "1.2.12") - -option(ASM686 "Enable building i686 assembly implementation") -option(AMD64 "Enable building amd64 assembly implementation") +set(VERSION "1.2.13") set(INSTALL_BIN_DIR "${CMAKE_INSTALL_PREFIX}/bin" CACHE PATH "Installation directory for executables") set(INSTALL_LIB_DIR "${CMAKE_INSTALL_PREFIX}/lib" CACHE PATH "Installation directory for libraries") @@ -129,39 +126,6 @@ ) endif() -if(CMAKE_COMPILER_IS_GNUCC) - if(ASM686) - set(ZLIB_ASMS contrib/asm686/match.S) - elseif (AMD64) - set(ZLIB_ASMS contrib/amd64/amd64-match.S) - endif () - - if(ZLIB_ASMS) - add_definitions(-DASMV) - set_source_files_properties(${ZLIB_ASMS} PROPERTIES LANGUAGE C COMPILE_FLAGS -DNO_UNDERLINE) - endif() -endif() - -if(MSVC) - if(ASM686) - ENABLE_LANGUAGE(ASM_MASM) - set(ZLIB_ASMS - contrib/masmx86/inffas32.asm - contrib/masmx86/match686.asm - ) - elseif (AMD64) - ENABLE_LANGUAGE(ASM_MASM) - set(ZLIB_ASMS - contrib/masmx64/gvmat64.asm - contrib/masmx64/inffasx64.asm - ) - endif() - - if(ZLIB_ASMS) - add_definitions(-DASMV -DASMINF) - endif() -endif() - # parse the full version number from zlib.h and include in ZLIB_FULL_VERSION file(READ ${CMAKE_CURRENT_SOURCE_DIR}/zlib.h _zlib_h_contents) string(REGEX REPLACE ".*#define[ \t]+ZLIB_VERSION[ \t]+\"([-0-9A-Za-z.]+)\".*" @@ -183,8 +147,8 @@ set(ZLIB_DLL_SRCS ${CMAKE_CURRENT_BINARY_DIR}/zlib1rc.obj) endif(MINGW) -add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) -add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_ASMS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +add_library(zlib SHARED ${ZLIB_SRCS} ${ZLIB_DLL_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) +add_library(zlibstatic STATIC ${ZLIB_SRCS} ${ZLIB_PUBLIC_HDRS} ${ZLIB_PRIVATE_HDRS}) set_target_properties(zlib PROPERTIES DEFINE_SYMBOL ZLIB_DLL) set_target_properties(zlib PROPERTIES SOVERSION 1) diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/compress.c mariadb-10.5-10.5.21/libmariadb/zlib/compress.c --- mariadb-10.5-10.5.19/libmariadb/zlib/compress.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/compress.c 2023-06-05 16:28:03.000000000 +0000 @@ -19,7 +19,7 @@ memory, Z_BUF_ERROR if there was not enough room in the output buffer, Z_STREAM_ERROR if the level parameter is invalid. */ -int ZEXPORT compress2 (dest, destLen, source, sourceLen, level) +int ZEXPORT compress2(dest, destLen, source, sourceLen, level) Bytef *dest; uLongf *destLen; const Bytef *source; @@ -65,7 +65,7 @@ /* =========================================================================== */ -int ZEXPORT compress (dest, destLen, source, sourceLen) +int ZEXPORT compress(dest, destLen, source, sourceLen) Bytef *dest; uLongf *destLen; const Bytef *source; @@ -78,7 +78,7 @@ If the default memLevel or windowBits for deflateInit() is changed, then this function needs to be updated. */ -uLong ZEXPORT compressBound (sourceLen) +uLong ZEXPORT compressBound(sourceLen) uLong sourceLen; { return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/crc32.c mariadb-10.5-10.5.21/libmariadb/zlib/crc32.c --- mariadb-10.5-10.5.19/libmariadb/zlib/crc32.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/crc32.c 2023-06-05 16:28:03.000000000 +0000 @@ -98,13 +98,22 @@ # endif #endif +/* If available, use the ARM processor CRC32 instruction. */ +#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 +# define ARMCRC32 +#endif + /* Local functions. */ local z_crc_t multmodp OF((z_crc_t a, z_crc_t b)); local z_crc_t x2nmodp OF((z_off64_t n, unsigned k)); -/* If available, use the ARM processor CRC32 instruction. */ -#if defined(__aarch64__) && defined(__ARM_FEATURE_CRC32) && W == 8 -# define ARMCRC32 +#if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) + local z_word_t byte_swap OF((z_word_t word)); +#endif + +#if defined(W) && !defined(ARMCRC32) + local z_crc_t crc_word OF((z_word_t data)); + local z_word_t crc_word_big OF((z_word_t data)); #endif #if defined(W) && (!defined(ARMCRC32) || defined(DYNAMIC_CRC_TABLE)) @@ -630,7 +639,7 @@ #endif /* DYNAMIC_CRC_TABLE */ /* Pre-condition the CRC */ - crc ^= 0xffffffff; + crc = (~crc) & 0xffffffff; /* Compute the CRC up to a word boundary. */ while (len && ((z_size_t)buf & 7) != 0) { @@ -645,8 +654,8 @@ len &= 7; /* Do three interleaved CRCs to realize the throughput of one crc32x - instruction per cycle. Each CRC is calcuated on Z_BATCH words. The three - CRCs are combined into a single CRC after each set of batches. */ + instruction per cycle. Each CRC is calculated on Z_BATCH words. The + three CRCs are combined into a single CRC after each set of batches. */ while (num >= 3 * Z_BATCH) { crc1 = 0; crc2 = 0; @@ -749,7 +758,7 @@ #endif /* DYNAMIC_CRC_TABLE */ /* Pre-condition the CRC */ - crc ^= 0xffffffff; + crc = (~crc) & 0xffffffff; #ifdef W @@ -1077,7 +1086,7 @@ #ifdef DYNAMIC_CRC_TABLE once(&made, make_crc_table); #endif /* DYNAMIC_CRC_TABLE */ - return multmodp(x2nmodp(len2, 3), crc1) ^ crc2; + return multmodp(x2nmodp(len2, 3), crc1) ^ (crc2 & 0xffffffff); } /* ========================================================================= */ @@ -1086,7 +1095,7 @@ uLong crc2; z_off_t len2; { - return crc32_combine64(crc1, crc2, len2); + return crc32_combine64(crc1, crc2, (z_off64_t)len2); } /* ========================================================================= */ @@ -1103,14 +1112,14 @@ uLong ZEXPORT crc32_combine_gen(len2) z_off_t len2; { - return crc32_combine_gen64(len2); + return crc32_combine_gen64((z_off64_t)len2); } /* ========================================================================= */ -uLong crc32_combine_op(crc1, crc2, op) +uLong ZEXPORT crc32_combine_op(crc1, crc2, op) uLong crc1; uLong crc2; uLong op; { - return multmodp(op, crc1) ^ crc2; + return multmodp(op, crc1) ^ (crc2 & 0xffffffff); } diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/deflate.c mariadb-10.5-10.5.21/libmariadb/zlib/deflate.c --- mariadb-10.5-10.5.19/libmariadb/zlib/deflate.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/deflate.c 2023-06-05 16:28:03.000000000 +0000 @@ -52,7 +52,7 @@ #include "deflate.h" const char deflate_copyright[] = - " deflate 1.2.12 Copyright 1995-2022 Jean-loup Gailly and Mark Adler "; + " deflate 1.2.13 Copyright 1995-2022 Jean-loup Gailly and Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -87,13 +87,7 @@ local void putShortMSB OF((deflate_state *s, uInt b)); local void flush_pending OF((z_streamp strm)); local unsigned read_buf OF((z_streamp strm, Bytef *buf, unsigned size)); -#ifdef ASMV -# pragma message("Assembler code may have bugs -- use at your own risk") - void match_init OF((void)); /* asm code initialization */ - uInt longest_match OF((deflate_state *s, IPos cur_match)); -#else local uInt longest_match OF((deflate_state *s, IPos cur_match)); -#endif #ifdef ZLIB_DEBUG local void check_match OF((deflate_state *s, IPos start, IPos match, @@ -160,7 +154,7 @@ * characters, so that a running hash key can be computed from the previous * key instead of complete recalculation each time. */ -#define UPDATE_HASH(s,h,c) (h = (((h)<hash_shift) ^ (c)) & s->hash_mask) +#define UPDATE_HASH(s,h,c) (h = (((h) << s->hash_shift) ^ (c)) & s->hash_mask) /* =========================================================================== @@ -191,9 +185,9 @@ */ #define CLEAR_HASH(s) \ do { \ - s->head[s->hash_size-1] = NIL; \ + s->head[s->hash_size - 1] = NIL; \ zmemzero((Bytef *)s->head, \ - (unsigned)(s->hash_size-1)*sizeof(*s->head)); \ + (unsigned)(s->hash_size - 1)*sizeof(*s->head)); \ } while (0) /* =========================================================================== @@ -285,6 +279,8 @@ if (windowBits < 0) { /* suppress zlib wrapper */ wrap = 0; + if (windowBits < -15) + return Z_STREAM_ERROR; windowBits = -windowBits; } #ifdef GZIP @@ -314,7 +310,7 @@ s->hash_bits = (uInt)memLevel + 7; s->hash_size = 1 << s->hash_bits; s->hash_mask = s->hash_size - 1; - s->hash_shift = ((s->hash_bits+MIN_MATCH-1)/MIN_MATCH); + s->hash_shift = ((s->hash_bits + MIN_MATCH-1) / MIN_MATCH); s->window = (Bytef *) ZALLOC(strm, s->w_size, 2*sizeof(Byte)); s->prev = (Posf *) ZALLOC(strm, s->w_size, sizeof(Pos)); @@ -340,11 +336,11 @@ * sym_buf value to read moves forward three bytes. From that symbol, up to * 31 bits are written to pending_buf. The closest the written pending_buf * bits gets to the next sym_buf symbol to read is just before the last - * code is written. At that time, 31*(n-2) bits have been written, just - * after 24*(n-2) bits have been consumed from sym_buf. sym_buf starts at - * 8*n bits into pending_buf. (Note that the symbol buffer fills when n-1 + * code is written. At that time, 31*(n - 2) bits have been written, just + * after 24*(n - 2) bits have been consumed from sym_buf. sym_buf starts at + * 8*n bits into pending_buf. (Note that the symbol buffer fills when n - 1 * symbols are written.) The closest the writing gets to what is unread is - * then n+14 bits. Here n is lit_bufsize, which is 16384 by default, and + * then n + 14 bits. Here n is lit_bufsize, which is 16384 by default, and * can range from 128 to 32768. * * Therefore, at a minimum, there are 142 bits of space between what is @@ -390,7 +386,7 @@ /* ========================================================================= * Check for a valid deflate stream state. Return 0 if ok, 1 if not. */ -local int deflateStateCheck (strm) +local int deflateStateCheck(strm) z_streamp strm; { deflate_state *s; @@ -413,7 +409,7 @@ } /* ========================================================================= */ -int ZEXPORT deflateSetDictionary (strm, dictionary, dictLength) +int ZEXPORT deflateSetDictionary(strm, dictionary, dictLength) z_streamp strm; const Bytef *dictionary; uInt dictLength; @@ -482,7 +478,7 @@ } /* ========================================================================= */ -int ZEXPORT deflateGetDictionary (strm, dictionary, dictLength) +int ZEXPORT deflateGetDictionary(strm, dictionary, dictLength) z_streamp strm; Bytef *dictionary; uInt *dictLength; @@ -504,7 +500,7 @@ } /* ========================================================================= */ -int ZEXPORT deflateResetKeep (strm) +int ZEXPORT deflateResetKeep(strm) z_streamp strm; { deflate_state *s; @@ -542,7 +538,7 @@ } /* ========================================================================= */ -int ZEXPORT deflateReset (strm) +int ZEXPORT deflateReset(strm) z_streamp strm; { int ret; @@ -554,7 +550,7 @@ } /* ========================================================================= */ -int ZEXPORT deflateSetHeader (strm, head) +int ZEXPORT deflateSetHeader(strm, head) z_streamp strm; gz_headerp head; { @@ -565,7 +561,7 @@ } /* ========================================================================= */ -int ZEXPORT deflatePending (strm, pending, bits) +int ZEXPORT deflatePending(strm, pending, bits) unsigned *pending; int *bits; z_streamp strm; @@ -579,7 +575,7 @@ } /* ========================================================================= */ -int ZEXPORT deflatePrime (strm, bits, value) +int ZEXPORT deflatePrime(strm, bits, value) z_streamp strm; int bits; int value; @@ -674,36 +670,50 @@ } /* ========================================================================= - * For the default windowBits of 15 and memLevel of 8, this function returns - * a close to exact, as well as small, upper bound on the compressed size. - * They are coded as constants here for a reason--if the #define's are - * changed, then this function needs to be changed as well. The return - * value for 15 and 8 only works for those exact settings. + * For the default windowBits of 15 and memLevel of 8, this function returns a + * close to exact, as well as small, upper bound on the compressed size. This + * is an expansion of ~0.03%, plus a small constant. + * + * For any setting other than those defaults for windowBits and memLevel, one + * of two worst case bounds is returned. This is at most an expansion of ~4% or + * ~13%, plus a small constant. * - * For any setting other than those defaults for windowBits and memLevel, - * the value returned is a conservative worst case for the maximum expansion - * resulting from using fixed blocks instead of stored blocks, which deflate - * can emit on compressed data for some combinations of the parameters. + * Both the 0.03% and 4% derive from the overhead of stored blocks. The first + * one is for stored blocks of 16383 bytes (memLevel == 8), whereas the second + * is for stored blocks of 127 bytes (the worst case memLevel == 1). The + * expansion results from five bytes of header for each stored block. * - * This function could be more sophisticated to provide closer upper bounds for - * every combination of windowBits and memLevel. But even the conservative - * upper bound of about 14% expansion does not seem onerous for output buffer - * allocation. + * The larger expansion of 13% results from a window size less than or equal to + * the symbols buffer size (windowBits <= memLevel + 7). In that case some of + * the data being compressed may have slid out of the sliding window, impeding + * a stored block from being emitted. Then the only choice is a fixed or + * dynamic block, where a fixed block limits the maximum expansion to 9 bits + * per 8-bit byte, plus 10 bits for every block. The smallest block size for + * which this can occur is 255 (memLevel == 2). + * + * Shifts are used to approximate divisions, for speed. */ uLong ZEXPORT deflateBound(strm, sourceLen) z_streamp strm; uLong sourceLen; { deflate_state *s; - uLong complen, wraplen; + uLong fixedlen, storelen, wraplen; - /* conservative upper bound for compressed data */ - complen = sourceLen + - ((sourceLen + 7) >> 3) + ((sourceLen + 63) >> 6) + 5; + /* upper bound for fixed blocks with 9-bit literals and length 255 + (memLevel == 2, which is the lowest that may not use stored blocks) -- + ~13% overhead plus a small constant */ + fixedlen = sourceLen + (sourceLen >> 3) + (sourceLen >> 8) + + (sourceLen >> 9) + 4; + + /* upper bound for stored blocks with length 127 (memLevel == 1) -- + ~4% overhead plus a small constant */ + storelen = sourceLen + (sourceLen >> 5) + (sourceLen >> 7) + + (sourceLen >> 11) + 7; - /* if can't get parameters, return conservative bound plus zlib wrapper */ + /* if can't get parameters, return larger bound plus a zlib wrapper */ if (deflateStateCheck(strm)) - return complen + 6; + return (fixedlen > storelen ? fixedlen : storelen) + 6; /* compute wrapper length */ s = strm->state; @@ -740,11 +750,12 @@ wraplen = 6; } - /* if not default parameters, return conservative bound */ + /* if not default parameters, return one of the conservative bounds */ if (s->w_bits != 15 || s->hash_bits != 8 + 7) - return complen + wraplen; + return (s->w_bits <= s->hash_bits ? fixedlen : storelen) + wraplen; - /* default settings: return tight bound for that case */ + /* default settings: return tight bound for that case -- ~0.03% overhead + plus a small constant */ return sourceLen + (sourceLen >> 12) + (sourceLen >> 14) + (sourceLen >> 25) + 13 - 6 + wraplen; } @@ -754,7 +765,7 @@ * IN assertion: the stream state is correct and there is enough room in * pending_buf. */ -local void putShortMSB (s, b) +local void putShortMSB(s, b) deflate_state *s; uInt b; { @@ -801,7 +812,7 @@ } while (0) /* ========================================================================= */ -int ZEXPORT deflate (strm, flush) +int ZEXPORT deflate(strm, flush) z_streamp strm; int flush; { @@ -856,7 +867,7 @@ s->status = BUSY_STATE; if (s->status == INIT_STATE) { /* zlib header */ - uInt header = (Z_DEFLATED + ((s->w_bits-8)<<4)) << 8; + uInt header = (Z_DEFLATED + ((s->w_bits - 8) << 4)) << 8; uInt level_flags; if (s->strategy >= Z_HUFFMAN_ONLY || s->level < 2) @@ -1116,7 +1127,7 @@ } /* ========================================================================= */ -int ZEXPORT deflateEnd (strm) +int ZEXPORT deflateEnd(strm) z_streamp strm; { int status; @@ -1142,7 +1153,7 @@ * To simplify the source, this is not supported for 16-bit MSDOS (which * doesn't have enough memory anyway to duplicate compression states). */ -int ZEXPORT deflateCopy (dest, source) +int ZEXPORT deflateCopy(dest, source) z_streamp dest; z_streamp source; { @@ -1231,7 +1242,7 @@ /* =========================================================================== * Initialize the "longest match" routines for a new zlib stream */ -local void lm_init (s) +local void lm_init(s) deflate_state *s; { s->window_size = (ulg)2L*s->w_size; @@ -1252,11 +1263,6 @@ s->match_length = s->prev_length = MIN_MATCH-1; s->match_available = 0; s->ins_h = 0; -#ifndef FASTEST -#ifdef ASMV - match_init(); /* initialize the asm code */ -#endif -#endif } #ifndef FASTEST @@ -1269,10 +1275,6 @@ * string (strstart) and its distance is <= MAX_DIST, and prev_length >= 1 * OUT assertion: the match length is not greater than s->lookahead. */ -#ifndef ASMV -/* For 80x86 and 680x0, an optimized version will be provided in match.asm or - * match.S. The code will be functionally equivalent. - */ local uInt longest_match(s, cur_match) deflate_state *s; IPos cur_match; /* current match */ @@ -1297,10 +1299,10 @@ */ register Bytef *strend = s->window + s->strstart + MAX_MATCH - 1; register ush scan_start = *(ushf*)scan; - register ush scan_end = *(ushf*)(scan+best_len-1); + register ush scan_end = *(ushf*)(scan + best_len - 1); #else register Bytef *strend = s->window + s->strstart + MAX_MATCH; - register Byte scan_end1 = scan[best_len-1]; + register Byte scan_end1 = scan[best_len - 1]; register Byte scan_end = scan[best_len]; #endif @@ -1318,7 +1320,8 @@ */ if ((uInt)nice_match > s->lookahead) nice_match = (int)s->lookahead; - Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + "need lookahead"); do { Assert(cur_match < s->strstart, "no future"); @@ -1336,43 +1339,44 @@ /* This code assumes sizeof(unsigned short) == 2. Do not use * UNALIGNED_OK if your compiler uses a different size. */ - if (*(ushf*)(match+best_len-1) != scan_end || + if (*(ushf*)(match + best_len - 1) != scan_end || *(ushf*)match != scan_start) continue; /* It is not necessary to compare scan[2] and match[2] since they are * always equal when the other bytes match, given that the hash keys * are equal and that HASH_BITS >= 8. Compare 2 bytes at a time at - * strstart+3, +5, ... up to strstart+257. We check for insufficient + * strstart + 3, + 5, up to strstart + 257. We check for insufficient * lookahead only every 4th comparison; the 128th check will be made - * at strstart+257. If MAX_MATCH-2 is not a multiple of 8, it is + * at strstart + 257. If MAX_MATCH-2 is not a multiple of 8, it is * necessary to put more guard bytes at the end of the window, or * to check more often for insufficient lookahead. */ Assert(scan[2] == match[2], "scan[2]?"); scan++, match++; do { - } while (*(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && - *(ushf*)(scan+=2) == *(ushf*)(match+=2) && + } while (*(ushf*)(scan += 2) == *(ushf*)(match += 2) && + *(ushf*)(scan += 2) == *(ushf*)(match += 2) && + *(ushf*)(scan += 2) == *(ushf*)(match += 2) && + *(ushf*)(scan += 2) == *(ushf*)(match += 2) && scan < strend); /* The funny "do {}" generates better code on most compilers */ - /* Here, scan <= window+strstart+257 */ - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + /* Here, scan <= window + strstart + 257 */ + Assert(scan <= s->window + (unsigned)(s->window_size - 1), + "wild scan"); if (*scan == *match) scan++; - len = (MAX_MATCH - 1) - (int)(strend-scan); + len = (MAX_MATCH - 1) - (int)(strend - scan); scan = strend - (MAX_MATCH-1); #else /* UNALIGNED_OK */ - if (match[best_len] != scan_end || - match[best_len-1] != scan_end1 || - *match != *scan || - *++match != scan[1]) continue; + if (match[best_len] != scan_end || + match[best_len - 1] != scan_end1 || + *match != *scan || + *++match != scan[1]) continue; - /* The check at best_len-1 can be removed because it will be made + /* The check at best_len - 1 can be removed because it will be made * again later. (This heuristic is not always a win.) * It is not necessary to compare scan[2] and match[2] since they * are always equal when the other bytes match, given that @@ -1382,7 +1386,7 @@ Assert(*scan == *match, "match[2]?"); /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. + * the 256th check will be made at strstart + 258. */ do { } while (*++scan == *++match && *++scan == *++match && @@ -1391,7 +1395,8 @@ *++scan == *++match && *++scan == *++match && scan < strend); - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + Assert(scan <= s->window + (unsigned)(s->window_size - 1), + "wild scan"); len = MAX_MATCH - (int)(strend - scan); scan = strend - MAX_MATCH; @@ -1403,9 +1408,9 @@ best_len = len; if (len >= nice_match) break; #ifdef UNALIGNED_OK - scan_end = *(ushf*)(scan+best_len-1); + scan_end = *(ushf*)(scan + best_len - 1); #else - scan_end1 = scan[best_len-1]; + scan_end1 = scan[best_len - 1]; scan_end = scan[best_len]; #endif } @@ -1415,7 +1420,6 @@ if ((uInt)best_len <= s->lookahead) return (uInt)best_len; return s->lookahead; } -#endif /* ASMV */ #else /* FASTEST */ @@ -1436,7 +1440,8 @@ */ Assert(s->hash_bits >= 8 && MAX_MATCH == 258, "Code too clever"); - Assert((ulg)s->strstart <= s->window_size-MIN_LOOKAHEAD, "need lookahead"); + Assert((ulg)s->strstart <= s->window_size - MIN_LOOKAHEAD, + "need lookahead"); Assert(cur_match < s->strstart, "no future"); @@ -1446,7 +1451,7 @@ */ if (match[0] != scan[0] || match[1] != scan[1]) return MIN_MATCH-1; - /* The check at best_len-1 can be removed because it will be made + /* The check at best_len - 1 can be removed because it will be made * again later. (This heuristic is not always a win.) * It is not necessary to compare scan[2] and match[2] since they * are always equal when the other bytes match, given that @@ -1456,7 +1461,7 @@ Assert(*scan == *match, "match[2]?"); /* We check for insufficient lookahead only every 8th comparison; - * the 256th check will be made at strstart+258. + * the 256th check will be made at strstart + 258. */ do { } while (*++scan == *++match && *++scan == *++match && @@ -1465,7 +1470,7 @@ *++scan == *++match && *++scan == *++match && scan < strend); - Assert(scan <= s->window+(unsigned)(s->window_size-1), "wild scan"); + Assert(scan <= s->window + (unsigned)(s->window_size - 1), "wild scan"); len = MAX_MATCH - (int)(strend - scan); @@ -1501,7 +1506,7 @@ z_error("invalid match"); } if (z_verbose > 1) { - fprintf(stderr,"\\[%d,%d]", start-match, length); + fprintf(stderr,"\\[%d,%d]", start - match, length); do { putc(s->window[start++], stderr); } while (--length != 0); } } @@ -1547,9 +1552,9 @@ /* If the window is almost full and there is insufficient lookahead, * move the upper half to the lower one to make room in the upper half. */ - if (s->strstart >= wsize+MAX_DIST(s)) { + if (s->strstart >= wsize + MAX_DIST(s)) { - zmemcpy(s->window, s->window+wsize, (unsigned)wsize - more); + zmemcpy(s->window, s->window + wsize, (unsigned)wsize - more); s->match_start -= wsize; s->strstart -= wsize; /* we now have strstart >= MAX_DIST */ s->block_start -= (long) wsize; @@ -1680,7 +1685,7 @@ * * deflate_stored() is written to minimize the number of times an input byte is * copied. It is most efficient with large input and output buffers, which - * maximizes the opportunites to have a single copy from next_in to next_out. + * maximizes the opportunities to have a single copy from next_in to next_out. */ local block_state deflate_stored(s, flush) deflate_state *s; @@ -1890,7 +1895,7 @@ if (s->lookahead == 0) break; /* flush the current block */ } - /* Insert the string window[strstart .. strstart+2] in the + /* Insert the string window[strstart .. strstart + 2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = NIL; @@ -1938,7 +1943,7 @@ s->strstart += s->match_length; s->match_length = 0; s->ins_h = s->window[s->strstart]; - UPDATE_HASH(s, s->ins_h, s->window[s->strstart+1]); + UPDATE_HASH(s, s->ins_h, s->window[s->strstart + 1]); #if MIN_MATCH != 3 Call UPDATE_HASH() MIN_MATCH-3 more times #endif @@ -1949,7 +1954,7 @@ } else { /* No match, output a literal byte */ Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); + _tr_tally_lit(s, s->window[s->strstart], bflush); s->lookahead--; s->strstart++; } @@ -1993,7 +1998,7 @@ if (s->lookahead == 0) break; /* flush the current block */ } - /* Insert the string window[strstart .. strstart+2] in the + /* Insert the string window[strstart .. strstart + 2] in the * dictionary, and set hash_head to the head of the hash chain: */ hash_head = NIL; @@ -2035,17 +2040,17 @@ uInt max_insert = s->strstart + s->lookahead - MIN_MATCH; /* Do not insert strings in hash table beyond this. */ - check_match(s, s->strstart-1, s->prev_match, s->prev_length); + check_match(s, s->strstart - 1, s->prev_match, s->prev_length); - _tr_tally_dist(s, s->strstart -1 - s->prev_match, + _tr_tally_dist(s, s->strstart - 1 - s->prev_match, s->prev_length - MIN_MATCH, bflush); /* Insert in hash table all strings up to the end of the match. - * strstart-1 and strstart are already inserted. If there is not + * strstart - 1 and strstart are already inserted. If there is not * enough lookahead, the last two strings are not inserted in * the hash table. */ - s->lookahead -= s->prev_length-1; + s->lookahead -= s->prev_length - 1; s->prev_length -= 2; do { if (++s->strstart <= max_insert) { @@ -2063,8 +2068,8 @@ * single literal. If there was a match but the current match * is longer, truncate the previous match to a single literal. */ - Tracevv((stderr,"%c", s->window[s->strstart-1])); - _tr_tally_lit(s, s->window[s->strstart-1], bflush); + Tracevv((stderr,"%c", s->window[s->strstart - 1])); + _tr_tally_lit(s, s->window[s->strstart - 1], bflush); if (bflush) { FLUSH_BLOCK_ONLY(s, 0); } @@ -2082,8 +2087,8 @@ } Assert (flush != Z_NO_FLUSH, "no flush?"); if (s->match_available) { - Tracevv((stderr,"%c", s->window[s->strstart-1])); - _tr_tally_lit(s, s->window[s->strstart-1], bflush); + Tracevv((stderr,"%c", s->window[s->strstart - 1])); + _tr_tally_lit(s, s->window[s->strstart - 1], bflush); s->match_available = 0; } s->insert = s->strstart < MIN_MATCH-1 ? s->strstart : MIN_MATCH-1; @@ -2140,7 +2145,8 @@ if (s->match_length > s->lookahead) s->match_length = s->lookahead; } - Assert(scan <= s->window+(uInt)(s->window_size-1), "wild scan"); + Assert(scan <= s->window + (uInt)(s->window_size - 1), + "wild scan"); } /* Emit match if have run of MIN_MATCH or longer, else emit literal */ @@ -2155,7 +2161,7 @@ } else { /* No match, output a literal byte */ Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); + _tr_tally_lit(s, s->window[s->strstart], bflush); s->lookahead--; s->strstart++; } @@ -2195,7 +2201,7 @@ /* Output a literal byte */ s->match_length = 0; Tracevv((stderr,"%c", s->window[s->strstart])); - _tr_tally_lit (s, s->window[s->strstart], bflush); + _tr_tally_lit(s, s->window[s->strstart], bflush); s->lookahead--; s->strstart++; if (bflush) FLUSH_BLOCK(s, 0); diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/deflate.h mariadb-10.5-10.5.21/libmariadb/zlib/deflate.h --- mariadb-10.5-10.5.19/libmariadb/zlib/deflate.h 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/deflate.h 2023-06-05 16:28:03.000000000 +0000 @@ -329,8 +329,8 @@ # define _tr_tally_dist(s, distance, length, flush) \ { uch len = (uch)(length); \ ush dist = (ush)(distance); \ - s->sym_buf[s->sym_next++] = dist; \ - s->sym_buf[s->sym_next++] = dist >> 8; \ + s->sym_buf[s->sym_next++] = (uch)dist; \ + s->sym_buf[s->sym_next++] = (uch)(dist >> 8); \ s->sym_buf[s->sym_next++] = len; \ dist--; \ s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/gzlib.c mariadb-10.5-10.5.21/libmariadb/zlib/gzlib.c --- mariadb-10.5-10.5.19/libmariadb/zlib/gzlib.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/gzlib.c 2023-06-05 16:28:03.000000000 +0000 @@ -30,7 +30,7 @@ The gz_strwinerror function does not change the current setting of GetLastError. */ -char ZLIB_INTERNAL *gz_strwinerror (error) +char ZLIB_INTERNAL *gz_strwinerror(error) DWORD error; { static char buf[1024]; diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/gzread.c mariadb-10.5-10.5.21/libmariadb/zlib/gzread.c --- mariadb-10.5-10.5.19/libmariadb/zlib/gzread.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/gzread.c 2023-06-05 16:28:03.000000000 +0000 @@ -157,11 +157,9 @@ the output buffer is larger than the input buffer, which also assures space for gzungetc() */ state->x.next = state->out; - if (strm->avail_in) { - memcpy(state->x.next, strm->next_in, strm->avail_in); - state->x.have = strm->avail_in; - strm->avail_in = 0; - } + memcpy(state->x.next, strm->next_in, strm->avail_in); + state->x.have = strm->avail_in; + strm->avail_in = 0; state->how = COPY; state->direct = 1; return 0; diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/gzwrite.c mariadb-10.5-10.5.21/libmariadb/zlib/gzwrite.c --- mariadb-10.5-10.5.19/libmariadb/zlib/gzwrite.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/gzwrite.c 2023-06-05 16:28:03.000000000 +0000 @@ -474,7 +474,7 @@ #else /* !STDC && !Z_HAVE_STDARG_H */ /* -- see zlib.h -- */ -int ZEXPORTVA gzprintf (file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, +int ZEXPORTVA gzprintf(file, format, a1, a2, a3, a4, a5, a6, a7, a8, a9, a10, a11, a12, a13, a14, a15, a16, a17, a18, a19, a20) gzFile file; const char *format; diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/infback.c mariadb-10.5-10.5.21/libmariadb/zlib/infback.c --- mariadb-10.5-10.5.19/libmariadb/zlib/infback.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/infback.c 2023-06-05 16:28:03.000000000 +0000 @@ -66,6 +66,7 @@ state->window = window; state->wnext = 0; state->whave = 0; + state->sane = 1; return Z_OK; } @@ -605,25 +606,27 @@ break; case DONE: - /* inflate stream terminated properly -- write leftover output */ + /* inflate stream terminated properly */ ret = Z_STREAM_END; - if (left < state->wsize) { - if (out(out_desc, state->window, state->wsize - left)) - ret = Z_BUF_ERROR; - } goto inf_leave; case BAD: ret = Z_DATA_ERROR; goto inf_leave; - default: /* can't happen, but makes compilers happy */ + default: + /* can't happen, but makes compilers happy */ ret = Z_STREAM_ERROR; goto inf_leave; } - /* Return unused input */ + /* Write leftover output and return unused input */ inf_leave: + if (left < state->wsize) { + if (out(out_desc, state->window, state->wsize - left) && + ret == Z_STREAM_END) + ret = Z_BUF_ERROR; + } strm->next_in = next; strm->avail_in = have; return ret; diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/inflate.c mariadb-10.5-10.5.21/libmariadb/zlib/inflate.c --- mariadb-10.5-10.5.19/libmariadb/zlib/inflate.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/inflate.c 2023-06-05 16:28:03.000000000 +0000 @@ -168,6 +168,8 @@ /* extract wrap request from windowBits parameter */ if (windowBits < 0) { + if (windowBits < -15) + return Z_STREAM_ERROR; wrap = 0; windowBits = -windowBits; } @@ -764,8 +766,9 @@ if (copy > have) copy = have; if (copy) { if (state->head != Z_NULL && - state->head->extra != Z_NULL) { - len = state->head->extra_len - state->length; + state->head->extra != Z_NULL && + (len = state->head->extra_len - state->length) < + state->head->extra_max) { zmemcpy(state->head->extra + len, next, len + copy > state->head->extra_max ? state->head->extra_max - len : copy); diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/inftrees.c mariadb-10.5-10.5.21/libmariadb/zlib/inftrees.c --- mariadb-10.5-10.5.19/libmariadb/zlib/inftrees.c 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/inftrees.c 2023-06-05 16:28:03.000000000 +0000 @@ -9,7 +9,7 @@ #define MAXBITS 15 const char inflate_copyright[] = - " inflate 1.2.12 Copyright 1995-2022 Mark Adler "; + " inflate 1.2.13 Copyright 1995-2022 Mark Adler "; /* If you use the zlib library in a product, an acknowledgment is welcome in the documentation of your product. If for some reason you cannot @@ -62,7 +62,7 @@ 35, 43, 51, 59, 67, 83, 99, 115, 131, 163, 195, 227, 258, 0, 0}; static const unsigned short lext[31] = { /* Length codes 257..285 extra */ 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 18, 18, 18, 18, - 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 199, 202}; + 19, 19, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 16, 194, 65}; static const unsigned short dbase[32] = { /* Distance codes 0..29 base */ 1, 2, 3, 4, 5, 7, 9, 13, 17, 25, 33, 49, 65, 97, 129, 193, 257, 385, 513, 769, 1025, 1537, 2049, 3073, 4097, 6145, diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/inftrees.h mariadb-10.5-10.5.21/libmariadb/zlib/inftrees.h --- mariadb-10.5-10.5.19/libmariadb/zlib/inftrees.h 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/inftrees.h 2023-06-05 16:28:03.000000000 +0000 @@ -38,7 +38,7 @@ /* Maximum size of the dynamic table. The maximum number of code structures is 1444, which is the sum of 852 for literal/length codes and 592 for distance codes. These values were found by exhaustive searches using the program - examples/enough.c found in the zlib distribtution. The arguments to that + examples/enough.c found in the zlib distribution. The arguments to that program are the number of symbols, the initial root table size, and the maximum bit length of a code. "enough 286 9 15" for literal/length codes returns returns 852, and "enough 30 6 15" for distance codes returns 592. diff -Nru mariadb-10.5-10.5.19/libmariadb/zlib/treebuild.xml mariadb-10.5-10.5.21/libmariadb/zlib/treebuild.xml --- mariadb-10.5-10.5.19/libmariadb/zlib/treebuild.xml 2023-01-30 20:31:37.000000000 +0000 +++ mariadb-10.5-10.5.21/libmariadb/zlib/treebuild.xml 2023-06-05 16:28:03.000000000 +0000 @@ -1,6 +1,6 @@ - - + + zip compression library @@ -101,7 +101,7 @@