From b472bc2eba017b3286dc7110f1c2ce3a039e6ac7 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Tue, 2 Jan 2018 14:32:21 +0100 Subject: [PATCH 1/9] MDEV-17028: Use descriptive file names for sysusers and tmpfiles configuration These files were installed to: ${INSTALL_SYSTEMD_SYSUSERSDIR}/sysusers.conf ${INSTALL_SYSTEMD_TMPFILESDIR}/tmpfiles.conf Instead rename the files to more descriptive file names 'mariadb.conf'. --- support-files/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 62ad8bcffc9..b3162f484ce 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -118,7 +118,8 @@ IF(UNIX) CONFIGURE_FILE(sysusers.conf.in ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf - DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} COMPONENT Server) + DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} + RENAME mariadb.conf COMPONENT Server) ENDIF() IF(INSTALL_SYSTEMD_TMPFILESDIR) @@ -126,7 +127,8 @@ IF(UNIX) CONFIGURE_FILE(tmpfiles.conf.in ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf - DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} COMPONENT Server) + DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} + RENAME mariadb.conf COMPONENT Server) ENDIF() # @ in directory name broken between CMake version 2.8.12.2 and 3.3 From 742c36d048e00c8f1106433ef9a73d445e6a8083 Mon Sep 17 00:00:00 2001 From: Rafli Akmal Date: Thu, 28 Dec 2017 22:19:28 +0800 Subject: [PATCH 2/9] MDEV-15052: Allow sysusers and tmpfiles install for non-systemd users ..as they have their own tools that parses those files, such as opensysusers[1] that handles sysusers file and opentmpfiles[2] that handles tmpfiles.d settings Because of this. Move both sysusers and tmpfiles 'if' function outside systemd function, allowing independent install Signed-off-by: Rafli Akmal [1] - https://github.com/artix-linux/opensysusers [2] - https://github.com/OpenRC/opentmpfiles Changes done by vicentiu@mariadb.org, from original author patch: Installing sysusers and tmpfiles without checking for systemd existence means that by default, cmake will ALWAYS install these files. Our general policy is we do not install things which are not needed. However, there is a valid use case when these files are useful, as is described above. To allow this, provide an extra switch that can be enabled during configuring by doing -DINSTALL_SYSTEMD_{SYSUSERS|TMPFILES}=True This will use the default path INSTALL_SYSTEMD_{SYSUSERS|TMPFILES}DIR fetched from install_layout.cmake for rpm & deb based layouts respectively, or they must be overriden if the install_layout is standalone. Example: cmake . -DINSTALL_SYSTEMD_SYSUSERS=True -DINSTALL_SYSTEMD_SYSUSERSDIR=/etc/sysusers.d --- support-files/CMakeLists.txt | 37 +++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index b3162f484ce..363646a0647 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -114,23 +114,6 @@ IF(UNIX) ${CMAKE_CURRENT_BINARY_DIR}/mariadb.service DESTINATION ${inst_location}/systemd COMPONENT SupportFiles) - IF(INSTALL_SYSTEMD_SYSUSERSDIR) - CONFIGURE_FILE(sysusers.conf.in - ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf - DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} - RENAME mariadb.conf COMPONENT Server) - ENDIF() - - IF(INSTALL_SYSTEMD_TMPFILESDIR) - get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY) - CONFIGURE_FILE(tmpfiles.conf.in - ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY) - INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf - DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} - RENAME mariadb.conf COMPONENT Server) - ENDIF() - # @ in directory name broken between CMake version 2.8.12.2 and 3.3 # http://public.kitware.com/Bug/view.php?id=14782 IF(NOT CMAKE_VERSION VERSION_LESS 3.3.0 OR NOT RPM) @@ -157,6 +140,26 @@ IF(UNIX) ENDIF() ENDIF() + # Allow installing sysusers and tmpusers without requiring SYSTEMD on the + # system. This is useful for distributions running other init systems to + # parse these files and create appropriate users & tmpfiles. + IF((HAVE_SYSTEMD OR INSTALL_SYSTEMD_SYSUSERS) AND INSTALL_SYSTEMD_SYSUSERSDIR) + CONFIGURE_FILE(sysusers.conf.in + ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf @ONLY) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sysusers.conf + DESTINATION ${INSTALL_SYSTEMD_SYSUSERSDIR} + RENAME mariadb.conf COMPONENT Server) + ENDIF() + + IF((HAVE_SYSTEMD OR INSTALL_SYSTEMD_TMPUSERS) AND INSTALL_SYSTEMD_TMPFILESDIR) + get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY) + CONFIGURE_FILE(tmpfiles.conf.in + ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf @ONLY) + INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/tmpfiles.conf + DESTINATION ${INSTALL_SYSTEMD_TMPFILESDIR} + RENAME mariadb.conf COMPONENT Server) + ENDIF() + IF (INSTALL_SYSCONFDIR) INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/mysql-log-rotate DESTINATION ${INSTALL_SYSCONFDIR}/logrotate.d RENAME mysql COMPONENT SupportFiles) From 84d4005bad1abc45c5baac581ae26a563dea14bb Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Sat, 25 Jan 2020 23:50:41 +0200 Subject: [PATCH 3/9] List of unstable tests for 10.1.44 release --- mysql-test/unstable-tests | 263 +++++++++++++++++--------------------- 1 file changed, 117 insertions(+), 146 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index 6ed67cdba94..e78157ca6c4 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,43 +23,39 @@ # ############################################################################## # -# Based on 10.1 05e72a33331bd9ad96ebbe4c844b94f0a5fb7390 +# Based on bb-10.1-release 599a06098b967db3d636c1053bdbdd0011cba606 main.alter_table_trans : MDEV-12084 - timeout main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result main.auth_named_pipe : MDEV-14724 - System error 2 -main.bootstrap : Modified in 10.1.41 -main.connect_debug : Modified in 10.1.41 +main.connect_debug : Modified in 10.1.44 main.count_distinct2 : MDEV-11768 - timeout main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : MDEV-16271 - Wrong result main.ctype_utf16 : MDEV-10675: timeout or extra warnings -main.ctype_utf8_def_upgrade : Added in 10.1.41 main.debug_sync : MDEV-10607 - internal error -main.derived : Modified in 10.1.41 main.derived_opt : MDEV-11768 - timeout -main.derived_view : Modified in 10.1.41 main.dirty_close : MDEV-19368 - mysqltest failed but provided no output main.drop_bad_db_type : Modified in 10.1.42 main.drop_debug : Modified in 10.1.42 main.events_2 : MDEV-13277 - Server crash -main.events_bugs : MDEV-12892 - Crash in fill_schema_processlist +main.events_bugs : MDEV-12892 - Crash in fill_schema_processlist; modified in 10.1.44 main.events_restart : MDEV-12236 - Server shutdown problem main.events_slowlog : MDEV-12821 - Wrong result main.flush : MDEV-19368 - mysqltest failed but provided no output +main.func_gconcat : MDEV-21379 - Valgrind warnings main.func_math : Modified in 10.1.42 +main.func_misc : Modified in 10.1.44 main.gis : MDEV-13411 - wrong result on P8 +main.gis_notembedded : MDEV-21264 - Wrong result with different default charset +main.group_by : MDEV-21565 - Wrong result; modified in 10.1.44 main.host_cache_size_functionality : MDEV-10606 - sporadic failure on shutdown main.index_intersect_innodb : MDEV-10643 - failed with timeout main.index_merge_innodb : MDEV-7142 - Wrong execution plan, timeout with valgrind; modified in 10.1.42 main.index_merge_myisam : Modified in 10.1.42 -main.information_schema_parameters : Modified in 10.1.41 main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure +main.insert_debug : Added in 10.1.44 main.join : Modified in 10.1.42 -main.join_cache : Modified in 10.1.41 -main.join_nested : Modified in 10.1.41 -main.join_outer : Modified in 10.1.41 -main.join_outer_innodb : Modified in 10.1.41 main.kill_processlist-6619 : MDEV-10793 - wrong result in processlist main.loaddata : MDEV-19368 - mysqltest failed but provided no output main.locale : MDEV-20521 - Wrong result (missing warning) @@ -69,16 +65,12 @@ main.log_tables-big : MDEV-13408 - wrong result main.mdev-504 : MDEV-10607 - sporadic "can't connect" main.mdev375 : MDEV-10607 - sporadic "can't connect" main.merge : MDEV-10607 - sporadic "can't connect" -main.multi_update : Modified in 10.1.41 -main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out; added in 10.1.41 -main.multi_update_innodb : Modified in 10.1.41 +main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out main.myisam : Modified in 10.1.42 main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2 main.mysql_client_test_comp : MDEV-19369 - error: 5888, status: 23, errno: 2 main.mysql_client_test_nonblock : MDEV-15096 - exec failed main.mysql_upgrade_noengine : MDEV-14355 - Plugin is busy -main.mysqld--help : Modified in 10.1.41 -main.mysqldump : Modified in 10.1.41 main.mysqlhotcopy_myisam : MDEV-10995 - test hangs on debug build main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-9269 - fails on Alpha @@ -88,16 +80,12 @@ main.order_by_innodb : Modified in 10.1.42 main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock; modified in 10.1.42 main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings -main.plugin : Modified in 10.1.41 -main.plugin_not_embedded : Modified in 10.1.41 main.processlist : Modified in 10.1.42 main.processlist_notembedded : Added in 10.1.42 -main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count; modified in 10.1.41 -main.ps_innodb : Added in 10.1.41 +main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count main.query_cache : MDEV-12895 - Wrong result main.query_cache_debug : MDEV-15281 - Resize or similar command in progress main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away -main.repair_symlink-5543 : Modified in 10.1.41 main.selectivity : Modified in 10.1.44 main.set_statement : MDEV-13183 - Wrong result main.show_explain : MDEV-10674 - sporadic failure @@ -105,23 +93,19 @@ main.sp : Modified in 10.1.42 main.sp-code : Modified in 10.1.42 main.sp-security : MDEV-10607 - sporadic "can't connect" main.sp_notembedded : MDEV-10607 - internal error -main.stat_tables : Modified in 10.1.41 main.stat_tables_par_innodb : MDEV-14155 - wrong rounding main.status : MDEV-8510 - sporadic wrong result -main.subselect : Modified in 10.1.41 main.subselect_innodb : MDEV-10614 - sporadic wrong results main.subselect_sj : Modified in 10.1.42 -main.subselect_sj_mat : Modified in 10.1.41 main.sum_distinct-big : Modified in 10.1.42 main.tc_heuristic_recover : MDEV-15200 - wrong error on mysqld_stub_cmd -main.trigger_null-8605 : Modified in 10.1.41 main.type_blob : MDEV-15195 - Wrong result main.type_date : Modified in 10.1.42 -main.type_datetime : Modified in 10.1.42 +main.type_datetime : Modified in 10.1.44 main.type_datetime_hires : MDEV-10687 - timeout -main.type_int : Modified in 10.1.42 +main.type_int : Modified in 10.1.44 main.type_newdecimal : Modified in 10.1.42 -main.view : Modified in 10.1.41 +main.type_time : Modified in 10.1.44 main.wait_timeout : Lost connection to MySQL server during query main.xa : MDEV-11769 - lock wait timeout @@ -139,11 +123,12 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed #----------------------------------------------------------------------- binlog.binlog_commit_wait : MDEV-10150 - Error: too much time elapsed +binlog.binlog_invalid_read_in_rotate : Added in 10.1.44 binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_mysqlbinlog_stop_never : Added in 10.1.41 -binlog.binlog_parallel_replication_marks_row : Include file modified in 10.1.41 -binlog.binlog_parallel_replication_marks_stm_mix : Include file modified in 10.1.41 +binlog.binlog_parallel_replication_marks_row : Include file modified in 10.1.44 +binlog.binlog_parallel_replication_marks_stm_mix : Include file modified in 10.1.44 binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.1.42 +binlog.binlog_show_binlog_event_random_pos : Added in 10.1.44 binlog.binlog_stm_drop_tmp_tbl : Include file modified in 10.1.42 binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint binlog.load_data_stm_view : MDEV-16948 - Wrong result @@ -152,6 +137,7 @@ binlog.load_data_stm_view : MDEV-16948 - Wrong result binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint binlog_encryption.encrypted_master : MDEV-12906 - Failed to sync +binlog_encryption.multisource : MDEV-21289 - Wrong error code binlog_encryption.rpl_corruption : Include file modified in 10.1.44 binlog_encryption.rpl_parallel : MDEV-10653 - Timeout binlog_encryption.rpl_parallel_ignored_errors : Added in 10.1.42 @@ -163,12 +149,14 @@ binlog_encryption.rpl_typeconv : MDEV-14362 - Lost connection to #----------------------------------------------------------------------- -connect.pivot : MDEV-14803 - failed to discover table -connect.zip : MDEV-13884 - Wrong result - -#----------------------------------------------------------------------- - -disks.disks_notembedded : Added in 10.1.41 +connect.grant : Modified in 10.1.44 +connect.grant2 : Modified in 10.1.44 +connect.ini_grant : Modified in 10.1.44 +connect.mysql_grant : Modified in 10.1.44 +connect.pivot : MDEV-21378 - Valgrind warnings; MDEV-14803 - failed to discover table +connect.xml2_grant : Include file modified in 10.1.44 +connect.xml_grant : Include file modified in 10.1.44 +connect.zip : MDEV-13884 - Wrong result #----------------------------------------------------------------------- @@ -187,6 +175,7 @@ encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result encryption.innodb_encryption_is : MDEV-12898 - Server hang on startup encryption.innodb_encryption_row_compressed : MDEV-16113 - Crash encryption.innodb_first_page : MDEV-10689 - Crash +encryption.innodb_onlinealter_encryption : MDEV-14121 - Assertion failure encryption.innodb_scrub : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_background : MDEV-8139 - scrubbing tests need fixing encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests need fixing @@ -238,10 +227,7 @@ galera_3nodes.* : The suite has not been stabilized yet #----------------------------------------------------------------------- innodb.binlog_consistent : MDEV-10618 - Server fails to start -innodb.check_ibd_filesize : Added in 10.1.41 -innodb.create_select : Added in 10.1.41 -innodb.doublewrite : MDEV-12905 - Lost connection to MySQL server -innodb.foreign-keys : Modified in 10.1.41 +innodb.doublewrite : MDEV-12905 - Lost connection to MySQL server; MDEV-21380 - Assertion failure innodb.group_commit_crash : MDEV-11770 - Checksum mismatch innodb.group_commit_crash_no_optimize_thread : MDEV-11770 - Checksum mismatch innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup @@ -253,8 +239,6 @@ innodb.innodb-fk : MDEV-13832 - Assertion failure on innodb.innodb-page_compression_default : MDEV-14121 - Assertion failure innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result on Fedora 25 innodb.innodb-page_compression_zip : MDEV-10641 - Mutex problem -innodb.innodb-system-table-view : Added in 10.1.41 -innodb.innodb-wl5980-debug : Added in 10.1.41 innodb.innodb_bug14147491 : MDEV-11808 - Wrong error codes innodb.innodb_bug30423 : MDEV-7311 - Wrong number of rows in the plan innodb.innodb_bug48024 : MDEV-14352 - Assertion failure @@ -277,7 +261,6 @@ innodb.xa_recovery : MDEV-15279 - mysqld got exception innodb_fts.concurrent_insert : Modified in 10.1.42 innodb_fts.crash_recovery : Modified in 10.1.42 -innodb_fts.innodb_ft_aux_table : Added in 10.1.41 innodb_fts.innodb_fts_misc : Modified in 10.1.44 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning @@ -314,9 +297,8 @@ mroonga/wrapper.repair_table_no_index_file : MDEV-14807 - Wrong error message #----------------------------------------------------------------------- multi_source.gtid : MDEV-10417 - Fails on Mips -multi_source.info_logs : MDEV-10042 - Wrong result, MDEV-12629 - Valgrind warnings -multi_source.mdev-8874 : Added in 10.1.41 -multi_source.multisource : MDEV-10417 - Fails on Mips +multi_source.info_logs : MDEV-10042 - Wrong result, MDEV-12629 - Valgrind warnings, MDEV-21290 - Wrong result +multi_source.multisource : MDEV-10417 - Fails on Mips, MDEV-21289 - Wrong error code multi_source.reset_slave : MDEV-10690 - wrong result multi_source.simple : MDEV-4633 - Wrong slave status output multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_heartbeats @@ -339,6 +321,7 @@ perfschema.connect_attrs : MDEV-17283 - Wrong result perfschema.func_file_io : MDEV-5708 - fails for s390x perfschema.func_mutex : MDEV-5708 - fails for s390x perfschema.hostcache_ipv6_ssl : MDEV-10696 - crash on shutdown +perfschema.hostcache_peer_addr : MDEV-21462 - Test condition timeout perfschema.misc : Modified in 10.1.44 perfschema.privilege_table_io : MDEV-13184 - Extra lines perfschema.rpl_gtid_func : MDEV-16897 - Wrong result @@ -364,94 +347,83 @@ roles.create_and_grant_role : MDEV-11772 - wrong result #----------------------------------------------------------------------- -rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free -rpl.create_or_replace_mix : MDEV-20523 - Wrong result; include file modified in 10.1.41 -rpl.create_or_replace_row : Include file modified in 10.1.41 -rpl.create_or_replace_statement : MDEV-20523 - Wrong result; include file modified in 10.1.41 -rpl.create_select : MDEV-14121 - Assertion failure -rpl.kill_race_condition : Modified in 10.1.41 -rpl.last_insert_id : MDEV-10625 - warnings in error log -rpl.mdev_17588 : Modified in 10.1.42 -rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips -rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips -rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log -rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registering on master -rpl.rpl_blackhole : Modified in 10.1.41 -rpl.rpl_blackhole_row_annotate : Added in 10.1.41 -rpl.rpl_colSize : MDEV-16112 - Server crash -rpl.rpl_corruption : Include file modified in 10.1.44 -rpl.rpl_create_or_replace_fail : Added in 10.1.42 -rpl.rpl_ddl : MDEV-10417 - Fails on Mips -rpl.rpl_domain_id_filter_io_crash : MDEV-14357 - Wrong result -rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Warnings/errors -rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Warnings/errors -rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start -rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output -rpl.rpl_gtid_basic : MDEV-10681 - server startup problem -rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master -rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout in include -rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings -rpl.rpl_gtid_reconnect : MDEV-14497 - Timeout -rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings -rpl.rpl_gtid_until : MDEV-10625 - warnings in error log -rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips -rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x -rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x -rpl.rpl_insert_id : MDEV-15197 - Wrong result -rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure -rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query -rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips -rpl.rpl_known_bugs_detection : Modified in 10.1.42 -rpl.rpl_mariadb_slave_capability : MDEV-11018 - sporadic wrong events in binlog -rpl.rpl_mdev12179 : MDEV-19043 - Warnings/errors -rpl.rpl_mdev6020 : MDEV-10417 - Fails on Mips -rpl.rpl_mdev_17614 : Added in 10.1.42 -rpl.rpl_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed -rpl.rpl_non_direct_mixed_mixing_engines : MDEV-14489 - Sync slave with master failed -rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master pos wait -rpl.rpl_non_direct_stm_mixing_engines : MDEV-14489 - Sync slave with master failed -rpl.rpl_parallel : MDEV-10653 - Timeouts -rpl.rpl_parallel_ignored_errors : Added in 10.1.42 -rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure -rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout -rpl.rpl_parallel_optimistic : MDEV-10511 - Timeout -rpl.rpl_parallel_retry : MDEV-11119 - Server crash -rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables -rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips -rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings -rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start -rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result -rpl.rpl_row_drop_temp_table : Added in 10.1.41 -rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_img_eng_min : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed -rpl.rpl_row_index_choice : MDEV-15196 - Slave crash -rpl.rpl_row_mysqlbinlog : Modified in 10.1.41 -rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x -rpl.rpl_semi_sync : MDEV-11220 - Wrong result -rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result -rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result -rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings -rpl.rpl_semi_sync_gtid_reconnect : Added in 10.1.44 -rpl.rpl_semi_sync_skip_repl : Modified in 10.1.41 -rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status; modified in 10.1.41 -rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition -rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem -rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha -rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock -rpl.rpl_start_stop_slave : MDEV-13567 - Replication failure -rpl.rpl_stm_mixing_engines : MDEV-14489 - Sync slave with master failed -rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion -rpl.rpl_sync : MDEV-10633 - Database page corruption -rpl.rpl_sync_with_innodb_thd_conc : Added in 10.1.42 -rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries -rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output -rpl.rpl_trigger : MDEV-18055 - Wrong result -rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error in test -rpl.rpl_unsafe_statements : Modified in 10.1.42 -rpl.rpl_user_variables : MDEV-20522 - Wrong result -rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result +rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free +rpl.create_or_replace_mix : MDEV-20523 - Wrong result +rpl.create_or_replace_statement : MDEV-20523 - Wrong result +rpl.create_select : MDEV-14121 - Assertion failure +rpl.last_insert_id : MDEV-10625 - warnings in error log +rpl.mdev_17588 : Modified in 10.1.42 +rpl.rpl_auto_increment : MDEV-10417 - Fails on Mips +rpl.rpl_auto_increment_bug45679 : MDEV-10417 - Fails on Mips +rpl.rpl_auto_increment_update_failure : MDEV-10625 - warnings in error log +rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registering on master +rpl.rpl_colSize : MDEV-16112 - Server crash +rpl.rpl_corruption : Include file modified in 10.1.44 +rpl.rpl_create_or_replace_fail : Added in 10.1.42 +rpl.rpl_ddl : MDEV-10417 - Fails on Mips +rpl.rpl_domain_id_filter_io_crash : MDEV-14357 - Wrong result +rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Warnings/errors +rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Warnings/errors +rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start +rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output +rpl.rpl_gtid_basic : MDEV-10681 - server startup problem +rpl.rpl_gtid_crash : MDEV-9501 - Warning: failed registering on master +rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout in include +rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings +rpl.rpl_gtid_reconnect : MDEV-14497 - Timeout +rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings +rpl.rpl_gtid_until : MDEV-10625 - warnings in error log +rpl.rpl_innodb_bug30888 : MDEV-10417 - Fails on Mips +rpl.rpl_insert : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_insert_delayed : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_insert_id : MDEV-15197 - Wrong result +rpl.rpl_insert_id_pk : MDEV-16567 - Assertion failure +rpl.rpl_insert_ignore : MDEV-14365 - Lost connection to MySQL server during query +rpl.rpl_invoked_features : MDEV-10417 - Fails on Mips +rpl.rpl_known_bugs_detection : Modified in 10.1.42 +rpl.rpl_mariadb_slave_capability : MDEV-11018 - sporadic wrong events in binlog +rpl.rpl_mdev12179 : MDEV-19043 - Warnings/errors +rpl.rpl_mdev6020 : MDEV-10417 - Fails on Mips +rpl.rpl_mdev_17614 : Added in 10.1.42 +rpl.rpl_non_direct_row_mixing_engines : MDEV-16561 - Timeout in master pos wait +rpl.rpl_parallel : MDEV-10653 - Timeouts +rpl.rpl_parallel_ignored_errors : Added in 10.1.42 +rpl.rpl_parallel_mdev6589 : MDEV-12979 - Assertion failure +rpl.rpl_parallel_multilevel2 : MDEV-14723 - Timeout +rpl.rpl_parallel_optimistic : MDEV-10511 - Timeout +rpl.rpl_parallel_retry : MDEV-11119 - Server crash +rpl.rpl_parallel_temptable : MDEV-10356 - Crash in close_thread_tables +rpl.rpl_partition_innodb : MDEV-10417 - Fails on Mips +rpl.rpl_password_boundaries : MDEV-11534 - Slave IO warnings +rpl.rpl_row_basic_11bugs : MDEV-12171 - Server failed to start +rpl.rpl_row_basic_2myisam : MDEV-13875 - command "diff_files" failed +rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result +rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed +rpl.rpl_row_img_eng_min : MDEV-13875 - command "diff_files" failed +rpl.rpl_row_img_eng_noblob : MDEV-13875 - command "diff_files" failed +rpl.rpl_row_index_choice : MDEV-15196 - Slave crash +rpl.rpl_row_sp001 : MDEV-9329 - Fails on Ubuntu/s390x +rpl.rpl_semi_sync : MDEV-11220 - Wrong result +rpl.rpl_semi_sync_after_sync : MDEV-14366 - Wrong result +rpl.rpl_semi_sync_after_sync_row : MDEV-14366 - Wrong result +rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings +rpl.rpl_semi_sync_gtid_reconnect : Added in 10.1.44 +rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Wrong plugin status +rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition +rpl.rpl_show_slave_hosts : MDEV-10681 - server startup problem +rpl.rpl_skip_replication : MDEV-9268 - Fails with timeout in sync_slave_with_master on Alpha +rpl.rpl_slave_grp_exec : MDEV-10514 - Unexpected deadlock +rpl.rpl_start_stop_slave : MDEV-13567 - Replication failure +rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion +rpl.rpl_sync : MDEV-10633 - Database page corruption +rpl.rpl_sync_with_innodb_thd_conc : Added in 10.1.42 +rpl.rpl_temporary_error2 : MDEV-10634 - Wrong number of retries +rpl.rpl_test_framework : MDEV-19368 - mysqltest failed but provided no output +rpl.rpl_trigger : MDEV-18055 - Wrong result +rpl.rpl_truncate_3innodb : MDEV-19454 - Syntax error in test +rpl.rpl_unsafe_statements : Modified in 10.1.42 +rpl.rpl_user_variables : MDEV-20522 - Wrong result +rpl.sec_behind_master-5114 : MDEV-13878 - Wrong result #----------------------------------------------------------------------- @@ -494,14 +466,13 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #----------------------------------------------------------------------- -sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x -sys_vars.delayed_insert_limit_func : Modified in 10.1.42 -sys_vars.innodb_ft_result_cache_limit_32 : Modified in 10.1.41 -sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout -sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash -sys_vars.rpl_init_slave_func : MDEV-10149 - wrong results -sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result -sys_vars.wait_timeout_func : MDEV-12896 - Wrong result +sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x +sys_vars.delayed_insert_limit_func : Modified in 10.1.42 +sys_vars.keep_files_on_create_basic : MDEV-10676 - timeout +sys_vars.log_slow_admin_statements_func : MDEV-12235 - Server crash +sys_vars.rpl_init_slave_func : MDEV-10149 - wrong results +sys_vars.thread_cache_size_func : MDEV-11775 - Wrong result +sys_vars.wait_timeout_func : MDEV-12896 - Wrong result #----------------------------------------------------------------------- @@ -565,11 +536,11 @@ vcol.vcol_misc : MDEV-16651 - Wrong error message wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node wsrep.mdev_6832 : MDEV-14195 - Failure upon check-testcase -wsrep.mysql_tzinfo_to_sql_symlink_skip : Added in 10.1.42 +wsrep.mysql_tzinfo_to_sql_symlink : Modified in 10.1.44 +wsrep.mysql_tzinfo_to_sql_symlink_skip : Modified in 10.1.44 wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use wsrep.variables : MDEV-17585 - Deadlock #----------------------------------------------------------------------- -wsrep_info.* : Cnf file modified in 10.1.41 wsrep_info.plugin : MDEV-12909 - Wrong result From a7d02e8d24d395058229bff61a0fea49f101e6c0 Mon Sep 17 00:00:00 2001 From: Daniel Bartholomew Date: Mon, 27 Jan 2020 15:06:54 -0500 Subject: [PATCH 4/9] bump the VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index c4402b8a39e..735bcc43b0b 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=1 -MYSQL_VERSION_PATCH=44 +MYSQL_VERSION_PATCH=45 From 9aaa3e1fdab5f25017734d518f6cabd7b21d6891 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicen=C8=9Biu=20Ciorbaru?= Date: Tue, 28 Jan 2020 17:48:57 +0200 Subject: [PATCH 5/9] Ingore sysusers and tmpfiles artifacts --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 4a633f79f04..da399198eb6 100644 --- a/.gitignore +++ b/.gitignore @@ -226,6 +226,8 @@ support-files/mysqld_multi.server support-files/wsrep.cnf support-files/wsrep_notify support-files/policy/selinux/mysqld-safe.pp +support-files/sysusers.conf +support-files/tmpfiles.conf tags tests/async_queries tests/bug25714 From 5271d43648957141b55159958b66fd635d80ac85 Mon Sep 17 00:00:00 2001 From: Daniel Black Date: Tue, 28 Jan 2020 18:03:13 +0200 Subject: [PATCH 6/9] MDEV-14330 Move mysqltest.1 man page to appropriate test package from server package Original patch from Daniel Black , backported to 10.1. --- man/CMakeLists.txt | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/man/CMakeLists.txt b/man/CMakeLists.txt index 6580820a835..3ea3bfd57eb 100644 --- a/man/CMakeLists.txt +++ b/man/CMakeLists.txt @@ -21,7 +21,7 @@ SET(MAN1_SERVER innochecksum.1 my_print_defaults.1 myisam_ftdump.1 myisamchk.1 mysql_secure_installation.1 mysql_setpermission.1 mysql_tzinfo_to_sql.1 mysql_upgrade.1 mysql_zap.1 mysqld_multi.1 mysqld_safe.1 mysqldumpslow.1 mysqlhotcopy.1 - mysqltest.1 perror.1 replace.1 resolve_stack_dump.1 + perror.1 replace.1 resolve_stack_dump.1 resolveip.1 mysqlbug.1 mariadb-service-convert.1 mysqld_safe_helper.1 tokuftdump.1 wsrep_sst_common.1 wsrep_sst_mysqldump.1 wsrep_sst_rsync.1 @@ -36,7 +36,8 @@ SET(MAN1_CLIENT msql2mysql.1 mysql.1 mysql_find_rows.1 mysql_waitpid.1 mysql_plugin.1 mysql_embedded.1) SET(MAN1_DEVEL mysql_config.1) SET(MAN1_TEST mysql-stress-test.pl.1 mysql-test-run.pl.1 mysql_client_test.1 - mysqltest_embedded.1 mysql_client_test_embedded.1 my_safe_process.1) + mysqltest.1 mysqltest_embedded.1 mysql_client_test_embedded.1 + my_safe_process.1) INSTALL(FILES ${MAN1_SERVER} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPagesServer) INSTALL(FILES ${MAN8_SERVER} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPagesServer) From d89bb8867459c058997f0e315cef76d95b56fb2b Mon Sep 17 00:00:00 2001 From: Sujatha Date: Thu, 23 Jan 2020 16:17:55 +0530 Subject: [PATCH 7/9] =?UTF-8?q?MDEV-20923:UBSAN:=20member=20access=20withi?= =?UTF-8?q?n=20address=20=E2=80=A6=20which=20does=20not=20point=20to=20an?= =?UTF-8?q?=20object=20of=20type=20'xid=5Fcount=5Fper=5Fbinlog'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Problem: ------- Accessing a member within 'xid_count_per_binlog' structure results in following error when 'UBSAN' is enabled. member access within address 0xXXX which does not point to an object of type 'xid_count_per_binlog' Analysis: --------- The problem appears to be that no constructor for 'xid_count_per_binlog' is being called, and thus the vtable will not be initialized. Fix: --- Defined a parameterized constructor for 'xid_count_per_binlog' class. --- sql/log.cc | 27 +++++++++++---------------- sql/log.h | 13 ++++++++++++- 2 files changed, 23 insertions(+), 17 deletions(-) diff --git a/sql/log.cc b/sql/log.cc index acf1f8f8a9c..0efef6d1e29 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -3216,7 +3216,7 @@ void MYSQL_BIN_LOG::cleanup() DBUG_ASSERT(!binlog_xid_count_list.head()); WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::cleanup(): Removing xid_list_entry " "for %s (%lu)", b); - my_free(b); + delete b; } mysql_mutex_destroy(&LOCK_log); @@ -3580,17 +3580,9 @@ bool MYSQL_BIN_LOG::open(const char *log_name, */ uint off= dirname_length(log_file_name); uint len= strlen(log_file_name) - off; - char *entry_mem, *name_mem; - if (!(new_xid_list_entry = (xid_count_per_binlog *) - my_multi_malloc(MYF(MY_WME), - &entry_mem, sizeof(xid_count_per_binlog), - &name_mem, len, - NULL))) + new_xid_list_entry= new xid_count_per_binlog(log_file_name+off, (int)len); + if (!new_xid_list_entry) goto err; - memcpy(name_mem, log_file_name+off, len); - new_xid_list_entry->binlog_name= name_mem; - new_xid_list_entry->binlog_name_len= len; - new_xid_list_entry->xid_count= 0; /* Find the name for the Initial binlog checkpoint. @@ -3607,7 +3599,10 @@ bool MYSQL_BIN_LOG::open(const char *log_name, mysql_mutex_unlock(&LOCK_xid_list); if (!b) b= new_xid_list_entry; - strmake(buf, b->binlog_name, b->binlog_name_len); + if (b->binlog_name) + strmake(buf, b->binlog_name, b->binlog_name_len); + else + goto err; Binlog_checkpoint_log_event ev(buf, len); DBUG_EXECUTE_IF("crash_before_write_checkpoint_event", flush_io_cache(&log_file); @@ -3711,7 +3706,7 @@ bool MYSQL_BIN_LOG::open(const char *log_name, { WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::open(): Removing xid_list_entry for " "%s (%lu)", b); - my_free(binlog_xid_count_list.get()); + delete binlog_xid_count_list.get(); } mysql_cond_broadcast(&COND_xid_list); WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::open(): Adding new xid_list_entry for " @@ -3758,7 +3753,7 @@ Turning logging off for the whole duration of the MySQL server process. \ To turn it on again: fix the cause, \ shutdown the MySQL server and restart it.", name, errno); if (new_xid_list_entry) - my_free(new_xid_list_entry); + delete new_xid_list_entry; if (file >= 0) mysql_file_close(file, MYF(0)); close(LOG_CLOSE_INDEX); @@ -4252,7 +4247,7 @@ err: DBUG_ASSERT(b->xid_count == 0); WSREP_XID_LIST_ENTRY("MYSQL_BIN_LOG::reset_logs(): Removing " "xid_list_entry for %s (%lu)", b); - my_free(binlog_xid_count_list.get()); + delete binlog_xid_count_list.get(); } mysql_cond_broadcast(&COND_xid_list); reset_master_pending--; @@ -9736,7 +9731,7 @@ TC_LOG_BINLOG::mark_xid_done(ulong binlog_id, bool write_checkpoint) break; WSREP_XID_LIST_ENTRY("TC_LOG_BINLOG::mark_xid_done(): Removing " "xid_list_entry for %s (%lu)", b); - my_free(binlog_xid_count_list.get()); + delete binlog_xid_count_list.get(); } mysql_mutex_unlock(&LOCK_xid_list); diff --git a/sql/log.h b/sql/log.h index b4c9b24a3a9..277e5c6f69c 100644 --- a/sql/log.h +++ b/sql/log.h @@ -587,7 +587,18 @@ public: long xid_count; /* For linking in requests to the binlog background thread. */ xid_count_per_binlog *next_in_queue; - xid_count_per_binlog(); /* Give link error if constructor used. */ + xid_count_per_binlog(char *log_file_name, uint log_file_name_len) + :binlog_id(0), xid_count(0) + { + binlog_name_len= log_file_name_len; + binlog_name= (char *) my_malloc(binlog_name_len, MYF(MY_ZEROFILL)); + if (binlog_name) + memcpy(binlog_name, log_file_name, binlog_name_len); + } + ~xid_count_per_binlog() + { + my_free(binlog_name); + } }; I_List binlog_xid_count_list; mysql_mutex_t LOCK_binlog_background_thread; From afe9caa82d9f02eba17efc96baeb62330cfe927b Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Thu, 30 Jan 2020 17:54:49 +0530 Subject: [PATCH 8/9] MDEV-21564 Assert in trx_purge_add_update_undo_to_history during shutdown - dict_table_try_drop_aborted() can generate undo logs. So it should be avoided after shutdown of background threads. --- storage/innobase/dict/dict0dict.cc | 7 +++++-- storage/xtradb/dict/dict0dict.cc | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index 6bd5de85b08..faa804220d3 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2019, MariaDB Corporation. +Copyright (c) 2013, 2020, 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 @@ -604,7 +604,10 @@ dict_table_close( mutex_exit(&dict_sys->mutex); - if (drop_aborted) { + /* dict_table_try_drop_aborted() can generate undo logs. + So it should be avoided after shutdown of background + threads */ + if (drop_aborted && !srv_undo_sources) { dict_table_try_drop_aborted(NULL, table_id, 0); } } diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc index 2bea154749f..6d0500589b1 100644 --- a/storage/xtradb/dict/dict0dict.cc +++ b/storage/xtradb/dict/dict0dict.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2019, MariaDB Corporation. +Copyright (c) 2013, 2020, 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 @@ -604,7 +604,10 @@ dict_table_close( mutex_exit(&dict_sys->mutex); - if (drop_aborted) { + /* dict_table_try_drop_aborted() can generate undo logs. + So it should be avoided after shutdown of background + threads */ + if (drop_aborted && srv_undo_sources) { dict_table_try_drop_aborted(NULL, table_id, 0); } } From 0b36c27e0c06b798b7322ab07d8464b69a7b716c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Fri, 31 Jan 2020 10:06:55 +0200 Subject: [PATCH 9/9] MDEV-20307: Remove a useless debug check to save stack space fil_space_encrypt(): Remove the debug check that decrypts the just encrypted page. We are exercising the decryption of encrypted pages enough via --suite=encryption,mariabackup. It is a waste of computing resources to decrypt every page immediately after encrypting it. The redundant check had been added in commit 2bedc3978b90bf5abe1029df393c63ced1849bed (MDEV-9931). --- storage/innobase/fil/fil0crypt.cc | 45 +++---------------------------- storage/xtradb/fil/fil0crypt.cc | 45 +++---------------------------- 2 files changed, 6 insertions(+), 84 deletions(-) diff --git a/storage/innobase/fil/fil0crypt.cc b/storage/innobase/fil/fil0crypt.cc index 43a3bd8ff29..901b28c8c62 100644 --- a/storage/innobase/fil/fil0crypt.cc +++ b/storage/innobase/fil/fil0crypt.cc @@ -1,6 +1,6 @@ /***************************************************************************** Copyright (C) 2013, 2015, Google Inc. All Rights Reserved. -Copyright (c) 2014, 2019, MariaDB Corporation. +Copyright (c) 2014, 2020, 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 @@ -706,47 +706,8 @@ fil_space_encrypt( fil_space_crypt_t* crypt_data = space->crypt_data; ut_ad(space->n_pending_ios > 0); ulint zip_size = fsp_flags_get_zip_size(space->flags); - byte* tmp = fil_encrypt_buf(crypt_data, space->id, offset, lsn, src_frame, zip_size, dst_frame); - -#ifdef UNIV_DEBUG - if (tmp) { - /* Verify that encrypted buffer is not corrupted */ - dberr_t err = DB_SUCCESS; - byte* src = src_frame; - bool page_compressed_encrypted = (mach_read_from_2(tmp+FIL_PAGE_TYPE) == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED); - byte uncomp_mem[UNIV_PAGE_SIZE_MAX]; - byte tmp_mem[UNIV_PAGE_SIZE_MAX]; - ulint size = (zip_size) ? zip_size : UNIV_PAGE_SIZE; - - if (page_compressed_encrypted) { - memcpy(uncomp_mem, src, srv_page_size); - ulint unzipped1 = fil_page_decompress( - tmp_mem, uncomp_mem); - ut_ad(unzipped1); - if (unzipped1 != srv_page_size) { - src = uncomp_mem; - } - } - - ut_ad(!buf_page_is_corrupted(true, src, zip_size, space)); - ut_ad(fil_space_decrypt(crypt_data, tmp_mem, size, tmp, &err)); - ut_ad(err == DB_SUCCESS); - - /* Need to decompress the page if it was also compressed */ - if (page_compressed_encrypted) { - byte buf[UNIV_PAGE_SIZE_MAX]; - memcpy(buf, tmp_mem, srv_page_size); - ulint unzipped2 = fil_page_decompress(tmp_mem, buf); - ut_ad(unzipped2); - } - - memcpy(tmp_mem + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, - src + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 8); - ut_ad(!memcmp(src, tmp_mem, size)); - } -#endif /* UNIV_DEBUG */ - - return tmp; + return fil_encrypt_buf(crypt_data, space->id, offset, lsn, + src_frame, zip_size, dst_frame); } /****************************************************************** diff --git a/storage/xtradb/fil/fil0crypt.cc b/storage/xtradb/fil/fil0crypt.cc index 43a3bd8ff29..901b28c8c62 100644 --- a/storage/xtradb/fil/fil0crypt.cc +++ b/storage/xtradb/fil/fil0crypt.cc @@ -1,6 +1,6 @@ /***************************************************************************** Copyright (C) 2013, 2015, Google Inc. All Rights Reserved. -Copyright (c) 2014, 2019, MariaDB Corporation. +Copyright (c) 2014, 2020, 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 @@ -706,47 +706,8 @@ fil_space_encrypt( fil_space_crypt_t* crypt_data = space->crypt_data; ut_ad(space->n_pending_ios > 0); ulint zip_size = fsp_flags_get_zip_size(space->flags); - byte* tmp = fil_encrypt_buf(crypt_data, space->id, offset, lsn, src_frame, zip_size, dst_frame); - -#ifdef UNIV_DEBUG - if (tmp) { - /* Verify that encrypted buffer is not corrupted */ - dberr_t err = DB_SUCCESS; - byte* src = src_frame; - bool page_compressed_encrypted = (mach_read_from_2(tmp+FIL_PAGE_TYPE) == FIL_PAGE_PAGE_COMPRESSED_ENCRYPTED); - byte uncomp_mem[UNIV_PAGE_SIZE_MAX]; - byte tmp_mem[UNIV_PAGE_SIZE_MAX]; - ulint size = (zip_size) ? zip_size : UNIV_PAGE_SIZE; - - if (page_compressed_encrypted) { - memcpy(uncomp_mem, src, srv_page_size); - ulint unzipped1 = fil_page_decompress( - tmp_mem, uncomp_mem); - ut_ad(unzipped1); - if (unzipped1 != srv_page_size) { - src = uncomp_mem; - } - } - - ut_ad(!buf_page_is_corrupted(true, src, zip_size, space)); - ut_ad(fil_space_decrypt(crypt_data, tmp_mem, size, tmp, &err)); - ut_ad(err == DB_SUCCESS); - - /* Need to decompress the page if it was also compressed */ - if (page_compressed_encrypted) { - byte buf[UNIV_PAGE_SIZE_MAX]; - memcpy(buf, tmp_mem, srv_page_size); - ulint unzipped2 = fil_page_decompress(tmp_mem, buf); - ut_ad(unzipped2); - } - - memcpy(tmp_mem + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, - src + FIL_PAGE_FILE_FLUSH_LSN_OR_KEY_VERSION, 8); - ut_ad(!memcmp(src, tmp_mem, size)); - } -#endif /* UNIV_DEBUG */ - - return tmp; + return fil_encrypt_buf(crypt_data, space->id, offset, lsn, + src_frame, zip_size, dst_frame); } /******************************************************************