From d925aec1c10cebf6c34825a7de50afe4e630aff4 Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Thu, 31 Oct 2019 18:07:19 +0200 Subject: [PATCH 01/10] List of unstable tests for 10.1.42 release --- mysql-test/unstable-tests | 204 +++++++++++++++----------------------- 1 file changed, 81 insertions(+), 123 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index f09647523af87..c7b402361278d 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,10 +23,9 @@ # ############################################################################## # -# Based on 10.1 2382cd14a8c96cf8b4375d7338abfa6e1b333a86 +# Based on 10.1 1bb857089fdcd3a08cb166cb6d75f3e1dbb76f27 main.alter_table_trans : MDEV-12084 - timeout -main.analyze_stmt : Modified in 10.1.39 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 @@ -34,139 +33,100 @@ main.connect_debug : Modified in 10.1.41 main.count_distinct2 : MDEV-11768 - timeout main.create_delayed : MDEV-10605 - failed with timeout main.create_drop_event : MDEV-16271 - Wrong result -main.create_drop_role : Modified in 10.1.39 -main.ctype_big5 : Include file modified in 10.1.39 -main.ctype_euckr : Include file modified in 10.1.39 -main.ctype_gb2312 : Include file modified in 10.1.39 -main.ctype_gbk : Include file modified in 10.1.39 -main.ctype_latin1 : Include file modified in 10.1.39 -main.ctype_sjis : Include file modified in 10.1.39 -main.ctype_tis620 : Include file modified in 10.1.39 -main.ctype_uca : Include file modified in 10.1.39 -main.ctype_ucs : Include file modified in 10.1.39 -main.ctype_ujis : Include file modified in 10.1.39 -main.ctype_utf16 : MDEV-10675: timeout or extra warnings; include file modified in 10.1.39 -main.ctype_utf16_uca : Include file modified in 10.1.39 -main.ctype_utf16le : Include file modified in 10.1.39 -main.ctype_utf32 : Include file modified in 10.1.39 -main.ctype_utf32_uca : Include file modified in 10.1.39 -main.ctype_utf8 : Include file modified in 10.1.39 +main.ctype_utf16 : MDEV-10675: timeout or extra warnings main.ctype_utf8_def_upgrade : Added in 10.1.41 -main.ctype_utf8mb4 : Include file modified in 10.1.39 -main.ctype_utf8mb4_heap : Include file modified in 10.1.39 -main.ctype_utf8mb4_innodb : Include file modified in 10.1.39 -main.ctype_utf8mb4_myisam : Include file modified in 10.1.39 -main.ddl_i18n_koi8r : Modified in 10.1.39 -main.ddl_i18n_utf8 : Modified in 10.1.39 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.events_1 : Modified in 10.1.39 +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_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 : Modified in 10.1.39 -main.func_hybrid_type : Modified in 10.1.39 -main.func_math : Modified in 10.1.39 -main.func_str : Modified in 10.1.39 -main.func_time : Modified in 10.1.39 -main.gis : MDEV-13411 - wrong result on P8; modified in 10.1.39 -main.gis-precise : Modified in 10.1.39 -main.gis_notembedded : Added in 10.1.39 -main.grant4 : Modified in 10.1.39 +main.func_math : Modified in 10.1.42 +main.gis : MDEV-13411 - wrong result on P8 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.39 -main.index_merge_myisam : Include files modified in 10.1.39 +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.information_schema_prepare : Added in 10.1.39 main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure -main.join : Modified in 10.1.41 +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; modified in 10.1.39 -main.loaddata : MDEV-19368 - mysqltest failed but provided no output; modified in 10.1.39 -main.log_slow : MDEV-13263 - Wrong result; modified in 10.1.39 -main.log_slow_debug : Added in 10.1.39 +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) +main.log_slow : MDEV-13263 - Wrong result +main.log_slow_debug : Modified in 10.1.42 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.mdev_19276 : Added in 10.1.39 main.merge : MDEV-10607 - sporadic "can't connect" main.multi_update : Modified in 10.1.41 -main.multi_update_big : Added in 10.1.39 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.mysql : Modified in 10.1.39 +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.mysqldump-compat : Modified in 10.1.39 main.mysqlhotcopy_myisam : MDEV-10995 - test hangs on debug build main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-9269 - fails on Alpha -main.olap : Modified in 10.1.39 main.old-mode : MDEV-19373 - Wrong result +main.order_by_innodb : Modified in 10.1.42 main.order_by_optimizer_innodb : MDEV-10683 - wrong execution plan -main.partition : Modified in 10.1.39 -main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock -main.partition_innodb : Modified in 10.1.39 +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.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.42 main.set_statement : MDEV-13183 - Wrong result main.show_explain : MDEV-10674 - sporadic failure -main.sp : Modified in 10.1.41 +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-ucs2 : Modified in 10.1.39 -main.sp_notembedded : MDEV-10607 - internal error; modified in 10.1.39 -main.sp_trans : Modified in 10.1.39 -main.ssl_verify_ip : Added in 10.1.39 +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.statistics : Modified in 10.1.39 main.status : MDEV-8510 - sporadic wrong result -main.status2 : Modified in 10.1.39 main.subselect : Modified in 10.1.41 main.subselect_innodb : MDEV-10614 - sporadic wrong results -main.subselect_sj : Modified in 10.1.41 +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.timezone2 : Modified in 10.1.39 main.trigger_null-8605 : Modified in 10.1.41 -main.type_bit : Modified in 10.1.39 main.type_blob : MDEV-15195 - Wrong result -main.type_date : Modified in 10.1.39 -main.type_datetime : Modified in 10.1.41 +main.type_date : Modified in 10.1.42 +main.type_datetime : Modified in 10.1.42 main.type_datetime_hires : MDEV-10687 - timeout -main.type_decimal : Modified in 10.1.39 -main.type_year : Modified in 10.1.39 -main.update_innodb : Modified in 10.1.39 -main.userstat : Modified in 10.1.39 +main.type_int : Modified in 10.1.42 +main.type_newdecimal : Modified in 10.1.42 main.view : Modified in 10.1.41 -main.view_grant : Modified in 10.1.39 main.wait_timeout : Lost connection to MySQL server during query main.xa : MDEV-11769 - lock wait timeout #----------------------------------------------------------------------- archive.archive_bitfield : MDEV-11771 - Extra warning -archive.archive_eits : Added in 10.1.39 archive.archive_symlink : MDEV-12170 - unexpected error on rmdir archive.discover : MDEV-10510 - Table is marked as crashed archive.mysqlhotcopy_archive : MDEV-14726 - Table is marked as crashed @@ -178,27 +138,26 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed #----------------------------------------------------------------------- binlog.binlog_commit_wait : MDEV-10150 - Error: too much time elapsed -binlog.binlog_innodb_stm : Added in 10.1.39 binlog.binlog_killed : MDEV-12925 - Wrong result -binlog.binlog_mysqlbinlog2 : Modified in 10.1.39 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_row_drop_tmp_tbl : Include file modified in 10.1.41 -binlog.binlog_stm_drop_tmp_tbl : MDEV-20188 - Unknown table on exec; include file modified in 10.1.41 +binlog.binlog_row_drop_tmp_tbl : Include file modified in 10.1.42 +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 #----------------------------------------------------------------------- -binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint -binlog_encryption.encrypted_master : MDEV-12906 - Failed to sync -binlog_encryption.rpl_parallel : MDEV-10653 - Timeout -binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout -binlog_encryption.rpl_semi_sync : MDEV-11220 - Wrong result, MDEV-11673 - Valgrind warning -binlog_encryption.rpl_ssl : MDEV-14507 - Timeout on SLES 11.4 -binlog_encryption.rpl_stm_relay_ign_space : MDEV-19375 - Test assertion failed in assertion.inc -binlog_encryption.rpl_typeconv : MDEV-14362 - Lost connection to MySQL server during query +binlog_encryption.binlog_xa_recover : MDEV-12908 - Extra checkpoint +binlog_encryption.encrypted_master : MDEV-12906 - Failed to sync +binlog_encryption.rpl_parallel : MDEV-10653 - Timeout +binlog_encryption.rpl_parallel_ignored_errors : Added in 10.1.42 +binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout +binlog_encryption.rpl_semi_sync : MDEV-11220 - Wrong result, MDEV-11673 - Valgrind warning +binlog_encryption.rpl_ssl : MDEV-14507 - Timeout on SLES 11.4 +binlog_encryption.rpl_stm_relay_ign_space : MDEV-19375 - Test assertion failed in assertion.inc +binlog_encryption.rpl_typeconv : MDEV-14362 - Lost connection to MySQL server during query #----------------------------------------------------------------------- @@ -216,7 +175,6 @@ encryption.debug_key_management : MDEV-13841 - Timeout on wait con encryption.encrypt_and_grep : MDEV-13765 - Wrong result encryption.innodb-bad-key-change2 : MDEV-19118 - Can't connect through socket encryption.innodb-compressed-blob : MDEV-14728 - Unable to get certificate -encryption.innodb-encryption-alter : Modified in 10.1.39 encryption.innodb-first-page-read : MDEV-14356 - Timeout on wait condition encryption.innodb-page_encryption : MDEV-10641 - mutex problem encryption.innodb-read-only : MDEV-14728 - Unable to get certificate; MDEV-16563 - Crash on startup @@ -224,6 +182,7 @@ encryption.innodb-redo-badkey : MDEV-12898 - Server hang on star encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait condition encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure 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_scrub : MDEV-8139 - scrubbing tests need fixing @@ -253,11 +212,9 @@ federated.federatedx : MDEV-10617 - Wrong checksum, timeouts #----------------------------------------------------------------------- -funcs_1.memory_views : MDEV-11773 - timeout -funcs_1.processlist_priv_no_prot : Include file modified in 10.1.39 -funcs_1.processlist_priv_ps : Include file modified in 10.1.39 -funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result; include file modified in 10.1.39 -funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan; include file modified in 10.1.39 +funcs_1.memory_views : MDEV-11773 - timeout +funcs_1.processlist_val_no_prot : MDEV-11223 - Wrong result +funcs_1.processlist_val_ps : MDEV-12175 - Wrong plan #----------------------------------------------------------------------- @@ -278,29 +235,23 @@ galera_3nodes.* : The suite has not been stabilized yet #----------------------------------------------------------------------- -innodb.alter_crash : Added in 10.1.39 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.foreign_key : Modified in 10.1.39 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 innodb.innodb-alter-debug : MDEV-13182 - InnoDB: adjusting FSP_SPACE_FLAGS -innodb.innodb-alter-nullable : Modified in 10.1.39 innodb.innodb-alter-table : MDEV-10619 - Testcase timeout -innodb.innodb-autoinc : Modified in 10.1.41 +innodb.innodb-autoinc : Modified in 10.1.42 innodb.innodb-blob : MDEV-12053 - Client crash -innodb.innodb-corrupted-table : Modified in 10.1.39 innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown -innodb.innodb-index : Modified in 10.1.39 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-truncate : Modified in 10.1.39 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 @@ -314,15 +265,18 @@ innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult t innodb.log_file_size : MDEV-15668 - Not found pattern innodb.recovery_shutdown : MDEV-15671 - Warning: database page corruption innodb.row_format_redundant : MDEV-15192 - Trying to access missing tablespace +innodb.stat_tables : Added in 10.1.42 innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-19374 - Server failed to restart -innodb.trx_id_future : MDEV-20138 - Table doesn't exist in engine; added in 10.1.41 -innodb.xa_debug : Added in 10.1.39 +innodb.trx_id_future : Modified in 10.1.42 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.42 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning #----------------------------------------------------------------------- @@ -333,12 +287,10 @@ maria.maria : MDEV-14430 - Wrong result #----------------------------------------------------------------------- -mariabackup.absolute_ibdata_paths : Modified in 10.1.39 mariabackup.apply-log-only : MDEV-20135 - Timeout mariabackup.huge_lsn : MDEV-17286 - SSL error mariabackup.incremental_encrypted : MDEV-15667 - Timeout mariabackup.mdev-14447 : MDEV-15201 - Timeout -mariabackup.page_compression_level : Added in 10.1.39 mariabackup.xb_compressed_encrypted : MDEV-14812 - Segfault mariabackup.xb_partition : MDEV-17584 - Crash on shutdown @@ -372,9 +324,12 @@ multi_source.status_vars : MDEV-4632 - failed while waiting for Slave_received_h parts.partition_alter2_2_maria : MDEV-14364 - Lost connection to MySQL server during query parts.partition_auto_increment_archive : MDEV-16491 - Table marked as crashed parts.partition_auto_increment_maria : MDEV-14430 - Wrong result -parts.partition_auto_increment_max : Added in 10.1.39 +parts.partition_debug : Modified in 10.1.42 +parts.partition_debug_innodb : Modified in 10.1.42 +parts.partition_debug_myisam : Modified in 10.1.42 parts.partition_exch_qa_10 : MDEV-11765 - wrong result parts.partition_innodb_status_file : MDEV-12901 - Valgrind +parts.reorganize_partition_innodb : Added in 10.1.42 #----------------------------------------------------------------------- @@ -397,25 +352,23 @@ perfschema_stress.* : MDEV-10996 - tests not maintained #----------------------------------------------------------------------- plugins.feedback_plugin_send : MDEV-7932 - ssl failed for url -plugins.pam : Modified in 10.1.39 plugins.server_audit : MDEV-9562 - crashes on sol10-sparc plugins.thread_pool_server_audit : MDEV-9562 - crashes on sol10-sparc #----------------------------------------------------------------------- roles.create_and_grant_role : MDEV-11772 - wrong result -roles.flush_roles-17898 : Modified in 10.1.39 #----------------------------------------------------------------------- rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free -rpl.create_or_replace_mix : Include file modified in 10.1.41 +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 : 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 : MDEV-20137 - Table doesn't exist; added in 10.1.41 +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 @@ -423,6 +376,7 @@ rpl.rpl_binlog_index : MDEV-9501 - Warning: failed registerin 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_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 @@ -443,14 +397,17 @@ 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 @@ -458,7 +415,6 @@ 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_rewrt_db : Modified in 10.1.39 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 @@ -479,15 +435,17 @@ 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_slave_invalid_external_user : Added in 10.1.39 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 #----------------------------------------------------------------------- @@ -531,16 +489,14 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #----------------------------------------------------------------------- -sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x -sys_vars.delayed_insert_limit_func : MDEV-17683 - Wrong result -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.thread_stack_basic : Modified in 10.1.39 -sys_vars.transaction_prealloc_size_bug27322 : Modified in 10.1.39 -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.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 #----------------------------------------------------------------------- @@ -569,8 +525,6 @@ tokudb_backup.* : MDEV-11001 - tests don't work #----------------------------------------------------------------------- -tokudb_bugs.PS-5158 : Added in 10.1.39 -tokudb_bugs.PS-5163 : Added in 10.1.39 tokudb_bugs.checkpoint_lock : MDEV-10637 - Wrong processlist output tokudb_bugs.checkpoint_lock_3 : MDEV-10637 - Wrong processlist output tokudb_bugs.frm_store : MDEV-12823 - Valgrind @@ -580,6 +534,10 @@ tokudb_bugs.xa : MDEV-11804 - Lock wait timeout #----------------------------------------------------------------------- +tokudb_parts.partition_debug_tokudb : Include file modified in 10.1.42 + +#----------------------------------------------------------------------- + tokudb_rpl.* : MDEV-11001 - tests don't work #----------------------------------------------------------------------- @@ -597,14 +555,14 @@ unit.ma_test_loghandler : MDEV-10638 - record read not ok vcol.not_supported : MDEV-10639 - Testcase timeout vcol.vcol_keys_innodb : MDEV-10639 - Testcase timeout vcol.vcol_misc : MDEV-16651 - Wrong error message -vcol.wrong_arena : Modified in 10.1.39 #----------------------------------------------------------------------- -wsrep.foreign_key : MDEV-14725 - WSREP has not yet prepared node -wsrep.mdev_6832 : MDEV-14195 - Failure upon check-testcase -wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use -wsrep.variables : MDEV-17585 - Deadlock +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.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use +wsrep.variables : MDEV-17585 - Deadlock #----------------------------------------------------------------------- From 6f86150ab3c9059a9379fcc68cb90da78e59e5cb Mon Sep 17 00:00:00 2001 From: Robert Bindar Date: Thu, 10 Oct 2019 12:58:29 +0300 Subject: [PATCH 02/10] MDEV-17896 Assertion `pfs->get_refcount() > 0' failed Unfortunate DROP TEMPORARY..IF EXISTS on a regular table may allow subsequent CREATE TABLE statements to steal away the PFS_table_share instance from the dropped table. --- mysql-test/suite/perfschema/r/misc.result | 16 ++++++++ mysql-test/suite/perfschema/t/misc.test | 48 +++++++++++++++++++++++ sql/sql_table.cc | 7 ++++ 3 files changed, 71 insertions(+) diff --git a/mysql-test/suite/perfschema/r/misc.result b/mysql-test/suite/perfschema/r/misc.result index 7a097a275763d..e2b7f6fab7383 100644 --- a/mysql-test/suite/perfschema/r/misc.result +++ b/mysql-test/suite/perfschema/r/misc.result @@ -134,3 +134,19 @@ truncate performance_schema.events_statements_history 0 select * from t1 3 insert into t1 select RAND()*10000 from t1 6 drop table t1; +# +# MDEV-17896 Assertion `pfs->get_refcount() > 0' failed +# in release_table_share +# +SELECT COUNT(*)<@@performance_schema_max_table_instances FROM +performance_schema.objects_summary_global_by_type WHERE OBJECT_TYPE='TABLE'; +COUNT(*)<@@performance_schema_max_table_instances +1 +CREATE TABLE t0(a INT); +SELECT * FROM t0; +a +DROP TEMPORARY TABLE IF EXISTS t0; +Warnings: +Note 1051 Unknown table 'test.t0' +FLUSH TABLE t0; +DROP TABLE t0; diff --git a/mysql-test/suite/perfschema/t/misc.test b/mysql-test/suite/perfschema/t/misc.test index c9f7dc6bfc093..80ce64f03021f 100644 --- a/mysql-test/suite/perfschema/t/misc.test +++ b/mysql-test/suite/perfschema/t/misc.test @@ -222,3 +222,51 @@ insert into t1 select RAND()*10000 from t1; select sql_text, rows_examined from performance_schema.events_statements_history; drop table t1; +--echo # +--echo # MDEV-17896 Assertion `pfs->get_refcount() > 0' failed +--echo # in release_table_share +--echo # + +# There must be at least one available slot in PFS table_share_array for +# this test to be meaningful. If there are no free slots we must +# restart mysqld, it is the only way to reset PFS table_share_array +let $query= SELECT COUNT(*)<@@performance_schema_max_table_instances FROM + performance_schema.objects_summary_global_by_type WHERE OBJECT_TYPE='TABLE'; + +let $free_slots_available= `$query`; + +if (!$free_slots_available) +{ + source include/restart_mysqld.inc; +} +eval $query; + +CREATE TABLE t0(a INT); + +# TABLE_SHARE must be cached in the table definition cache. +SELECT * FROM t0; + +# Dropping t0 using DROP TEMPORARY frees up a slot in table_share_array, +# but the persistent table is not correctly dropped, i.e. TABLE_SHARE::m_psi +# still points to that slot in table_share_array. +DROP TEMPORARY TABLE IF EXISTS t0; + +# Try re-using each and every slot in PFS table_share_array. If bug is +# there, we re-use t0 slot. +# The newly created table that re-uses the t0 slot ends up +# resetting the PFS_table_share refcount. +let $i= `SELECT @@performance_schema_max_table_instances`; +disable_query_log; +while ($i) +{ + # Memory engine is here to reduce disk IO + eval CREATE TABLE t$i(a INT) ENGINE=MEMORY; + eval DROP TABLE t$i; + dec $i; +} +enable_query_log; + +# FLUSH TABLE crashes the server when PFS_table_share is found with +# an unexpected refcount. +FLUSH TABLE t0; +DROP TABLE t0; diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 467e91ce6c7ce..e694c52e2722d 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2418,6 +2418,13 @@ int mysql_rm_table_no_locks(THD *thd, TABLE_LIST *tables, bool if_exists, ER_BAD_TABLE_ERROR, ER_THD(thd, ER_BAD_TABLE_ERROR), tbl_name.c_ptr_safe()); + + /* + Our job is done here. This statement was added to avoid executing + unnecessary code farther below which in some strange corner cases + caused the server to crash (see MDEV-17896). + */ + continue; } else { From 8afe4bba2ecd9ebc762a80598a8465a201d4feee Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Sun, 27 Oct 2019 01:48:00 +0530 Subject: [PATCH 03/10] MDEV-20424: New default value for optimizer_use_condition-selectivity leads to bad plan In the function prev_record_reads where one finds the different row combinations for a subset of partial join, it did not take into account the selectivity of tables involved in the subset of partial join. --- mysql-test/r/selectivity.result | 57 ++++++++++++++++++++++++++ mysql-test/r/selectivity_innodb.result | 57 ++++++++++++++++++++++++++ mysql-test/t/selectivity.test | 29 +++++++++++++ sql/sql_select.cc | 3 ++ 4 files changed, 146 insertions(+) diff --git a/mysql-test/r/selectivity.result b/mysql-test/r/selectivity.result index d0bbb46cb0ad4..5fe6986e9ff4a 100644 --- a/mysql-test/r/selectivity.result +++ b/mysql-test/r/selectivity.result @@ -1753,4 +1753,61 @@ a 1991 set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; DROP TABLE t1; +# +# MDEV-20424: New default value for optimizer_use_condition-selectivity +# leads to bad plan +# +create table t1(a int, b int, c int, d int, key(a,b)); +insert into t1 select 50,seq-1,seq-1,seq from seq_1_to_10; +insert into t1 select seq-1,seq-1,seq-1,seq from seq_1_to_100 limit 90; +create table t2(a int, b int, c int, primary key(a)); +insert into t2 select seq-1,seq-1,seq-1 from seq_1_to_100; +create table t3(a int, b int, c int, primary key(a)); +insert into t3 select seq-1,seq-1,seq-1 from seq_1_to_100 limit 30; +set optimizer_use_condition_selectivity=1; +explain extended select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 10 NULL 9 100.00 Using index condition; Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.d 1 100.00 +1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`d`) and (`test`.`t1`.`a` = 50) and (`test`.`t1`.`b` <= 100)) +select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +b a a b +0 0 1 1 +1 1 2 2 +2 2 3 3 +3 3 4 4 +4 4 5 5 +5 5 6 6 +6 6 7 7 +7 7 8 8 +8 8 9 9 +9 9 10 10 +set optimizer_use_condition_selectivity=2; +explain extended select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 10 NULL 9 9.00 Using index condition; Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.d 1 100.00 +1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`d`) and (`test`.`t1`.`a` = 50) and (`test`.`t1`.`b` <= 100)) +select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +b a a b +0 0 1 1 +1 1 2 2 +2 2 3 3 +3 3 4 4 +4 4 5 5 +5 5 6 6 +6 6 7 7 +7 7 8 8 +8 8 9 9 +9 9 10 10 +set optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +drop table t1,t2,t3; # End of 10.1 tests diff --git a/mysql-test/r/selectivity_innodb.result b/mysql-test/r/selectivity_innodb.result index 719156a77de2f..70ddd5bf1a9ed 100644 --- a/mysql-test/r/selectivity_innodb.result +++ b/mysql-test/r/selectivity_innodb.result @@ -1763,6 +1763,63 @@ a 1991 set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; DROP TABLE t1; +# +# MDEV-20424: New default value for optimizer_use_condition-selectivity +# leads to bad plan +# +create table t1(a int, b int, c int, d int, key(a,b)); +insert into t1 select 50,seq-1,seq-1,seq from seq_1_to_10; +insert into t1 select seq-1,seq-1,seq-1,seq from seq_1_to_100 limit 90; +create table t2(a int, b int, c int, primary key(a)); +insert into t2 select seq-1,seq-1,seq-1 from seq_1_to_100; +create table t3(a int, b int, c int, primary key(a)); +insert into t3 select seq-1,seq-1,seq-1 from seq_1_to_100 limit 30; +set optimizer_use_condition_selectivity=1; +explain extended select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 10 NULL 11 100.00 Using index condition; Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.d 1 100.00 +1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`d`) and (`test`.`t1`.`a` = 50) and (`test`.`t1`.`b` <= 100)) +select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +b a a b +0 0 1 1 +1 1 2 2 +2 2 3 3 +3 3 4 4 +4 4 5 5 +5 5 6 6 +6 6 7 7 +7 7 8 8 +8 8 9 9 +9 9 10 10 +set optimizer_use_condition_selectivity=2; +explain extended select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +id select_type table type possible_keys key key_len ref rows filtered Extra +1 SIMPLE t1 range a a 10 NULL 11 11.00 Using index condition; Using where +1 SIMPLE t3 eq_ref PRIMARY PRIMARY 4 test.t1.d 1 100.00 +1 SIMPLE t2 eq_ref PRIMARY PRIMARY 4 test.t1.c 1 100.00 Using index +Warnings: +Note 1003 select `test`.`t1`.`b` AS `b`,`test`.`t2`.`a` AS `a`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b` from `test`.`t1` join `test`.`t2` join `test`.`t3` where ((`test`.`t2`.`a` = `test`.`t1`.`c`) and (`test`.`t3`.`a` = `test`.`t1`.`d`) and (`test`.`t1`.`a` = 50) and (`test`.`t1`.`b` <= 100)) +select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; +b a a b +0 0 1 1 +1 1 2 2 +2 2 3 3 +3 3 4 4 +4 4 5 5 +5 5 6 6 +6 6 7 7 +7 7 8 8 +8 8 9 9 +9 9 10 10 +set optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; +drop table t1,t2,t3; # End of 10.1 tests set optimizer_switch=@save_optimizer_switch_for_selectivity_test; set @tmp_ust= @@use_stat_tables; diff --git a/mysql-test/t/selectivity.test b/mysql-test/t/selectivity.test index 0deacc390db4d..a93ad5efb072e 100644 --- a/mysql-test/t/selectivity.test +++ b/mysql-test/t/selectivity.test @@ -1205,5 +1205,34 @@ set optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivit DROP TABLE t1; +--echo # +--echo # MDEV-20424: New default value for optimizer_use_condition-selectivity +--echo # leads to bad plan +--echo # + +create table t1(a int, b int, c int, d int, key(a,b)); +insert into t1 select 50,seq-1,seq-1,seq from seq_1_to_10; +insert into t1 select seq-1,seq-1,seq-1,seq from seq_1_to_100 limit 90; + +create table t2(a int, b int, c int, primary key(a)); +insert into t2 select seq-1,seq-1,seq-1 from seq_1_to_100; + +create table t3(a int, b int, c int, primary key(a)); +insert into t3 select seq-1,seq-1,seq-1 from seq_1_to_100 limit 30; + +let $query= select t1.b,t2.a,t3.a,t3.b from t1,t2,t3 +where t1.c = t2.a AND t1.d = t3.a and t1.a = 50 and t1.b <= 100; + +set optimizer_use_condition_selectivity=1; +eval explain extended $query; +eval $query; + +set optimizer_use_condition_selectivity=2; +eval explain extended $query; +eval $query; +set optimizer_use_condition_selectivity= @@optimizer_use_condition_selectivity; + +drop table t1,t2,t3; + --echo # End of 10.1 tests diff --git a/sql/sql_select.cc b/sql/sql_select.cc index c6e70c2430c17..dfc9f729118ff 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -8470,7 +8470,10 @@ prev_record_reads(POSITION *positions, uint idx, table_map found_ref) #max_nested_outer_joins=64-1) will not make it any more precise. */ if (pos->records_read) + { found= COST_MULT(found, pos->records_read); + found*= pos->cond_selectivity; + } } } return found; From eb56339b6656da991aa2e25de4d6f655f0bbe213 Mon Sep 17 00:00:00 2001 From: pkubaj Date: Wed, 9 Oct 2019 12:01:19 +0200 Subject: [PATCH 04/10] Fix build on !glibc/powerpc* Do the same that newer branches do and don't include glibc-related headers on non-glibc environment. --- storage/xtradb/include/ut0ut.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/storage/xtradb/include/ut0ut.h b/storage/xtradb/include/ut0ut.h index 2dd791557705b..de8be1774c3b4 100644 --- a/storage/xtradb/include/ut0ut.h +++ b/storage/xtradb/include/ut0ut.h @@ -83,7 +83,7 @@ struct ut_when_dtor { the YieldProcessor macro defined in WinNT.h. It is a CPU architecture- independent way by using YieldProcessor. */ # define UT_RELAX_CPU() YieldProcessor() -# elif defined(__powerpc__) +# elif defined(__powerpc__) && defined __GLIBC__ #include # define UT_RELAX_CPU() __ppc_get_timebase() # else From 5164f8c206e48c00aba2ec3007f309e3840c12eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 4 Nov 2019 15:52:54 +0200 Subject: [PATCH 05/10] Fix GCC 9.2.1 -Wstringop-truncation dict_table_rename_in_cache(): Use strcpy() instead of strncpy(), because they are known to be equivalent in this case (the length of old_name was already validated). mariabackup: Invoke strncpy() with one less than the buffer size, and explicitly add NUL as the last byte of the buffer. --- extra/mariabackup/backup_copy.cc | 2 +- extra/mariabackup/changed_page_bitmap.cc | 2 +- extra/mariabackup/xtrabackup.cc | 3 ++- storage/innobase/dict/dict0dict.cc | 6 ++---- storage/xtradb/dict/dict0dict.cc | 6 ++---- 5 files changed, 8 insertions(+), 11 deletions(-) diff --git a/extra/mariabackup/backup_copy.cc b/extra/mariabackup/backup_copy.cc index b31edfd65c50c..64fc26b676290 100644 --- a/extra/mariabackup/backup_copy.cc +++ b/extra/mariabackup/backup_copy.cc @@ -467,7 +467,7 @@ struct datafile_cur_t { { memset(rel_path, 0, sizeof rel_path); if (filename) { - strncpy(abs_path, filename, sizeof abs_path); + strncpy(abs_path, filename, sizeof abs_path - 1); abs_path[(sizeof abs_path) - 1] = 0; } else { abs_path[0] = '\0'; diff --git a/extra/mariabackup/changed_page_bitmap.cc b/extra/mariabackup/changed_page_bitmap.cc index 372d5b62a1dfc..9212ddb5e6d77 100644 --- a/extra/mariabackup/changed_page_bitmap.cc +++ b/extra/mariabackup/changed_page_bitmap.cc @@ -390,7 +390,7 @@ log_online_setup_bitmap_file_range( bitmap_files->files[array_pos].seq_num = file_seq_num; strncpy(bitmap_files->files[array_pos].name, - bitmap_dir_file_info.name, FN_REFLEN); + bitmap_dir_file_info.name, FN_REFLEN - 1); bitmap_files->files[array_pos].name[FN_REFLEN - 1] = '\0'; bitmap_files->files[array_pos].start_lsn diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 40539b1e6326b..b9cb8a8007a10 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -2425,7 +2425,8 @@ xtrabackup_copy_datafile(fil_node_t* node, uint thread_n) goto error; } - strncpy(dst_name, cursor.rel_path, sizeof(dst_name)); + strncpy(dst_name, cursor.rel_path, sizeof dst_name - 1); + dst_name[sizeof dst_name - 1] = '\0'; /* Setup the page write filter */ if (xtrabackup_incremental) { diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc index f9295e74d7c2f..6bd5de85b0886 100644 --- a/storage/innobase/dict/dict0dict.cc +++ b/storage/innobase/dict/dict0dict.cc @@ -1850,8 +1850,7 @@ dict_table_rename_in_cache( /* The old table name in my_charset_filename is stored in old_name_cs_filename */ - strncpy(old_name_cs_filename, old_name, - MAX_FULL_NAME_LEN); + strcpy(old_name_cs_filename, old_name); old_name_cs_filename[MAX_FULL_NAME_LEN] = '\0'; if (strstr(old_name, TEMP_TABLE_PATH_PREFIX) == NULL) { @@ -1873,8 +1872,7 @@ dict_table_rename_in_cache( } else { /* Old name already in my_charset_filename */ - strncpy(old_name_cs_filename, old_name, - MAX_FULL_NAME_LEN); + strcpy(old_name_cs_filename, old_name); old_name_cs_filename[MAX_FULL_NAME_LEN] = '\0'; } diff --git a/storage/xtradb/dict/dict0dict.cc b/storage/xtradb/dict/dict0dict.cc index 73e4fe6bb5b17..2bea154749f78 100644 --- a/storage/xtradb/dict/dict0dict.cc +++ b/storage/xtradb/dict/dict0dict.cc @@ -1856,8 +1856,7 @@ dict_table_rename_in_cache( /* The old table name in my_charset_filename is stored in old_name_cs_filename */ - strncpy(old_name_cs_filename, old_name, - MAX_FULL_NAME_LEN); + strcpy(old_name_cs_filename, old_name); old_name_cs_filename[MAX_FULL_NAME_LEN] = '\0'; if (strstr(old_name, TEMP_TABLE_PATH_PREFIX) == NULL) { @@ -1879,8 +1878,7 @@ dict_table_rename_in_cache( } else { /* Old name already in my_charset_filename */ - strncpy(old_name_cs_filename, old_name, - MAX_FULL_NAME_LEN); + strcpy(old_name_cs_filename, old_name); old_name_cs_filename[MAX_FULL_NAME_LEN] = '\0'; } From cd156e2c3e8576ee42ff470235d3af005daee274 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 4 Nov 2019 18:30:48 +0100 Subject: [PATCH 06/10] MDEV-20971 ASAN heap-use-after-free in list_delete / heap_close Don't save/restore HP_INFO as it could be changed by a concurrent thread. different parts of HP_INFO are protected by different mutexes and the mutex that protect most of the HP_INFO does not protect its open_list data. As a bonus, make heap_check_heap() to take const HP_INFO* and not make any changes there whatsoever. --- include/heap.h | 2 +- storage/heap/_check.c | 27 +++++++++++++-------------- 2 files changed, 14 insertions(+), 15 deletions(-) diff --git a/include/heap.h b/include/heap.h index 63d961b577adb..014ec042671fb 100644 --- a/include/heap.h +++ b/include/heap.h @@ -245,7 +245,7 @@ int hp_panic(enum ha_panic_function flag); int heap_rkey(HP_INFO *info, uchar *record, int inx, const uchar *key, key_part_map keypart_map, enum ha_rkey_function find_flag); extern uchar * heap_find(HP_INFO *info,int inx,const uchar *key); -extern int heap_check_heap(HP_INFO *info, my_bool print_status); +extern int heap_check_heap(const HP_INFO *info, my_bool print_status); extern uchar *heap_position(HP_INFO *info); /* The following is for programs that uses the old HEAP interface where diff --git a/storage/heap/_check.c b/storage/heap/_check.c index 33aa532bd6bb3..fc5716782e5ca 100644 --- a/storage/heap/_check.c +++ b/storage/heap/_check.c @@ -18,10 +18,8 @@ #include "heapdef.h" -static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records, - ulong blength, my_bool print_status); -static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records, - my_bool print_status); +static int check_one_key(HP_KEYDEF *, uint, ulong, ulong, my_bool); +static int check_one_rb_key(const HP_INFO *, uint, ulong, my_bool); /* @@ -40,13 +38,13 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records, 1 error */ -int heap_check_heap(HP_INFO *info, my_bool print_status) +int heap_check_heap(const HP_INFO *info, my_bool print_status) { int error; uint key; ulong records=0, deleted=0, pos, next_block; HP_SHARE *share=info->s; - HP_INFO save_info= *info; /* Needed because scan_init */ + uchar *current_ptr= info->current_ptr; DBUG_ENTER("heap_check_heap"); for (error=key= 0 ; key < share->keys ; key++) @@ -65,7 +63,7 @@ int heap_check_heap(HP_INFO *info, my_bool print_status) { if (pos < next_block) { - info->current_ptr+= share->block.recbuffer; + current_ptr+= share->block.recbuffer; } else { @@ -77,9 +75,9 @@ int heap_check_heap(HP_INFO *info, my_bool print_status) break; /* End of file */ } } - hp_find_record(info,pos); + current_ptr= hp_find_block(&share->block, pos); - if (!info->current_ptr[share->visible]) + if (!current_ptr[share->visible]) deleted++; else records++; @@ -92,7 +90,6 @@ int heap_check_heap(HP_INFO *info, my_bool print_status) deleted, (ulong) share->deleted)); error= 1; } - *info= save_info; DBUG_RETURN(error); } @@ -165,7 +162,7 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records, return error; } -static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records, +static int check_one_rb_key(const HP_INFO *info, uint keynr, ulong records, my_bool print_status) { HP_KEYDEF *keydef= info->s->keydef + keynr; @@ -174,9 +171,11 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records, uchar *key, *recpos; uint key_length; uint not_used[2]; + TREE_ELEMENT **last_pos; + TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1]; - if ((key= tree_search_edge(&keydef->rb_tree, info->parents, - &info->last_pos, offsetof(TREE_ELEMENT, left)))) + if ((key= tree_search_edge(&keydef->rb_tree, parents, + &last_pos, offsetof(TREE_ELEMENT, left)))) { do { @@ -191,7 +190,7 @@ static int check_one_rb_key(HP_INFO *info, uint keynr, ulong records, } else found++; - key= tree_search_next(&keydef->rb_tree, &info->last_pos, + key= tree_search_next(&keydef->rb_tree, &last_pos, offsetof(TREE_ELEMENT, left), offsetof(TREE_ELEMENT, right)); } while (key); From dc771113a6b7a3256672e72842a657c8e27f35a8 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 5 Nov 2019 00:20:13 +0100 Subject: [PATCH 07/10] Fix ninja build Do not rely on existence of CMakeFiles/${target}.dir directory existence It is not there for custom targets in Ninja build. --- support-files/CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/support-files/CMakeLists.txt b/support-files/CMakeLists.txt index 36d4c0949edce..62ad8bcffc945 100644 --- a/support-files/CMakeLists.txt +++ b/support-files/CMakeLists.txt @@ -77,11 +77,12 @@ IF(UNIX) IF(CHECKMODULE AND SEMODULE_PACKAGE) FOREACH(pol mariadb) SET(src ${CMAKE_CURRENT_SOURCE_DIR}/policy/selinux/${pol}.te) - SET(tmp ${CMAKE_CURRENT_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/${pol}-pp.dir/${pol}.mod) + SET(tmp ${CMAKE_CURRENT_BINARY_DIR}/${pol}.mod) SET(out ${CMAKE_CURRENT_BINARY_DIR}/${pol}.pp) ADD_CUSTOM_COMMAND(OUTPUT ${out} COMMAND ${CHECKMODULE} -M -m ${src} -o ${tmp} COMMAND ${SEMODULE_PACKAGE} -m ${tmp} -o ${out} + COMMAND ${CMAKE_COMMAND} -E remove ${tmp} DEPENDS ${src}) ADD_CUSTOM_TARGET(${pol}-pp ALL DEPENDS ${out}) INSTALL(FILES ${out} DESTINATION ${inst_location}/policy/selinux COMPONENT SupportFiles) From e23cb3835e4679a51af5fe00ce411148fba72785 Mon Sep 17 00:00:00 2001 From: Daniel Bartholomew Date: Tue, 5 Nov 2019 09:53:45 -0500 Subject: [PATCH 08/10] bump the VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index df06ca3b38a11..127385d04a0f2 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ MYSQL_VERSION_MAJOR=5 MYSQL_VERSION_MINOR=5 -MYSQL_VERSION_PATCH=66 +MYSQL_VERSION_PATCH=67 MYSQL_VERSION_EXTRA= From 6e48f3a062412413a0cb9d7bddbaaacdeee2b13e Mon Sep 17 00:00:00 2001 From: Daniel Bartholomew Date: Tue, 5 Nov 2019 09:55:18 -0500 Subject: [PATCH 09/10] bump the VERSION --- VERSION | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 93f88d1e9c066..8a84b79a42335 100644 --- a/VERSION +++ b/VERSION @@ -1,3 +1,3 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=1 -MYSQL_VERSION_PATCH=42 +MYSQL_VERSION_PATCH=43 From 5c3bbbd845fe38a125553c62976c1165b2d9b8d7 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Wed, 6 Nov 2019 10:20:32 +0530 Subject: [PATCH 10/10] MDEV-20987 InnoDB fails to start when fts table has FK relation InnoDB: Assertion failure in file .../dict/dict0dict.cc line ... InnoDB: Failing assertion: table->can_be_evicted This fixes a regression that was caused by the fix of MDEV-20621 (commit a41d429765c7ddb528b9b438c68b25ff55d3bd55). MySQL 5.6 (and MariaDB 10.0) introduced eviction of tables from the InnoDB data dictionary cache. Tables that are connected to FOREIGN KEY constraints or FULLTEXT INDEX are exempt of the eviction. With the problematic change, a table that would already be exempt from eviction due to FOREIGN KEY would cause the problem if there also was a FULLTEXT INDEX defined on it. dict_load_table(): Only prevent eviction if table->can_be_evicted holds. --- .../suite/innodb_fts/r/innodb_fts_misc.result | 21 ++++++---------- .../suite/innodb_fts/t/innodb_fts_misc.test | 24 +++++++------------ storage/innobase/dict/dict0load.cc | 2 +- storage/xtradb/dict/dict0load.cc | 2 +- 4 files changed, 17 insertions(+), 32 deletions(-) diff --git a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result index 71eded74be46e..a2a73840723de 100644 --- a/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result +++ b/mysql-test/suite/innodb_fts/r/innodb_fts_misc.result @@ -1,4 +1,3 @@ -drop table if exists t1; CREATE TABLE t1 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, a VARCHAR(200), @@ -415,7 +414,6 @@ AGAINST ('"following database"@10' IN BOOLEAN MODE); id 105 DROP TABLE t1; -drop table if exists t50; set names utf8; "----------Test1---------" create table t50 (s1 varchar(60) character set utf8 collate utf8_bin) engine = innodb; @@ -670,9 +668,6 @@ s1 ŁŁŁŁ LLLL ŁŁŁŁ ŁŁŁŁ -DROP TABLE if EXISTS t2; -Warnings: -Note 1051 Unknown table 'test.t2' CREATE TABLE t2 (s1 VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_POLISH_CI) ENGINE = InnoDB; CREATE FULLTEXT INDEX i ON t2 ( s1); Warnings: @@ -739,7 +734,12 @@ ALTER TABLE t2 DROP a; SET @@autocommit=0; CREATE FULLTEXT INDEX i ON t1 (char_column); INSERT INTO t1 values (1,'aaa'); -"restart server..." +CREATE TABLE mdev20987_1(f1 INT NOT NULL, PRIMARY KEY(f1))ENGINE=InnoDB; +CREATE TABLE mdev20987_2(f1 INT NOT NULL, f2 CHAR(100), +FULLTEXT(f2), +FOREIGN KEY(f1) REFERENCES mdev20987_1(f1))ENGINE=InnoDB; +INSERT INTO mdev20987_1 VALUES(1); +INSERT INTO mdev20987_2 VALUES(1, 'mariadb'); SHOW CREATE TABLE t2; Table Create Table t2 CREATE TABLE `t2` ( @@ -747,12 +747,8 @@ t2 CREATE TABLE `t2` ( PRIMARY KEY (`FTS_DOC_ID`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb'); -SET @@autocommit=1; -DROP TABLE t1, t2; +DROP TABLE t1, t2, mdev20987_2, mdev20987_1; "----------Test28---------" -drop table if exists `fts_test`; -Warnings: -Note 1051 Unknown table 'test.fts_test' create table `fts_test`(`a` text,fulltext key(`a`))engine=innodb; set session autocommit=0; insert into `fts_test` values (''); @@ -942,9 +938,6 @@ id title body 2 How To Use MySQL Well After you went through a ... 3 Optimizing MySQL In this tutorial we will show ... DROP TABLE articles; -drop table if exists t1; -Warnings: -Note 1051 Unknown table 'test.t1' create table t1 (FTS_DOC_ID bigint unsigned auto_increment not null primary key, title varchar(200),body text,fulltext(title,body)) engine=innodb; insert into t1 set body='test'; diff --git a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test index e226b27696644..2e8ff4ea48e25 100644 --- a/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test +++ b/mysql-test/suite/innodb_fts/t/innodb_fts_misc.test @@ -5,10 +5,6 @@ let collation=UTF8_UNICODE_CI; --source include/have_collation.inc ---disable_warnings -drop table if exists t1; ---enable_warnings - # Create FTS table CREATE TABLE t1 ( id INT UNSIGNED AUTO_INCREMENT NOT NULL PRIMARY KEY, @@ -401,10 +397,6 @@ DROP TABLE t1; #------------------------------------------------------------------------------ # More FTS test from peter's testing #------------------------------------------------------------------------------ ---disable_warnings -drop table if exists t50; ---enable_warnings - set names utf8; @@ -606,7 +598,6 @@ CREATE FULLTEXT INDEX i ON t1 (s1); INSERT INTO t1 VALUES ('a'),('b'),('c'),('d'),('ŁŁŁŁ'),('LLLL'),(NULL),('ŁŁŁŁ ŁŁŁŁ'),('LLLLLLLL'); SELECT * FROM t1 WHERE MATCH(s1) AGAINST ('LLLL' COLLATE UTF8_UNICODE_520_CI); -DROP TABLE if EXISTS t2; CREATE TABLE t2 (s1 VARCHAR(60) CHARACTER SET UTF8 COLLATE UTF8_POLISH_CI) ENGINE = InnoDB; CREATE FULLTEXT INDEX i ON t2 ( s1); INSERT INTO t2 VALUES @@ -672,16 +663,19 @@ ALTER TABLE t2 DROP a; SET @@autocommit=0; CREATE FULLTEXT INDEX i ON t1 (char_column); INSERT INTO t1 values (1,'aaa'); -echo "restart server..."; -# Restart the server + +CREATE TABLE mdev20987_1(f1 INT NOT NULL, PRIMARY KEY(f1))ENGINE=InnoDB; +CREATE TABLE mdev20987_2(f1 INT NOT NULL, f2 CHAR(100), + FULLTEXT(f2), + FOREIGN KEY(f1) REFERENCES mdev20987_1(f1))ENGINE=InnoDB; +INSERT INTO mdev20987_1 VALUES(1); +INSERT INTO mdev20987_2 VALUES(1, 'mariadb'); --source include/restart_mysqld.inc SHOW CREATE TABLE t2; DELETE FROM t1 WHERE MATCH(char_column) AGAINST ('bbb'); -SET @@autocommit=1; -DROP TABLE t1, t2; +DROP TABLE t1, t2, mdev20987_2, mdev20987_1; --echo "----------Test28---------" -drop table if exists `fts_test`; create table `fts_test`(`a` text,fulltext key(`a`))engine=innodb; set session autocommit=0; insert into `fts_test` values (''); @@ -870,8 +864,6 @@ DROP TABLE articles; # Test for Bug 13940669 - 64901: INNODB: ASSERTION FAILURE IN # THREAD 34387022112 IN FILE REM0CMP.CC LINE 5 -drop table if exists t1; - create table t1 (FTS_DOC_ID bigint unsigned auto_increment not null primary key, title varchar(200),body text,fulltext(title,body)) engine=innodb; diff --git a/storage/innobase/dict/dict0load.cc b/storage/innobase/dict/dict0load.cc index 3a6851cff892c..484c4c5e9669a 100644 --- a/storage/innobase/dict/dict0load.cc +++ b/storage/innobase/dict/dict0load.cc @@ -2551,7 +2551,7 @@ dict_load_table( fts_free(table); } else if (fts_optimize_wq) { fts_optimize_add_table(table); - } else { + } else if (table->can_be_evicted) { /* fts_optimize_thread is not started yet. So make the table as non-evictable from cache. */ dict_table_move_from_lru_to_non_lru(table); diff --git a/storage/xtradb/dict/dict0load.cc b/storage/xtradb/dict/dict0load.cc index 292a1752771db..531174bc11fe4 100644 --- a/storage/xtradb/dict/dict0load.cc +++ b/storage/xtradb/dict/dict0load.cc @@ -2573,7 +2573,7 @@ dict_load_table( fts_free(table); } else if (fts_optimize_wq) { fts_optimize_add_table(table); - } else { + } else if (table->can_be_evicted) { /* fts_optimize_thread is not started yet. So make the table as non-evictable from cache. */ dict_table_move_from_lru_to_non_lru(table);