From ccb58b955e15300b57dd0d1e8a2b51f9d77a58a6 Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Mon, 4 May 2020 17:20:17 +0300 Subject: [PATCH 01/18] List of unstable tests for 10.1.45 release --- mysql-test/unstable-tests | 90 ++++++++++++++------------------------- 1 file changed, 33 insertions(+), 57 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index e78157ca6c4..c7b95745198 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,7 +23,7 @@ # ############################################################################## # -# Based on bb-10.1-release 599a06098b967db3d636c1053bdbdd0011cba606 +# Based on 10.1 d233fd14a39f9c583b85ffb03e42b5ea52e2f4c2 main.alter_table_trans : MDEV-12084 - timeout main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result @@ -36,75 +36,64 @@ main.ctype_utf16 : MDEV-10675: timeout or extra warnings main.debug_sync : MDEV-10607 - internal error main.derived_opt : MDEV-11768 - timeout 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; 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_math : Modified in 10.1.45 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.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure +main.index_merge_innodb : MDEV-7142 - Wrong execution plan, timeout with valgrind +main.index_merge_myisam : Modified in 10.1.45 +main.innodb_mysql_lock : MDEV-7861 - sporadic lock detection failure (Fixed in 10.3+) main.insert_debug : Added in 10.1.44 -main.join : Modified in 10.1.42 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.merge : MDEV-10607 - sporadic "can't connect" -main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out -main.myisam : Modified in 10.1.42 +main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out (Fixed in 10.2+) 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--defaults-file : Modified in 10.1.45 +main.mysqldump : Modified in 10.1.45 main.mysqlhotcopy_myisam : MDEV-10995 - test hangs on debug build main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-9269 - fails on Alpha main.old-mode : MDEV-19373 - Wrong result main.order_by : Modified in 10.1.44 -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_debug_sync : MDEV-15669 - Deadlock found when trying to get lock main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings -main.processlist : Modified in 10.1.42 -main.processlist_notembedded : Added in 10.1.42 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 : Modified in 10.1.45 +main.range_innodb : Modified in 10.1.45 main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away main.selectivity : Modified in 10.1.44 main.set_statement : MDEV-13183 - Wrong result main.show_explain : MDEV-10674 - sporadic failure -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_par_innodb : MDEV-14155 - wrong rounding main.status : MDEV-8510 - sporadic wrong result main.subselect_innodb : MDEV-10614 - sporadic wrong results -main.subselect_sj : Modified in 10.1.42 -main.sum_distinct-big : Modified in 10.1.42 main.tc_heuristic_recover : MDEV-15200 - wrong error on mysqld_stub_cmd main.type_blob : MDEV-15195 - Wrong result -main.type_date : 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.44 -main.type_newdecimal : Modified in 10.1.42 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 @@ -123,29 +112,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_invalid_read_in_rotate : Added in 10.1.44 +binlog.binlog_invalid_read_in_rotate : MDEV-22455 - Server crash; added in 10.1.44 binlog.binlog_killed : MDEV-12925 - Wrong result 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 #----------------------------------------------------------------------- -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 -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.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_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 #----------------------------------------------------------------------- @@ -160,6 +146,10 @@ connect.zip : MDEV-13884 - Wrong result #----------------------------------------------------------------------- +disks.disks_notembedded : MDEV-21587 - Wrong result + +#----------------------------------------------------------------------- + encryption.create_or_replace : MDEV-16115 - Trying to access tablespace encryption.debug_key_management : MDEV-13841 - Timeout on wait condition encryption.encrypt_and_grep : MDEV-13765 - Wrong result @@ -170,6 +160,7 @@ encryption.innodb-page_encryption : MDEV-10641 - mutex problem encryption.innodb-read-only : MDEV-14728 - Unable to get certificate; MDEV-16563 - Crash on startup encryption.innodb-redo-badkey : MDEV-12898 - Server hang on startup encryption.innodb-remove-encryption : MDEV-16493 - Timeout in wait condition +encryption.innodb_encryption : MDEV-14728 - Unable to get certificate 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 @@ -228,12 +219,12 @@ galera_3nodes.* : The suite has not been stabilized yet innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.doublewrite : MDEV-12905 - Lost connection to MySQL server; MDEV-21380 - Assertion failure +innodb.foreign_key : Modified in 10.1.45 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-table : MDEV-10619 - Testcase timeout -innodb.innodb-autoinc : Modified in 10.1.42 innodb.innodb-blob : MDEV-12053 - Client crash innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown innodb.innodb-page_compression_default : MDEV-14121 - Assertion failure @@ -247,22 +238,21 @@ innodb.innodb_monitor : MDEV-10939 - Testcase timeout innodb.innodb_mysql : MDEV-19873 - Wrong result innodb.innodb_stats : MDEV-10682 - Wrong result innodb.innodb_sys_semaphore_waits : MDEV-10331 - Wrong result +innodb.innodb_sys_var_valgrind : Added in 10.1.45 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks 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 : 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_fts_misc : Modified in 10.1.44 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning +innodb_fts.misc_debug2 : Added in 10.1.45 +innodb_fts.stopword : Added in 10.1.45 #----------------------------------------------------------------------- @@ -308,12 +298,8 @@ 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_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 #----------------------------------------------------------------------- @@ -352,19 +338,19 @@ 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_conditional_comments : Modified in 10.1.45 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_fail_register : Added in 10.1.45 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 @@ -380,14 +366,11 @@ 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 @@ -416,12 +399,10 @@ 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 @@ -467,7 +448,6 @@ 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.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 @@ -510,10 +490,6 @@ 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 #----------------------------------------------------------------------- From 5666f333a725df68fa70fb20f564fb274f9dcdb7 Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Tue, 5 May 2020 18:54:35 +0300 Subject: [PATCH 02/18] List of unstable tests for 10.2.32 release --- mysql-test/unstable-tests | 371 +++++++++++++++++++++----------------- 1 file changed, 201 insertions(+), 170 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index 6b44352f555..b79b23bb098 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,124 +23,132 @@ # ############################################################################## # -# Based on 10.2 f2ccfcaca191513d12f50672ae4545f9738670f0 +# Based on bb-10.2-release 1cccd3c7cc1a5a973e03f9dd8dc457bce554d7a9 -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.cache_temporal_4265 : Modified in 10.2.31 -main.connect : MDEV-17282 - Wrong result -main.connect2 : MDEV-13885 - Server crash -main.connect_debug : Modified in 10.2.31 -main.count_distinct2 : MDEV-11768 - timeout -main.create_delayed : MDEV-10605 - failed with timeout -main.create_drop_event : MDEV-16271 - Wrong result -main.create_or_replace2 : Modified in 10.2.31 -main.cte_nonrecursive : Modified in 10.2.31 -main.ctype_ucs : MDEV-17681 - Data too long for column -main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade -main.ctype_utf16 : MDEV-10675: timeout or extra warnings -main.debug_sync : MDEV-10607 - internal error -main.default_session : Modified in 10.2.31 -main.derived_cond_pushdown : Modified in 10.2.31 -main.derived_opt : MDEV-11768 - timeout -main.dirty_close : MDEV-19368 - mysqltest failed but provided no output -main.distinct : MDEV-14194 - Crash -main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.2.31 -main.engine_error_in_alter-8453 : Modified in 10.2.31 -main.error_simulation : Modified in 10.2.31 -main.events_2 : MDEV-13277 - Crash -main.events_bugs : MDEV-12892 - Crash; modified in 10.2.31 -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.foreign_key : Modified in 10.2.31 -main.func_misc : Modified in 10.2.31 -main.func_regexp_pcre : Modified in 10.2.31 -main.func_regexp_pcre_debug : Modified in 10.2.31 -main.func_time : Modified in 10.2.31 -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.2.31 -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 - Plan mismatch -main.innodb_mysql_lock : MDEV-7861 - Wrong result -main.insert_debug : Added in 10.2.31 -main.kill-2 : MDEV-13257 - Wrong result -main.kill_processlist-6619 : MDEV-10793 - Wrong result -main.loaddata : MDEV-19368 - mysqltest failed but provided no output -main.locale : MDEV-20521 - Missing warning -main.log_slow : MDEV-13263 - Wrong result -main.log_slow_debug : Modified in 10.2.31 -main.log_tables-big : MDEV-13408 - wrong result -main.mdev-504 : MDEV-15171 - warning -main.mdev375 : MDEV-10607 - sporadic "can't connect" -main.mdev6830 : Modified in 10.2.31 -main.merge : MDEV-10607 - sporadic "can't connect" -main.merge-big : Modified in 10.2.31 -main.merge_debug : Modified in 10.2.31 -main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out -main.myisam_debug : Modified in 10.2.31 -main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2 -main.mysql_client_test_comp : MDEV-16641 - Error in exec -main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed -main.mysql_upgrade_noengine : MDEV-14355 - Wrong result -main.mysqld_option_err : MDEV-21571 - Crash on bootstrap -main.mysqldump : MDEV-14800 - Stack smashing detected -main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug -main.mysqlslap : MDEV-11801 - timeout -main.mysqltest : MDEV-9269 - fails on Alpha; MDEV-13887 - Wrong result -main.old-mode : MDEV-19373 - Wrong result -main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.order_by : Modified in 10.2.30 -main.order_by_optimizer_innodb : MDEV-10683 - Wrong result -main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock -main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings -main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 -main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count -main.query_cache : MDEV-16180 - Wrong result -main.query_cache_debug : MDEV-15281 - Query cache is disabled -main.range_innodb : Modified in 10.2.31 -main.range_interrupted-13751 : Modified in 10.2.31 -main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away -main.select_debug : Modified in 10.2.31 -main.selectivity : Modified in 10.2.30 -main.set_statement : MDEV-13183 - Wrong result -main.set_statement_notembedded : MDEV-19414 - Wrong result -main.shm : MDEV-12727 - Mismatch, ERROR 2013 -main.show_explain : MDEV-10674 - Wrong result code; modified in 10.2.31 -main.show_explain_non_select : Modified in 10.2.31 -main.show_explain_ps : Modified in 10.2.31 -main.slowlog_enospace-10508 : Modified in 10.2.31 -main.sp-security : MDEV-10607 - sporadic "can't connect" -main.sp_notembedded : MDEV-10607 - internal error -main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.ssl_7937 : Modified in 10.2.31 -main.ssl_8k_key : Modified in 10.2.31 -main.ssl_ca : MDEV-10895 - SSL connection error on Power -main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.ssl_crl : MDEV-19119 - Wrong error code -main.ssl_crl_clients : Modified in 10.2.31 -main.ssl_system_ca : Added in 10.2.31 -main.ssl_timeout : MDEV-11244 - Crash -main.stat_tables-enospc : Modified in 10.2.31 -main.stat_tables_par : MDEV-13266 - Wrong result -main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding -main.status : MDEV-13255 - Wrong result -main.subselect_innodb : MDEV-10614 - Sporadic wrong results -main.tc_heuristic_recover : MDEV-14189 - Wrong result -main.type_blob : MDEV-15195 - Wrong result -main.type_datetime : Modified in 10.2.31 -main.type_datetime_hires : MDEV-10687 - Timeout -main.type_int : Modified in 10.2.31 -main.type_time : Modified in 10.2.31 -main.union_crash-714 : Modified in 10.2.31 -main.userstat : MDEV-12904 - SSL errors -main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query -main.warnings_debug : Modified in 10.2.31 -main.win : Modified in 10.2.31 -main.xa : MDEV-11769 - lock wait timeout +main.alter_table_trans : MDEV-12084 - timeout +main.alter_user : Modified in 10.2.32 +main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result +main.auth_named_pipe : MDEV-14724 - System error 2 +main.cache_temporal_4265 : Modified in 10.2.31 +main.connect : MDEV-17282 - Wrong result +main.connect2 : MDEV-13885 - Server crash +main.connect_debug : Modified in 10.2.31 +main.count_distinct2 : MDEV-11768 - timeout +main.create_delayed : MDEV-10605 - failed with timeout +main.create_drop_event : MDEV-16271 - Wrong result +main.create_or_replace2 : Modified in 10.2.31 +main.cte_nonrecursive : Modified in 10.2.31 +main.ctype_ucs : MDEV-17681 - Data too long for column +main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade +main.ctype_utf16 : MDEV-10675: timeout or extra warnings +main.debug_sync : MDEV-10607 - internal error +main.default_session : Modified in 10.2.31 +main.derived_cond_pushdown : Modified in 10.2.32 +main.derived_opt : MDEV-11768 - timeout +main.dirty_close : MDEV-19368 - mysqltest failed but provided no output +main.distinct : MDEV-14194 - Crash +main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.2.31 +main.engine_error_in_alter-8453 : Modified in 10.2.31 +main.error_simulation : Modified in 10.2.31 +main.errors : Modified in 10.2.32 +main.events_2 : MDEV-13277 - Crash +main.events_bugs : MDEV-12892 - Crash; modified in 10.2.31 +main.events_restart : MDEV-12236 - Server shutdown problem; modified in 10.2.32 +main.events_slowlog : MDEV-12821 - Wrong result +main.flush : MDEV-19368 - mysqltest failed but provided no output +main.foreign_key : Modified in 10.2.31 +main.fulltext : Modified in 10.2.32 +main.func_math : Modified in 10.2.32 +main.func_misc : Modified in 10.2.31 +main.func_regexp_pcre : Modified in 10.2.31 +main.func_regexp_pcre_debug : Modified in 10.2.31 +main.func_time : Modified in 10.2.31 +main.gis : MDEV-13411 - wrong result on P8; modified in 10.2.32 +main.gis-rtree : Modified in 10.2.32 +main.gis_notembedded : MDEV-21264 - Wrong result with different default charset +main.group_by : Modified in 10.2.32 +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 - Plan mismatch +main.index_merge_myisam : Modified in 10.2.32 +main.innodb_mysql_lock : MDEV-7861 - Wrong result (Fixed in 10.3+) +main.insert_debug : Added in 10.2.31 +main.kill-2 : MDEV-13257 - Wrong result +main.kill_processlist-6619 : MDEV-10793 - Wrong result +main.loaddata : MDEV-19368 - mysqltest failed but provided no output +main.locale : MDEV-20521 - Missing warning; configuration added in 10.2.32 +main.log_slow : MDEV-13263 - Wrong result +main.log_slow_debug : Modified in 10.2.31 +main.log_tables-big : MDEV-13408 - wrong result +main.mdev-504 : MDEV-15171 - warning +main.mdev375 : MDEV-10607 - sporadic "can't connect"; modified in 10.2.32 +main.mdev6830 : Modified in 10.2.31 +main.merge : MDEV-10607 - sporadic "can't connect" +main.merge-big : Modified in 10.2.31 +main.merge_debug : Modified in 10.2.31 +main.multi_update_debug : Modified in 10.2.32 +main.myisam_debug : Modified in 10.2.31 +main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; modified in 10.2.32 +main.mysql_client_test_comp : MDEV-16641 - Error in exec +main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed +main.mysql_upgrade_noengine : MDEV-14355 - Wrong result +main.mysqld--defaults-file : Modified in 10.2.32 +main.mysqld_option_err : MDEV-21571 - Crash on bootstrap +main.mysqldump : MDEV-22147 - Wrong result; MDEV-14800 - Stack smashing detected; modified in 10.2.32 +main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug +main.mysqlslap : MDEV-11801 - timeout +main.mysqltest : MDEV-9269 - fails on Alpha; MDEV-13887 - Wrong result +main.old-mode : MDEV-19373 - Wrong result +main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.order_by_optimizer_innodb : MDEV-10683 - Wrong result +main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock +main.partition_innodb : Modified in 10.2.32 +main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings +main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 +main.ps : MDEV-11017 - sporadic wrong Prepared_stmt_count +main.query_cache : MDEV-16180 - Wrong result +main.query_cache_debug : MDEV-15281 - Query cache is disabled +main.range : Modified in 10.2.32 +main.range_innodb : Modified in 10.2.32 +main.range_interrupted-13751 : Modified in 10.2.31 +main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away +main.rpl_mysql_upgrade_slave_repo_check : Added in 10.2.32 +main.select_debug : Modified in 10.2.31 +main.set_statement : MDEV-13183 - Wrong result +main.set_statement_notembedded : MDEV-19414 - Wrong result +main.shm : MDEV-12727 - Mismatch, ERROR 2013 +main.show_explain : MDEV-10674 - Wrong result code; modified in 10.2.31 +main.show_explain_non_select : Modified in 10.2.31 +main.show_explain_ps : Modified in 10.2.31 +main.slowlog_enospace-10508 : Modified in 10.2.31 +main.sp-security : MDEV-10607 - sporadic "can't connect" +main.sp_notembedded : MDEV-10607 - internal error +main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.ssl_7937 : Modified in 10.2.31 +main.ssl_8k_key : Modified in 10.2.31 +main.ssl_ca : MDEV-10895 - SSL connection error on Power +main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.ssl_crl : MDEV-19119 - Wrong error code +main.ssl_crl_clients : Modified in 10.2.31 +main.ssl_system_ca : Added in 10.2.31 +main.ssl_timeout : MDEV-11244 - Crash +main.stat_tables-enospc : Modified in 10.2.31 +main.stat_tables_par : MDEV-13266 - Wrong result +main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding +main.status : MDEV-13255 - Wrong result +main.subselect_innodb : MDEV-10614 - Sporadic wrong results +main.tc_heuristic_recover : MDEV-14189 - Wrong result +main.type_blob : MDEV-15195 - Wrong result +main.type_datetime : Modified in 10.2.31 +main.type_datetime_hires : MDEV-10687 - Timeout +main.type_int : Modified in 10.2.31 +main.type_time : Modified in 10.2.31 +main.union_crash-714 : Modified in 10.2.31 +main.userstat : MDEV-12904 - SSL errors +main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query +main.warnings_debug : Modified in 10.2.31 +main.win : Modified in 10.2.31 +main.xa : MDEV-11769 - lock wait timeout #----------------------------------------------------------------------- @@ -157,7 +165,7 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed binlog.binlog_commit_wait : MDEV-10150 - Mismatch binlog.binlog_index : Include file modified in 10.2.31 -binlog.binlog_invalid_read_in_rotate : Added in 10.2.31 +binlog.binlog_invalid_read_in_rotate : MDEV-22455 - Server crash; added in 10.2.31 binlog.binlog_ioerr : Include file modified in 10.2.31 binlog.binlog_killed : MDEV-12925 - Wrong result binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown @@ -179,15 +187,15 @@ binlog_encryption.encrypted_master : MDEV-14201 - Extra wa binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't init tc log binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed binlog_encryption.multisource : MDEV-21289 - Wrong error code -binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash +binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash; include file modified in 10.2.32 binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result; include file modified in 10.2.31 -binlog_encryption.rpl_corruption : Include file modified in 10.2.31 +binlog_encryption.rpl_corruption : Include file modified in 10.2.32 binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start -binlog_encryption.rpl_incident : Include file modified in 10.2.31 +binlog_encryption.rpl_incident : MDEV-21569 - mutex: LOCK_global_system_variables unlocking; include file modified in 10.2.31 binlog_encryption.rpl_init_slave_errors : Include file modified in 10.2.31 binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include; include file modified in 10.2.31 -binlog_encryption.rpl_parallel_ignored_errors : Include file modified in 10.2.31 +binlog_encryption.rpl_parallel_ignored_errors : MDEV-22471 - Slave crash; include file modified in 10.2.31 binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning @@ -198,15 +206,13 @@ binlog_encryption.rpl_typeconv : MDEV-14362 - Lost con #----------------------------------------------------------------------- -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-14803 - Failed to discover table -connect.vcol : MDEV-12374 - Fails on Windows -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 +connect.pivot : MDEV-14803 - Failed to discover table +connect.vcol : MDEV-12374 - Fails on Windows +connect.zip : MDEV-13884 - Wrong result + +#----------------------------------------------------------------------- + +disks.disks_notembedded : MDEV-21587 - Wrong result #----------------------------------------------------------------------- @@ -229,7 +235,7 @@ encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout encryption.innodb_encrypt_log : MDEV-13725 - Wrong result encryption.innodb_encrypt_log_corruption : MDEV-14379 - Server crash encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result -encryption.innodb_encryption : MDEV-15675 - Timeout +encryption.innodb_encryption : MDEV-14728 - Unable to get certificate; MDEV-15675 - Timeout 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 @@ -290,39 +296,45 @@ galera_3nodes.* : Suite is not stable yet gcol.gcol_rollback : MDEV-16954 - Unknown storage engine 'InnoDB' gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion gcol.innodb_virtual_debug : MDEV-19114 - Assertion failure -gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.2.31 +gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.2.32 #----------------------------------------------------------------------- innodb.101_compatibility : MDEV-13891 - Wrong result innodb.alter_copy : MDEV-16181 - Assertion failure innodb.alter_crash : MDEV-16944 - The process cannot access the file +innodb.alter_missing_tablespace : Modified in 10.2.32 innodb.autoinc_persist : MDEV-15282 - Assertion failure innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.blob-crash : MDEV-20481 - Failures upon recovery innodb.blob-update-debug : Modified in 10.2.31 +innodb.buf_pool_resize_oom : Added in 10.2.32 +innodb.corrupted_during_recovery : Modified in 10.2.32 innodb.doublewrite : MDEV-12905 - Server crash +innodb.foreign_key : Modified in 10.2.32 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure -innodb.ibuf_not_empty : MDEV-19021 - Wrong result; modified in 10.2.30 -innodb.innodb-32k-crash : Modified in 10.2.30 -innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup; modified in 10.2.30 +innodb.ibuf_not_empty : MDEV-19021 - Wrong result +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-table : MDEV-10619 - Testcase timeout -innodb.innodb-blob : MDEV-12053 - Client crash +innodb.innodb-blob : MDEV-12053 - Client crash; modified in 10.2.32 innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown innodb.innodb-get-fk : MDEV-13276 - Server crash innodb.innodb-index-online : MDEV-14809 - Cannot save statistics -innodb.innodb-mdev-7513 : Modified in 10.2.30 +innodb.innodb-online-alter-gis : MDEV-22071 - Uninitialised value innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem innodb.innodb-replace-debug : Modified in 10.2.31 innodb.innodb-stats-initialize-failure : Modified in 10.2.31 innodb.innodb-table-online : MDEV-13894 - Wrong result -innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno +innodb.innodb-wl5522 : Modified in 10.2.32 +innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno; modified in 10.2.32 innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc +innodb.innodb_buffer_pool_load_now : Added in 10.2.32 +innodb.innodb_buffer_pool_resize_debug : Added in 10.2.32 innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure innodb.innodb_bug11754376 : Modified in 10.2.31 innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt @@ -334,22 +346,25 @@ innodb.innodb_bug56947 : Modified in 10.2.31 innodb.innodb_bug59641 : MDEV-13830 - Assertion failure innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start innodb.innodb_corrupt_bit : Modified in 10.2.31 +innodb.innodb_defrag_concurrent : Modified in 10.2.32 innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full innodb.innodb_information_schema : MDEV-8851 - Wrong result -innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.2.30 -innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.2.30 +innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed +innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result innodb.innodb_monitor : MDEV-10939 - Testcase timeout innodb.innodb_mysql : MDEV-19873 - Wrong result innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_stats_persistent : MDEV-21567 - Wrong result in execution plan innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait; modified in 10.2.31 +innodb.innodb_sys_var_valgrind : Added in 10.2.32 innodb.innodb_wl6326 : Added in 10.2.31 innodb.innodb_wl6326_big : Added in 10.2.31 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_data_file_size : MDEV-14204 - Server failed to start innodb.log_file_name : MDEV-14193 - Exception +innodb.log_file_name_debug : Modified in 10.2.32 innodb.log_file_size : MDEV-15668 - Not found pattern innodb.monitor : MDEV-16179 - Wrong result innodb.purge_secondary : MDEV-15681 - Wrong result @@ -363,44 +378,55 @@ innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start innodb.temporary_table : MDEV-13265 - Wrong result innodb.truncate_inject : Modified in 10.2.31 -innodb.undo_log : Modified in 10.2.30 innodb.undo_truncate : MDEV-17340 - Server hung innodb.undo_truncate_recover : MDEV-17679 - MySQL server has gone away innodb.update_time : MDEV-14804 - Wrong result innodb.xa_recovery : MDEV-15279 - mysqld got exception +innodb.xa_recovery_debug : Added in 10.2.32 #----------------------------------------------------------------------- innodb_fts.concurrent_insert : Modified in 10.2.31 -innodb_fts.innodb_fts_misc : Modified in 10.2.30 +innodb_fts.innodb_fts_misc : Modified in 10.2.32 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed -innodb_fts.sync : MDEV-14808 - Wrong result +innodb_fts.misc_debug : Modified in 10.2.32 +innodb_fts.misc_debug2 : Added in 10.2.32 +innodb_fts.stopword : Added in 10.2.32 +innodb_fts.sync : Modified in 10.2.32 innodb_fts.sync_block : Modified in 10.2.31 +innodb_fts.sync_ddl : MDEV-21568 - Errno: 2000 #----------------------------------------------------------------------- +innodb_gis.bug16236208 : Re-enabled in 10.2.32; modified in 10.2.32 +innodb_gis.bug16266012 : Re-enabled in 10.2.32; modified in 10.2.32 +innodb_gis.geometry : Re-enabled in 10.2.32; modified in 10.2.32 +innodb_gis.gis_split_inf : Re-enabled in 10.2.32; modified in 10.2.32 +innodb_gis.gis_split_nan : MDEV-21678 - Cannot get geometry object +innodb_gis.point_big : Re-enabled in 10.2.32 innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded innodb_gis.rtree_debug : Modified in 10.2.31 +innodb_gis.rtree_multi_pk : Re-enabled in 10.2.32; modified in 10.2.32 innodb_gis.rtree_purge : MDEV-15275 - Timeout innodb_gis.rtree_recovery : MDEV-15274 - Error on check innodb_gis.rtree_rollback1 : Modified in 10.2.31 innodb_gis.rtree_rollback2 : Modified in 10.2.31 -innodb_gis.rtree_split : MDEV-14208 - Too many arguments +innodb_gis.rtree_split : MDEV-14208 - Too many arguments; modified in 10.2.32 innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file innodb_gis.types : MDEV-15679 - Table is marked as crashed #----------------------------------------------------------------------- -innodb_zip.bug53591 : Modified in 10.2.30 -innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed; modified in 10.2.31 -innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings -innodb_zip.prefix_index_liftedlimit : Modified in 10.2.30 -innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2 -innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure -innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket -innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 +innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed; modified in 10.2.31 +innodb_zip.index_large_prefix_4k : MDEV-21679 - Row size too large +innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings +innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.2.32 +innodb_zip.wl5522_zip : Modified in 10.2.32 +innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure +innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket +innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 #----------------------------------------------------------------------- @@ -412,14 +438,16 @@ maria.maria : MDEV-14430 - Extra warning #----------------------------------------------------------------------- mariabackup.apply-log-only : MDEV-20135 - Timeout +mariabackup.backup_lock_wait_timeout : Added in 10.2.32 mariabackup.data_directory : MDEV-15270 - Error on exec mariabackup.full_backup : MDEV-16571 - Wrong result mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future -mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure; modified in 10.2.30 +mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure mariabackup.incremental_encrypted : MDEV-15667 - Timeout mariabackup.innodb_redo_log_overwrite : Added in 10.2.31 +mariabackup.innodb_xa_rollback : Added in 10.2.32 mariabackup.mdev-14447 : MDEV-15201 - Timeout -mariabackup.partial_exclude : MDEV-15270 - Error on exec +mariabackup.partial_exclude : MDEV-15270 - Error on exec; modified in 10.2.32 mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault mariabackup.xb_page_compress : MDEV-14810 - status: 1, errno: 11 mariabackup.xb_partition : MDEV-17584 - Crash on shutdown @@ -478,6 +506,7 @@ percona.* : MDEV-10997 - Not maintained #----------------------------------------------------------------------- +perfschema.bad_option_1 : MDEV-21571 - Crash on bootstrap perfschema.connect_attrs : MDEV-17283 - Wrong result perfschema.dml_file_instances : MDEV-15179 - Wrong result perfschema.dml_threads : MDEV-17746 - Wrong errno @@ -519,7 +548,6 @@ perfschema.hostcache_ipv6_nameinfo_noname_deny : Modified in 10.2.31 perfschema.hostcache_ipv6_passwd : Modified in 10.2.31 perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; modified in 10.2.31 perfschema.hostcache_peer_addr : MDEV-21462 - Test condition timeout; modified in 10.2.31 -perfschema.misc : Modified in 10.2.30 perfschema.privilege_table_io : MDEV-13184 - Extra lines perfschema.rpl_gtid_func : MDEV-16897 - Wrong result perfschema.socket_instances_func : MDEV-20140 - Wrong result @@ -539,7 +567,7 @@ perfschema_stress.* : MDEV-10996 - Not maintained plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such plugins.processlist : MDEV-16574 - Wrong result -plugins.server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.2.30 +plugins.server_audit : MDEV-9562 - crashes on sol10-sparc; modified in 10.2.32 plugins.thread_pool_server_audit : MDEV-14295 - Wrong result #----------------------------------------------------------------------- @@ -579,7 +607,7 @@ roles.create_and_grant_role : MDEV-11772 - wrong result #----------------------------------------------------------------------- -rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free; modified in 10.2.31 +rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free; modified in 10.2.32 rpl.create_or_replace2 : MDEV-19412 - Lost connection to MySQL server rpl.create_or_replace_mix : MDEV-20523 - Wrong result rpl.create_or_replace_statement : MDEV-20523 - Wrong result @@ -589,25 +617,27 @@ rpl.last_insert_id : MDEV-10625 - warnings in error log 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_errors : MDEV-12742 - Crash +rpl.rpl_binlog_errors : MDEV-12742 - Crash; include file modified in 10.2.32 rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master rpl.rpl_binlog_rollback_cleanup : Added in 10.2.31 rpl.rpl_bug33931 : Modified in 10.2.31 -rpl.rpl_bug41902 : Modified in 10.2.31 +rpl.rpl_bug41902 : Configuration deleted in 10.2.32 rpl.rpl_checksum : Include file modified in 10.2.31 rpl.rpl_colSize : MDEV-16112 - Server crash -rpl.rpl_corruption : Include file modified in 10.2.31 +rpl.rpl_conditional_comments : Modified in 10.2.32 +rpl.rpl_corruption : Include file modified in 10.2.32 rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac rpl.rpl_ddl : MDEV-10417 - Fails on Mips -rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash; modified in 10.2.31 +rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash; modified in 10.2.32 rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Warnings/errors; modified in 10.2.31 rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning +rpl.rpl_fail_register : MDEV-22472 - Wrong result; added in 10.2.32 rpl.rpl_flushlog_loop : MDEV-21570 - Server crash rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output -rpl.rpl_get_master_version_and_clock : Modified in 10.2.31 +rpl.rpl_get_master_version_and_clock : Re-enabled in 10.2.32; include file modified in 10.2.32 rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout @@ -616,6 +646,7 @@ rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings rpl.rpl_gtid_reconnect : MDEV-14497 - Crash; modified in 10.2.31 rpl.rpl_gtid_startpos : MDEV-20141 - mysqltest failed but provided no output rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings +rpl.rpl_gtid_strict : Modified in 10.2.32 rpl.rpl_gtid_until : MDEV-10625 - warnings in error log rpl.rpl_heartbeat_debug : Modified in 10.2.31 rpl.rpl_incident : Include file modified in 10.2.31 @@ -646,7 +677,7 @@ rpl.rpl_row_001 : MDEV-16653 - Internal check fails 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_big_table_id : Modified in 10.2.31 -rpl.rpl_row_corruption : MDEV-21569 - mutex: LOCK_global_system_variables unlocking +rpl.rpl_row_corruption : MDEV-21569 - mutex: LOCK_global_system_variables unlocking; modified in 10.2.32 rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result rpl.rpl_row_find_row_debug : Modified in 10.2.31 rpl.rpl_row_img_blobs : MDEV-13875 - command "diff_files" failed @@ -659,7 +690,6 @@ 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.2.30 rpl.rpl_semi_sync_skip_repl : Modified in 10.2.31 rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition @@ -676,7 +706,7 @@ rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout rpl.rpl_stm_lcase_tblnames : Modified in 10.2.31 rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion -rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash; include file modified in 10.2.31 +rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash; include file modified in 10.2.32 rpl.rpl_stop_slave : Modified in 10.2.31 rpl.rpl_sync : MDEV-13830 - Assertion failure rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master @@ -702,9 +732,8 @@ sphinx.* : MDEV-10986 - Tests have not been maintained #----------------------------------------------------------------------- -spider.* : MDEV-9329 - tests are too memory-consuming -spider.basic_sql : MDEV-11186 - Internal check fails -spider.pushdown_not_like : Added in 10.2.30 +spider.* : MDEV-9329 - tests are too memory-consuming +spider.basic_sql : MDEV-11186 - Internal check fails #----------------------------------------------------------------------- @@ -825,8 +854,10 @@ wsrep.mdev_6832 : MDEV-14195 - Check testcase failed wsrep.mysql_tzinfo_to_sql_symlink : Modified in 10.2.31 wsrep.mysql_tzinfo_to_sql_symlink_skip : Modified in 10.2.31 wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use; re-enabled in 10.2.31; configuration modified in 10.2.31 +wsrep.trans : Modified in 10.2.32 wsrep.variables : MDEV-17585 - Deadlock; modified in 10.2.31 #----------------------------------------------------------------------- -wsrep_info.* : Config file changed in 10.2.31 +wsrep_info.* : Config file changed in 10.2.31 +wsrep_info.plugin : MDEV-22470 - WSREP: no nodes coming from prim view, prim not possible From 9c5d06a6d3c1861ed1bb96670a19ac1bdb6c5b7d Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 5 May 2020 13:11:52 +0200 Subject: [PATCH 03/18] MDEV-21437 MariaDB's SUSE/SLES packages don't "provide" all of the same capabilities as the platform's default packages --- CMakeLists.txt | 5 +++-- cmake/cpack_rpm.cmake | 8 ++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 083fa753b88..05e3c52f1e4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,8 +144,6 @@ INCLUDE(mysql_version) INCLUDE(cpack_source_ignore_files) INCLUDE(install_layout) INCLUDE(wsrep) -INCLUDE(cpack_rpm) -INCLUDE(cpack_deb) # Add macros INCLUDE(character_sets) @@ -395,6 +393,9 @@ IF(WITH_UNIT_TESTS) ENDIF() ENDIF() +INCLUDE(cpack_rpm) +INCLUDE(cpack_deb) + SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "") # Add storage engines and plugins. CONFIGURE_PLUGINS() diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index ae9e3b904b3..a0449b5918d 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -232,6 +232,14 @@ ELSEIF(RPM MATCHES "fedora" OR RPM MATCHES "(rhel|centos)7") ALTERNATIVE_NAME("shared" "mysql-libs") ALTERNATIVE_NAME("test" "mariadb-test") SET(CPACK_RPM_common_PACKAGE_CONFLICTS "mariadb-libs < 1:%{version}-%{release}") +ELSEIF(RPM MATCHES "sles") + ALTERNATIVE_NAME("server" "mariadb") + SETA(CPACK_RPM_server_PACKAGE_PROVIDES + "mysql = %{version}-%{release}" + "mariadb_${MAJOR_VERSION}${MINOR_VERSION} = %{version}-%{release}" + "mariadb-${MAJOR_VERSION}${MINOR_VERSION} = %{version}-%{release}" + "mariadb-server = %{version}-%{release}" + ) ENDIF() # If we want to build build MariaDB-shared-compat, From 459e8619f2e3b72e5813d04a358f4e31637649f0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 6 May 2020 11:51:44 +0300 Subject: [PATCH 04/18] MDEV-21462 main.processlist_notembedded fails to clean up Replace the 30-second sleep in the test with proper DEBUG_SYNC interlocking. --- mysql-test/r/processlist_notembedded.result | 3 ++- mysql-test/t/processlist_notembedded.test | 9 +++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/processlist_notembedded.result b/mysql-test/r/processlist_notembedded.result index f5b2a310813..ab1ced79e25 100644 --- a/mysql-test/r/processlist_notembedded.result +++ b/mysql-test/r/processlist_notembedded.result @@ -1,7 +1,8 @@ # # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes # -SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync'; +SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go'; SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; +SET DEBUG_SYNC= 'now SIGNAL go'; SET DEBUG_SYNC = 'RESET'; End of 5.5 tests diff --git a/mysql-test/t/processlist_notembedded.test b/mysql-test/t/processlist_notembedded.test index dc970cf5709..82cdfc2d20e 100644 --- a/mysql-test/t/processlist_notembedded.test +++ b/mysql-test/t/processlist_notembedded.test @@ -1,6 +1,7 @@ source include/have_debug.inc; source include/have_debug_sync.inc; source include/not_embedded.inc; +source include/count_sessions.inc; --echo # --echo # MDEV-20466: SHOW PROCESSLIST truncates query text on \0 bytes @@ -10,9 +11,9 @@ connect (con1,localhost,root,,); connection con1; -let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "' or sleep (30)")`; +let $q= `select CONCAT("SELECT user sleep FROM mysql.user WHERE user ='some", CHAR(0), "'")`; -SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync'; +SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go'; --disable_query_log --send_eval $q; --enable_query_log @@ -27,8 +28,12 @@ let SEARCH_PATTERN=sleep; source include/search_pattern_in_file.inc; remove_file $MYSQLTEST_VARDIR/tmp//MDEV-20466.text; +SET DEBUG_SYNC= 'now SIGNAL go'; + disconnect con1; SET DEBUG_SYNC = 'RESET'; +source include/wait_until_count_sessions.inc; + --echo End of 5.5 tests From f20c63264ab4170fc8e45093042bd2e7272ce9fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Wed, 6 May 2020 13:47:55 +0300 Subject: [PATCH 05/18] MDEV-21462: Actually test for the original bug We must ensure that the NUL will not terminate the query string. --- mysql-test/t/processlist_notembedded.test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mysql-test/t/processlist_notembedded.test b/mysql-test/t/processlist_notembedded.test index 82cdfc2d20e..b07ac00a44a 100644 --- a/mysql-test/t/processlist_notembedded.test +++ b/mysql-test/t/processlist_notembedded.test @@ -11,7 +11,7 @@ connect (con1,localhost,root,,); connection con1; -let $q= `select CONCAT("SELECT user sleep FROM mysql.user WHERE user ='some", CHAR(0), "'")`; +let $q= `select CONCAT("SELECT user FROM mysql.user WHERE user ='some", CHAR(0), "sleep'")`; SET DEBUG_SYNC= 'before_join_optimize SIGNAL in_sync WAIT_FOR go'; --disable_query_log From 0fcc3abf4a0b64932dbd5fb2a3a8d466c9a5f4a9 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Tue, 5 May 2020 14:55:05 +0200 Subject: [PATCH 06/18] MDEV-22180 Planner opens unnecessary tables when updated table is referenced by foreign keys only MDL-prelock but do not open FK child tables for read-only (RESTRICT) FK actions. Tables still needs to be opened for CASCADE actions, see 9180e8666b8 --- mysql-test/suite/innodb/r/foreign-keys.result | 21 +++++++++++++++++ mysql-test/suite/innodb/t/foreign-keys.test | 23 +++++++++++++++++++ sql/table.h | 3 +++ 3 files changed, 47 insertions(+) diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result index 10e0b1f3d7b..3778dd082c7 100644 --- a/mysql-test/suite/innodb/r/foreign-keys.result +++ b/mysql-test/suite/innodb/r/foreign-keys.result @@ -124,3 +124,24 @@ SET debug_sync='reset'; SHOW OPEN TABLES FROM test; Database Table In_use Name_locked DROP TABLE t1, t2; +create table t1 (pk int primary key, data int) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +create table t2 (t1_pk int, foreign key (t1_pk) references t1 (pk)) engine=innodb; +insert t2 values (1),(2); +insert t2 values (10); +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_pk`) REFERENCES `t1` (`pk`)) +flush tables; +flush status; +update t1 set data=10 where pk+1>10; +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 1 +Opened_tables 1 +flush tables; +flush status; +update t2 set t1_pk=11 where t1_pk+1>10; +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 1 +Opened_tables 1 +drop table t2, t1; diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test index a19fe3876f3..b3293e88676 100644 --- a/mysql-test/suite/innodb/t/foreign-keys.test +++ b/mysql-test/suite/innodb/t/foreign-keys.test @@ -158,3 +158,26 @@ connection default; SET debug_sync='reset'; SHOW OPEN TABLES FROM test; DROP TABLE t1, t2; + +# +# MDEV-22180 Planner opens unnecessary tables when updated table is referenced by foreign keys +# +source include/have_innodb.inc; + +create table t1 (pk int primary key, data int) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +create table t2 (t1_pk int, foreign key (t1_pk) references t1 (pk)) engine=innodb; +insert t2 values (1),(2); +error ER_NO_REFERENCED_ROW_2; +insert t2 values (10); +flush tables; +flush status; +# with ON UPDATE RESTRICT child tables are not opened +update t1 set data=10 where pk+1>10; +show status like '%opened_tab%'; +flush tables; +flush status; +# neither are parent tables +update t2 set t1_pk=11 where t1_pk+1>10; +show status like '%opened_tab%'; +drop table t2, t1; diff --git a/sql/table.h b/sql/table.h index 44803b5aacd..29b4cfdbcf3 100644 --- a/sql/table.h +++ b/sql/table.h @@ -1813,6 +1813,9 @@ struct TABLE_LIST open_type= routine ? OT_TEMPORARY_OR_BASE : OT_BASE_ONLY; belong_to_view= belong_to_view_arg; trg_event_map= trg_event_map_arg; + /* MDL is enough for read-only FK checks, we don't need the table */ + if (prelocking_placeholder == FK && lock_type < TL_WRITE_ALLOW_WRITE) + open_strategy= OPEN_STUB; **last_ptr= this; prev_global= *last_ptr; From b22a4bf62672edd225b95f7f5b07e872493888fc Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 4 May 2020 22:58:14 +0200 Subject: [PATCH 07/18] MDEV-21886 MariaDB RPM upgrade overwrites PAM user map %config(noreplace) /etc/security --- plugin/auth_pam/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/plugin/auth_pam/CMakeLists.txt b/plugin/auth_pam/CMakeLists.txt index ac598e4ffa6..5366246745e 100644 --- a/plugin/auth_pam/CMakeLists.txt +++ b/plugin/auth_pam/CMakeLists.txt @@ -32,6 +32,7 @@ IF(HAVE_PAM_APPL_H) IF(INSTALL_PAMDIR) INSTALL(TARGETS pam_user_map DESTINATION ${INSTALL_PAMDIR} COMPONENT Server) INSTALL(FILES mapper/user_map.conf DESTINATION ${INSTALL_PAMDATADIR} COMPONENT Server) + SET(CPACK_RPM_server_USER_FILELIST ${CPACK_RPM_server_USER_FILELIST} "%config(noreplace) ${INSTALL_PAMDATADIR}/*" PARENT_SCOPE) ENDIF() ENDIF() ENDIF(HAVE_PAM_APPL_H) From 0253ea7f2208354b187ffcfa2f3128878597cc11 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Wed, 19 Feb 2020 17:50:30 +0100 Subject: [PATCH 08/18] MDEV-19650: Privilege bug on MariaDB 10.4 Also fixes: MDEV-21487: Implement option for mysql_upgrade that allows root@localhost to be replaced MDEV-21486: Implement option for mysql_install_db that allows root@localhost to be replaced Add user mariadb.sys to be definer of user view (and has right on underlying table global_priv for required operation over global_priv (SELECT,UPDATE,DELETE)) Also changed definer of gis functions in case of creation, but they work with any definer so upgrade script do not try to push this change. --- mysql-test/main/explain_non_select.result | 2 +- mysql-test/main/failed_auth_3909.result | 16 +- mysql-test/main/failed_auth_3909.test | 8 +- mysql-test/main/failed_auth_unixsocket.result | 4 +- mysql-test/main/failed_auth_unixsocket.test | 4 +- mysql-test/main/gis_notembedded.result | 4 +- mysql-test/main/grant.result | 26 ++- mysql-test/main/grant.test | 4 + mysql-test/main/grant2.result | 2 +- mysql-test/main/grant2.test | 2 +- mysql-test/main/information_schema.result | 5 +- mysql-test/main/lowercase_fs_off.test | 1 + mysql-test/main/mysql_upgrade-6984.result | 4 +- mysql-test/main/mysql_upgrade-6984.test | 4 +- mysql-test/main/mysql_upgrade.result | 2 +- mysql-test/main/plugin_auth_qa.result | 42 ++++ mysql-test/main/plugin_auth_qa_1.result | 15 ++ mysql-test/main/plugin_auth_qa_2.result | 9 + mysql-test/main/ps_grant.result | 18 +- mysql-test/main/ps_grant.test | 7 + mysql-test/main/set_password.result | 2 + mysql-test/main/stat_tables.result | 2 +- mysql-test/main/stat_tables_innodb.result | 2 +- mysql-test/main/system_mysql_db.result | 2 +- .../main/system_mysql_db_fix40123.result | 2 +- .../main/system_mysql_db_fix50030.result | 2 +- .../main/system_mysql_db_fix50117.result | 2 +- mysql-test/main/upgrade_MDEV-19650.result | 209 ++++++++++++++++++ mysql-test/main/upgrade_MDEV-19650.test | 159 +++++++++++++ mysql-test/main/view_grant.result | 3 + .../funcs_1/r/is_routines_embedded.result | 12 +- .../suite/funcs_1/r/is_statistics.result | 4 +- .../funcs_1/r/is_table_privileges.result | 7 +- .../perfschema/r/privilege_table_io.result | 2 + mysql-test/suite/roles/acl_statistics.result | 16 +- .../suite/roles/grant_revoke_current.result | 2 +- .../suite/roles/grant_revoke_current.test | 2 +- .../roles/set_role-database-recursive.result | 1 + .../roles/set_role-database-simple.result | 1 + .../suite/roles/set_role-recursive.result | 1 + .../roles/set_role-routine-simple.result | 1 + mysql-test/suite/roles/set_role-simple.result | 1 + .../roles/set_role-table-column-priv.result | 2 + .../suite/roles/set_role-table-simple.result | 2 + mysql-test/suite/roles/show_grants.result | 1 + mysql-test/suite/rpl/disabled.def | 1 + .../suite/rpl/r/rpl_ignore_table.result | 28 +-- mysql-test/suite/rpl/t/rpl_ignore_table.test | 13 ++ scripts/maria_add_gis_sp.sql.in | 4 +- scripts/mysql_system_tables.sql | 17 +- scripts/mysql_system_tables_fix.sql | 5 + 51 files changed, 597 insertions(+), 90 deletions(-) create mode 100644 mysql-test/main/upgrade_MDEV-19650.result create mode 100644 mysql-test/main/upgrade_MDEV-19650.test diff --git a/mysql-test/main/explain_non_select.result b/mysql-test/main/explain_non_select.result index 51414d0c196..111b4c8ae50 100644 --- a/mysql-test/main/explain_non_select.result +++ b/mysql-test/main/explain_non_select.result @@ -229,7 +229,7 @@ INSERT INTO t1 VALUES (1),(2); EXPLAIN UPDATE v1, mysql.user SET v1.a = v1.a + 1; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE t1 ALL NULL NULL NULL NULL 2 -1 SIMPLE global_priv index NULL PRIMARY 420 NULL 4 Using index +1 SIMPLE global_priv index NULL PRIMARY 420 NULL 5 Using index DROP TABLE t1; DROP VIEW v1; # diff --git a/mysql-test/main/failed_auth_3909.result b/mysql-test/main/failed_auth_3909.result index 19951415585..55869974301 100644 --- a/mysql-test/main/failed_auth_3909.result +++ b/mysql-test/main/failed_auth_3909.result @@ -4,14 +4,14 @@ create user baz identified via mysql_old_password; connect(localhost,u1,,test,MASTER_PORT,MASTER_SOCKET); connect fail,localhost,u1; ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO) -connect(localhost,u2,,test,MASTER_PORT,MASTER_SOCKET); -connect fail,localhost,u2; -ERROR HY000: Server is running in --secure-auth mode, but 'u2'@'localhost' has a password in the old format; please change the password to the new format -connect(localhost,u2,password,test,MASTER_PORT,MASTER_SOCKET); -connect fail,localhost,u2,password; -ERROR HY000: Server is running in --secure-auth mode, but 'u2'@'localhost' has a password in the old format; please change the password to the new format +connect(localhost,uu2,,test,MASTER_PORT,MASTER_SOCKET); +connect fail,localhost,uu2; +ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format +connect(localhost,uu2,password,test,MASTER_PORT,MASTER_SOCKET); +connect fail,localhost,uu2,password; +ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format ERROR 28000: Access denied for user 'u1'@'localhost' (using password: NO) -ERROR HY000: Server is running in --secure-auth mode, but 'u2'@'localhost' has a password in the old format; please change the password to the new format -ERROR HY000: Server is running in --secure-auth mode, but 'u2'@'localhost' has a password in the old format; please change the password to the new format +ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format +ERROR HY000: Server is running in --secure-auth mode, but 'uu2'@'localhost' has a password in the old format; please change the password to the new format delete from mysql.user where plugin = 'mysql_old_password'; flush privileges; diff --git a/mysql-test/main/failed_auth_3909.test b/mysql-test/main/failed_auth_3909.test index 25e45e49a0e..af65f46cfa2 100644 --- a/mysql-test/main/failed_auth_3909.test +++ b/mysql-test/main/failed_auth_3909.test @@ -16,20 +16,20 @@ connect (fail,localhost,u1); --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --error ER_SERVER_IS_IN_SECURE_AUTH_MODE -connect (fail,localhost,u2); +connect (fail,localhost,uu2); --replace_result $MASTER_MYSOCK MASTER_SOCKET $MASTER_MYPORT MASTER_PORT --error ER_SERVER_IS_IN_SECURE_AUTH_MODE -connect (fail,localhost,u2,password); +connect (fail,localhost,uu2,password); --error ER_ACCESS_DENIED_ERROR change_user u1; --error ER_SERVER_IS_IN_SECURE_AUTH_MODE -change_user u2; +change_user uu2; --error ER_SERVER_IS_IN_SECURE_AUTH_MODE -change_user u2,password; +change_user uu2,password; delete from mysql.user where plugin = 'mysql_old_password'; flush privileges; diff --git a/mysql-test/main/failed_auth_unixsocket.result b/mysql-test/main/failed_auth_unixsocket.result index 98057c02b74..32357a5a7a9 100644 --- a/mysql-test/main/failed_auth_unixsocket.result +++ b/mysql-test/main/failed_auth_unixsocket.result @@ -1,7 +1,7 @@ -update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket'); +update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket') where user='root'; flush privileges; connect(localhost,USER,,test,MASTER_PORT,MASTER_SOCKET); ERROR 28000: Access denied for user 'USER'@'localhost' ERROR 28000: Access denied for user 'USER'@'localhost' -update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin')); +update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin')) where user='root'; flush privileges; diff --git a/mysql-test/main/failed_auth_unixsocket.test b/mysql-test/main/failed_auth_unixsocket.test index 0dcc050a463..e163a0c230f 100644 --- a/mysql-test/main/failed_auth_unixsocket.test +++ b/mysql-test/main/failed_auth_unixsocket.test @@ -4,7 +4,7 @@ # MDEV-3909 remote user enumeration # unix_socket tests # -update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket'); +update mysql.global_priv set priv=json_insert(priv, '$.plugin', 'unix_socket') where user='root'; flush privileges; # Make sure that the replace works, even if $USER is 'user' or something else @@ -22,5 +22,5 @@ connect (fail,localhost,$USER); --error ER_ACCESS_DENIED_NO_PASSWORD_ERROR change_user $USER; -update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin')); +update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin')) where user='root'; flush privileges; diff --git a/mysql-test/main/gis_notembedded.result b/mysql-test/main/gis_notembedded.result index 64e90572bf0..99fe8d656a1 100644 --- a/mysql-test/main/gis_notembedded.result +++ b/mysql-test/main/gis_notembedded.result @@ -1,13 +1,13 @@ show create procedure mysql.AddGeometryColumn; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -AddGeometryColumn CREATE DEFINER=`root`@`localhost` PROCEDURE `AddGeometryColumn`(catalog varchar(64), t_schema varchar(64), +AddGeometryColumn CREATE DEFINER=`mariadb.sys`@`localhost` PROCEDURE `AddGeometryColumn`(catalog varchar(64), t_schema varchar(64), t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER begin set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end latin1 latin1_swedish_ci latin1_swedish_ci show create procedure mysql.DropGeometryColumn; Procedure sql_mode Create Procedure character_set_client collation_connection Database Collation -DropGeometryColumn CREATE DEFINER=`root`@`localhost` PROCEDURE `DropGeometryColumn`(catalog varchar(64), t_schema varchar(64), +DropGeometryColumn CREATE DEFINER=`mariadb.sys`@`localhost` PROCEDURE `DropGeometryColumn`(catalog varchar(64), t_schema varchar(64), t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER begin diff --git a/mysql-test/main/grant.result b/mysql-test/main/grant.result index 3d2313e8c9b..8a2ea3c26ec 100644 --- a/mysql-test/main/grant.result +++ b/mysql-test/main/grant.result @@ -656,9 +656,9 @@ GRANT ALL PRIVILEGES ON mysqltest.dummytable TO dummy@localhost; GRANT ALL PRIVILEGES ON mysqltest.dummyview TO dummy@localhost; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO `dummy`@`localhost` -GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost` GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO `dummy`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT USAGE ON *.* TO `dummy`@`localhost` use INFORMATION_SCHEMA; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE @@ -669,9 +669,9 @@ mysqltest dummyview ALTER, CREATE, CREATE VIEW, DELETE, DELETE HISTORY, DROP, IN FLUSH PRIVILEGES; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO `dummy`@`localhost` -GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost` GRANT ALL PRIVILEGES ON `mysqltest`.`dummytable` TO `dummy`@`localhost` +GRANT ALL PRIVILEGES ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT USAGE ON *.* TO `dummy`@`localhost` SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; @@ -700,9 +700,9 @@ GRANT CREATE VIEW ON mysqltest.dummytable TO dummy@localhost; GRANT CREATE VIEW ON mysqltest.dummyview TO dummy@localhost; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO `dummy`@`localhost` -GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost` +GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT USAGE ON *.* TO `dummy`@`localhost` use INFORMATION_SCHEMA; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE @@ -713,9 +713,9 @@ mysqltest dummyview CREATE VIEW FLUSH PRIVILEGES; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost -GRANT USAGE ON *.* TO `dummy`@`localhost` -GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` GRANT CREATE VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost` +GRANT CREATE VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` +GRANT USAGE ON *.* TO `dummy`@`localhost` SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; @@ -735,8 +735,8 @@ GRANT SHOW VIEW ON mysqltest.dummyview TO dummy@localhost; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost GRANT USAGE ON *.* TO `dummy`@`localhost` -GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost` +GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` use INFORMATION_SCHEMA; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE @@ -748,8 +748,8 @@ FLUSH PRIVILEGES; SHOW GRANTS FOR dummy@localhost; Grants for dummy@localhost GRANT USAGE ON *.* TO `dummy`@`localhost` -GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` GRANT SHOW VIEW ON `mysqltest`.`dummytable` TO `dummy`@`localhost` +GRANT SHOW VIEW ON `mysqltest`.`dummyview` TO `dummy`@`localhost` SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; @@ -967,6 +967,9 @@ GRANT UPDATE ON `test`.`t1` TO `mysqltest_8`@`%` select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE 'mysqltest_8'@'%' def test t1 UPDATE NO +'mariadb.sys'@'localhost' def mysql global_priv SELECT NO +'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO +'mariadb.sys'@'localhost' def mysql global_priv DELETE NO connect conn5,localhost,mysqltest_8,,; select * from t1; a @@ -981,6 +984,9 @@ Grants for mysqltest_8@% GRANT USAGE ON *.* TO `mysqltest_8`@`%` select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'mariadb.sys'@'localhost' def mysql global_priv SELECT NO +'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO +'mariadb.sys'@'localhost' def mysql global_priv DELETE NO flush privileges; show grants for mysqltest_8@''; Grants for mysqltest_8@% diff --git a/mysql-test/main/grant.test b/mysql-test/main/grant.test index 47a274d75d1..7dedf820774 100644 --- a/mysql-test/main/grant.test +++ b/mysql-test/main/grant.test @@ -440,12 +440,14 @@ CREATE TABLE mysqltest.dummytable (dummyfield INT); CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable; GRANT ALL PRIVILEGES ON mysqltest.dummytable TO dummy@localhost; GRANT ALL PRIVILEGES ON mysqltest.dummyview TO dummy@localhost; +--sorted_result SHOW GRANTS FOR dummy@localhost; use INFORMATION_SCHEMA; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; FLUSH PRIVILEGES; +--sorted_result SHOW GRANTS FOR dummy@localhost; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE @@ -462,12 +464,14 @@ CREATE TABLE mysqltest.dummytable (dummyfield INT); CREATE VIEW mysqltest.dummyview AS SELECT dummyfield FROM mysqltest.dummytable; GRANT CREATE VIEW ON mysqltest.dummytable TO dummy@localhost; GRANT CREATE VIEW ON mysqltest.dummyview TO dummy@localhost; +--sorted_result SHOW GRANTS FOR dummy@localhost; use INFORMATION_SCHEMA; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE = '\'dummy\'@\'localhost\'' GROUP BY TABLE_SCHEMA, TABLE_NAME; FLUSH PRIVILEGES; +--sorted_result SHOW GRANTS FOR dummy@localhost; SELECT TABLE_SCHEMA, TABLE_NAME, GROUP_CONCAT(PRIVILEGE_TYPE ORDER BY PRIVILEGE_TYPE SEPARATOR ', ') AS PRIVILEGES FROM TABLE_PRIVILEGES WHERE GRANTEE diff --git a/mysql-test/main/grant2.result b/mysql-test/main/grant2.result index d238d261006..0eb8dee026e 100644 --- a/mysql-test/main/grant2.result +++ b/mysql-test/main/grant2.result @@ -557,7 +557,7 @@ GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose'; SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; User Host Password plugin authentication_string Insert_priv root localhost *0BB7188CF0DE9B403BA66E9DD810D82652D002EB mysql_native_password *0BB7188CF0DE9B403BA66E9DD810D82652D002EB Y -UPDATE global_priv SET priv=@root_priv; +UPDATE global_priv SET priv=@root_priv where user='root' and host='localhost'; FLUSH PRIVILEGES; USE test; End of 5.1 tests diff --git a/mysql-test/main/grant2.test b/mysql-test/main/grant2.test index b33d7d63992..f98af8d8630 100644 --- a/mysql-test/main/grant2.test +++ b/mysql-test/main/grant2.test @@ -669,7 +669,7 @@ SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHE GRANT INSERT ON *.* TO CURRENT_USER() IDENTIFIED BY 'keksdose'; SELECT user,host,password,plugin,authentication_string,insert_priv FROM user WHERE user=@u AND host=@h; -UPDATE global_priv SET priv=@root_priv; +UPDATE global_priv SET priv=@root_priv where user='root' and host='localhost'; FLUSH PRIVILEGES; USE test; diff --git a/mysql-test/main/information_schema.result b/mysql-test/main/information_schema.result index e69a24e5422..43e15abb7ee 100644 --- a/mysql-test/main/information_schema.result +++ b/mysql-test/main/information_schema.result @@ -565,7 +565,7 @@ create view v2 (c) as select a from t1 WITH LOCAL CHECK OPTION; create view v3 (c) as select a from t1 WITH CASCADED CHECK OPTION; select * from information_schema.views; TABLE_CATALOG TABLE_SCHEMA TABLE_NAME VIEW_DEFINITION CHECK_OPTION IS_UPDATABLE DEFINER SECURITY_TYPE CHARACTER_SET_CLIENT COLLATION_CONNECTION ALGORITHM -def mysql user select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` NONE YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED +def mysql user select `mysql`.`global_priv`.`Host` AS `Host`,`mysql`.`global_priv`.`User` AS `User`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`mysql`.`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`mysql`.`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `mysql`.`global_priv` NONE YES mariadb.sys@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED def test v1 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED def test v2 select `test`.`t1`.`a` AS `c` from `test`.`t1` LOCAL YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED def test v3 select `test`.`t1`.`a` AS `c` from `test`.`t1` CASCADED YES root@localhost DEFINER latin1 latin1_swedish_ci UNDEFINED @@ -575,6 +575,9 @@ GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME PRIVILEGE_TYPE IS_GRAN 'joe'@'localhost' def test t1 a SELECT YES select * from INFORMATION_SCHEMA.TABLE_PRIVILEGES; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'mariadb.sys'@'localhost' def mysql global_priv SELECT NO +'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO +'mariadb.sys'@'localhost' def mysql global_priv DELETE NO drop view v1, v2, v3; drop table t1; delete from mysql.user where user='joe'; diff --git a/mysql-test/main/lowercase_fs_off.test b/mysql-test/main/lowercase_fs_off.test index 7c5811f9cc3..f828773ed06 100644 --- a/mysql-test/main/lowercase_fs_off.test +++ b/mysql-test/main/lowercase_fs_off.test @@ -48,6 +48,7 @@ select * from T1; connection default; GRANT SELECT ON t1 to user_1@localhost; connection con1; +--sorted_result select * from information_schema.table_privileges; connection default; disconnect con1; diff --git a/mysql-test/main/mysql_upgrade-6984.result b/mysql-test/main/mysql_upgrade-6984.result index ad48004a2a3..120f7cf733c 100644 --- a/mysql-test/main/mysql_upgrade-6984.result +++ b/mysql-test/main/mysql_upgrade-6984.result @@ -1,4 +1,4 @@ -update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo')); +update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo')) where user='root'; Phase 1/7: Checking and upgrading mysql database Processing databases mysql @@ -63,6 +63,6 @@ test Phase 7/7: Running 'FLUSH PRIVILEGES' OK connect con1,localhost,root,foo,,,; -update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin', '$.authentication_string')); +update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin', '$.authentication_string')) where user='root'; flush privileges; set global event_scheduler=OFF; diff --git a/mysql-test/main/mysql_upgrade-6984.test b/mysql-test/main/mysql_upgrade-6984.test index ad2b95314b0..01bdc15c64b 100644 --- a/mysql-test/main/mysql_upgrade-6984.test +++ b/mysql-test/main/mysql_upgrade-6984.test @@ -11,13 +11,13 @@ # In this setup MYSQL_UPGRADE cannot continue after issuing FLUSH PRIVILEGES # -update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo')); +update mysql.global_priv set priv=json_set(priv, '$.plugin', 'mysql_native_password', '$.authentication_string', password('foo')) where user='root'; --exec $MYSQL_UPGRADE connect(con1,localhost,root,foo,,,); -update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin', '$.authentication_string')); +update mysql.global_priv set priv=json_compact(json_remove(priv, '$.plugin', '$.authentication_string')) where user='root'; flush privileges; # Load event table set global event_scheduler=OFF; diff --git a/mysql-test/main/mysql_upgrade.result b/mysql-test/main/mysql_upgrade.result index 33c3d1b8198..7be0be6ccc3 100644 --- a/mysql-test/main/mysql_upgrade.result +++ b/mysql-test/main/mysql_upgrade.result @@ -639,7 +639,7 @@ alter table mysql.user change authentication_string auth_string text collate utf # mysql_upgrade --force --silent 2>&1 select count(*) from mysql.global_priv; count(*) -4 +5 drop table mysql.global_priv; rename table mysql.global_priv_bak to mysql.global_priv; # End of 10.4 tests diff --git a/mysql-test/main/plugin_auth_qa.result b/mysql-test/main/plugin_auth_qa.result index e00ac1a4c96..e3158618b7d 100644 --- a/mysql-test/main/plugin_auth_qa.result +++ b/mysql-test/main/plugin_auth_qa.result @@ -2,37 +2,44 @@ set sql_mode=""; CREATE DATABASE test_user_db; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password ========== test 1.1 ====================================================== CREATE USER plug IDENTIFIED WITH test_plugin_server; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server DROP USER plug; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug; DROP USER plug; CREATE USER plug IDENTIFIED WITH 'test_plugin_server'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server DROP USER plug; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug; DROP USER plug; CREATE USER plug IDENTIFIED WITH test_plugin_server AS ''; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server DROP USER plug; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS ''; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server REVOKE ALL PRIVILEGES ON test_user_db.* FROM plug; DROP USER plug; @@ -101,61 +108,73 @@ CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; ========== test 1.1.1.6/1.1.2.5 ============================ SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug, plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest DROP USER plug; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug, plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest DROP USER plug; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug, plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plug_dest DROP USER plug; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; @@ -171,10 +190,12 @@ DROP USER plug; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password +mariadb.sys mysql_native_password plug test_plugin_server plug_dest GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password +mariadb.sys mysql_native_password plug mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug; GRANT ALL PRIVILEGES ON test_user_db.* TO plug IDENTIFIED WITH test_plugin_server AS 'plug_dest'; @@ -185,17 +206,20 @@ CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; CREATE USER plug_dest IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password +mariadb.sys mysql_native_password plug test_plugin_server plug_dest plug_dest test_plugin_server plug_dest DROP USER plug,plug_dest; CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'plug_dest'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password +mariadb.sys mysql_native_password plug test_plugin_server plug_dest GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED WITH test_plugin_server AS 'plug_dest'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password +mariadb.sys mysql_native_password plug test_plugin_server plug_dest plug_dest test_plugin_server plug_dest DROP USER plug,plug_dest; @@ -204,22 +228,26 @@ SET NAMES utf8; CREATE USER plüg IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plüg test_plugin_server plüg_dest DROP USER plüg; CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plüg_dest; SET NAMES ascii; CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password pl??g test_plugin_server pl??g_dest DROP USER 'plüg'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password pl??g_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER 'plüg_dest'; SET NAMES latin1; @@ -229,11 +257,13 @@ ERROR HY000: Plugin 'test_plügin_server' is not loaded CREATE USER 'plug' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server plüg_dest DROP USER 'plug'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER 'plüg_dest'; SET NAMES utf8; @@ -242,21 +272,25 @@ ERROR HY000: Plugin 'test_plügin_server' is not loaded CREATE USER 'plüg' IDENTIFIED WITH 'test_plugin_server' AS 'plüg_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plüg test_plugin_server plüg_dest DROP USER 'plüg'; CREATE USER 'plüg_dest' IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER 'plüg_dest'; CREATE USER plüg IDENTIFIED WITH test_plugin_server AS 'plüg_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plüg test_plugin_server plüg_dest DROP USER plüg; CREATE USER plüg_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plüg_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 DROP USER plüg_dest; ========== test 1.1.1.2/1.1.2.2============================= @@ -272,12 +306,14 @@ ERROR HY000: Plugin 'hh's_test_plugin_server' is not loaded CREATE USER plug IDENTIFIED WITH 'test_plugin_server' AS 'hh''s_plug_dest'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug test_plugin_server hh's_plug_dest DROP USER plug; CREATE USER 'hh''s_plug_dest' IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string hh's_plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 +mariadb.sys mysql_native_password DROP USER 'hh''s_plug_dest'; ========== test 1.1.1.4 ==================================== CREATE USER plug IDENTIFIED WITH hh''s_test_plugin_server AS 'plug_dest'; @@ -287,12 +323,14 @@ GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string grant_user test_plugin_server plug_dest +mariadb.sys mysql_native_password CREATE USER plug_dest; DROP USER plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string grant_user test_plugin_server plug_dest +mariadb.sys mysql_native_password plug_dest mysql_native_password DROP USER grant_user,plug_dest; set @save_sql_mode= @@sql_mode; @@ -301,6 +339,7 @@ GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string grant_user test_plugin_server plug_dest +mariadb.sys mysql_native_password CREATE USER plug_dest; DROP USER plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest; @@ -310,16 +349,19 @@ GRANT INSERT ON test_user_db.* TO grant_user IDENTIFIED WITH test_plugin_server SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string grant_user test_plugin_server plug_dest +mariadb.sys mysql_native_password CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password grant_user test_plugin_server plug_dest +mariadb.sys mysql_native_password plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 *939AEE68989794C0F408277411C26055CDF41119 DROP USER plug_dest; GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_user_passwd'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password grant_user test_plugin_server plug_dest +mariadb.sys mysql_native_password plug_dest mysql_native_password *560881EB651416CEF77314D07D55EDCD5FC1BD6D *560881EB651416CEF77314D07D55EDCD5FC1BD6D DROP USER grant_user,plug_dest; set @@sql_mode= @save_sql_mode; diff --git a/mysql-test/main/plugin_auth_qa_1.result b/mysql-test/main/plugin_auth_qa_1.result index 261767d4cd2..24c86f1e2a8 100644 --- a/mysql-test/main/plugin_auth_qa_1.result +++ b/mysql-test/main/plugin_auth_qa_1.result @@ -1,6 +1,7 @@ CREATE DATABASE test_user_db; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password ========== test 1.1.3.2 ==================================== CREATE USER plug_user IDENTIFIED WITH test_plugin_server AS 'plug_dest'; CREATE USER plug_dest IDENTIFIED BY 'plug_dest_passwd'; @@ -23,6 +24,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO plug_dest IDENTIFIED BY 'plug_dest_pas GRANT PROXY ON plug_dest TO plug_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest 1) @@ -74,6 +76,7 @@ GRANT PROXY ON new_dest TO plug_user; ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES) SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest DROP USER plug_user,new_dest; @@ -92,6 +95,7 @@ GRANT PROXY ON new_dest TO plug_user; ERROR 1045 (28000): Access denied for user 'plug_user'@'localhost' (using password: YES) SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest DROP USER plug_user,new_dest; @@ -113,6 +117,7 @@ new_user@localhost plug_dest@% connection default; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password new_user test_plugin_server plug_dest plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 disconnect plug_user; @@ -120,6 +125,7 @@ UPDATE mysql.global_priv SET user='plug_user' WHERE user='new_user'; FLUSH PRIVILEGES; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest DROP USER plug_dest,plug_user; @@ -136,24 +142,28 @@ connection default; disconnect plug_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 plug_user test_plugin_server plug_dest UPDATE mysql.global_priv SET user='new_user' WHERE user='plug_user'; FLUSH PRIVILEGES; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password new_user test_plugin_server plug_dest plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.authentication_string', 'new_dest') WHERE user='new_user'; FLUSH PRIVILEGES; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password new_user test_plugin_server new_dest plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 UPDATE mysql.global_priv SET priv=JSON_SET(priv, '$.plugin', 'new_plugin_server') WHERE user='new_user'; FLUSH PRIVILEGES; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password new_user new_plugin_server new_dest plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 ERROR HY000: Plugin 'new_plugin_server' is not loaded @@ -163,6 +173,7 @@ FLUSH PRIVILEGES; GRANT PROXY ON new_dest TO new_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password new_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 new_user test_plugin_server new_dest connect plug_user,localhost,new_user,new_dest; @@ -176,6 +187,7 @@ FLUSH PRIVILEGES; CREATE USER new_dest IDENTIFIED BY 'new_dest_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password new_dest mysql_native_password *01422E86A6FFF84618914AF149F9AEF64B84170A new_user test_plugin_server new_dest plug_dest mysql_native_password *939AEE68989794C0F408277411C26055CDF41119 @@ -193,6 +205,7 @@ CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string test_plugin_server proxied_user +mariadb.sys mysql_native_password proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD connect proxy_con,localhost,proxied_user,proxied_user_passwd; SELECT USER(),CURRENT_USER(); @@ -229,6 +242,7 @@ CREATE USER proxied_user IDENTIFIED BY 'proxied_user_passwd'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string test_plugin_server proxied_user +mariadb.sys mysql_native_password proxied_user mysql_native_password *D7A51428CD38DB3C5293B9321DA1228BFB1611DD connect proxy_con,localhost,proxied_user,proxied_user_passwd; SELECT USER(),CURRENT_USER(); @@ -271,6 +285,7 @@ GRANT PROXY ON proxied_user_5 TO ''@'%%'; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string test_plugin_server proxied_user +mariadb.sys mysql_native_password proxied_user_1 mysql_native_password *551D5A5177FCC3340F7D2FB0F4D8D1EEA7F7EF71 proxied_user_2 mysql_native_password *3D948F77C6A988AFDCA9755AB2A6724362557220 proxied_user_3 mysql_native_password *41A18925D237DEE738C76581153990B037F462E3 diff --git a/mysql-test/main/plugin_auth_qa_2.result b/mysql-test/main/plugin_auth_qa_2.result index e71132e2bc9..ea7227f9faa 100644 --- a/mysql-test/main/plugin_auth_qa_2.result +++ b/mysql-test/main/plugin_auth_qa_2.result @@ -7,6 +7,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_1_dest identified by 'dest_pas GRANT PROXY ON qa_test_1_dest TO qa_test_1_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_1_user qa_auth_interface qa_test_1_dest SELECT @@proxy_user; @@ -20,6 +21,7 @@ current_user() user() @@local.proxy_user @@local.external_user qa_test_1_user@% qa_test_1_user@localhost NULL NULL SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password qa_test_1_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_1_user qa_auth_interface qa_test_1_dest DROP USER qa_test_1_user; @@ -34,6 +36,7 @@ GRANT PROXY ON authenticated_as TO qa_test_2_user; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 +mariadb.sys mysql_native_password qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_2_user qa_auth_interface qa_test_2_dest SELECT @@proxy_user; @@ -48,6 +51,7 @@ authenticated_as@% user_name@localhost 'qa_test_2_user'@'%' externaluser SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string authenticated_as mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 +mariadb.sys mysql_native_password qa_test_2_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_2_user qa_auth_interface qa_test_2_dest DROP USER qa_test_2_user; @@ -84,6 +88,7 @@ GRANT PROXY ON qa_test_5_dest TO ''@'localhost'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22 +mariadb.sys mysql_native_password qa_test_5_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_5_user qa_auth_interface qa_test_5_dest exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_5_user --password=qa_test_5_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 @@ -98,6 +103,7 @@ GRANT ALL PRIVILEGES ON test_user_db.* TO qa_test_6_dest identified by 'dest_pas GRANT PROXY ON qa_test_6_dest TO qa_test_6_user; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password +mariadb.sys mysql_native_password qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_user qa_auth_interface qa_test_6_dest exec MYSQL -h localhost -P MASTER_MYPORT --user=qa_test_6_user --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 @@ -105,6 +111,7 @@ ERROR 1045 (28000): Access denied for user 'qa_test_6_user'@'localhost' (using p GRANT PROXY ON qa_test_6_dest TO root IDENTIFIED WITH qa_auth_interface AS 'qa_test_6_dest'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password +mariadb.sys mysql_native_password qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_user qa_auth_interface qa_test_6_dest exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 @@ -112,6 +119,7 @@ ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: Y REVOKE PROXY ON qa_test_6_dest FROM root; SELECT user,plugin,authentication_string FROM mysql.user WHERE user != 'root'; User plugin authentication_string +mariadb.sys mysql_native_password qa_test_6_dest mysql_native_password *DFCACE76914AD7BD801FC1A1ECF6562272621A22 qa_test_6_user qa_auth_interface qa_test_6_dest exec MYSQL -h localhost -P MASTER_MYPORT --user=root --password=qa_test_6_dest test_user_db -e "SELECT current_user(),user(),@@local.proxy_user,@@local.external_user;" 2>&1 @@ -121,6 +129,7 @@ DROP USER qa_test_6_dest; DELETE FROM mysql.user WHERE user='root' AND plugin='qa_auth_interface'; SELECT user,plugin,authentication_string,password FROM mysql.user WHERE user != 'root'; User plugin authentication_string Password +mariadb.sys mysql_native_password === Test of the --default_auth option for clients ==== CREATE USER qa_test_11_user IDENTIFIED WITH qa_auth_interface AS 'qa_test_11_dest'; CREATE USER qa_test_11_dest IDENTIFIED BY 'dest_passwd'; diff --git a/mysql-test/main/ps_grant.result b/mysql-test/main/ps_grant.result index ab21c198b98..c9ef089b215 100644 --- a/mysql-test/main/ps_grant.result +++ b/mysql-test/main/ps_grant.result @@ -11,8 +11,8 @@ grant select on mysqltest.t9 to second_user@localhost identified by 'looser' ; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' connect con3,localhost,second_user,looser,mysqltest; connection con3; select current_user(); @@ -34,21 +34,21 @@ grant select on mysqltest.t1 to second_user@localhost identified by 'looser' ; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost` +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' drop table mysqltest.t9 ; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost` +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' connection con3; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' -GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` GRANT SELECT ON `mysqltest`.`t1` TO `second_user`@`localhost` +GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' prepare s_t1 from 'select a as my_col from t1' ; execute s_t1 ; my_col @@ -63,13 +63,13 @@ connection default; revoke all privileges on mysqltest.t1 from second_user@localhost; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' connection con3; show grants for second_user@localhost ; Grants for second_user@localhost -GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' GRANT SELECT ON `mysqltest`.`t9` TO `second_user`@`localhost` +GRANT USAGE ON *.* TO `second_user`@`localhost` IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3' execute s_t1 ; ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1' connection default; diff --git a/mysql-test/main/ps_grant.test b/mysql-test/main/ps_grant.test index 3d59cc36de0..80a458bf874 100644 --- a/mysql-test/main/ps_grant.test +++ b/mysql-test/main/ps_grant.test @@ -40,6 +40,7 @@ grant usage on mysqltest.* to second_user@localhost identified by 'looser' ; grant select on mysqltest.t9 to second_user@localhost identified by 'looser' ; +--sorted_result show grants for second_user@localhost ; @@ -64,8 +65,10 @@ select a as my_col from t1; connection default; grant select on mysqltest.t1 to second_user@localhost identified by 'looser' ; +--sorted_result show grants for second_user@localhost ; drop table mysqltest.t9 ; +--sorted_result show grants for second_user@localhost ; @@ -73,6 +76,7 @@ show grants for second_user@localhost ; ## switch to the second session connection con3; ######## Question 1: The table t1 should be now accessible. ######## +--sorted_result show grants for second_user@localhost ; prepare s_t1 from 'select a as my_col from t1' ; execute s_t1 ; @@ -86,11 +90,13 @@ deallocate prepare s_t9; ## switch back to the first session connection default; revoke all privileges on mysqltest.t1 from second_user@localhost; +--sorted_result show grants for second_user@localhost ; #### check the access as new user ## switch to the second session connection con3; +--sorted_result show grants for second_user@localhost ; ######## Question 2: The table t1 should be now not accessible. ######## --error 1142 @@ -103,6 +109,7 @@ connection default; disconnect con3 ; ## remove all rights of second_user@localhost revoke all privileges, grant option from second_user@localhost ; +--sorted_result show grants for second_user@localhost ; drop user second_user@localhost ; commit ; diff --git a/mysql-test/main/set_password.result b/mysql-test/main/set_password.result index 91c8b567ad6..8a8af3b3350 100644 --- a/mysql-test/main/set_password.result +++ b/mysql-test/main/set_password.result @@ -9,6 +9,7 @@ create user oldpassold@localhost identified with 'mysql_old_password'; set password for oldpassold@localhost = '378b243e220ca493'; select user, host, password, plugin, authentication_string from mysql.user where user != 'root'; User Host Password plugin authentication_string +mariadb.sys localhost mysql_native_password natauth localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 newpass localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 newpassnat localhost *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 mysql_native_password *94BDCEBE19083CE2A1F959FD02F964C7AF4CFC29 @@ -86,6 +87,7 @@ set password for oldpass@localhost = PASSWORD('test2'); set password for oldpassold@localhost = PASSWORD('test2'); select user, host, password, plugin, authentication_string from mysql.user where user != 'root'; User Host Password plugin authentication_string +mariadb.sys localhost mysql_native_password natauth localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E newpass localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E newpassnat localhost *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E mysql_native_password *7CEB3FDE5F7A9C4CE5FBE610D7D8EDA62EBE5F4E diff --git a/mysql-test/main/stat_tables.result b/mysql-test/main/stat_tables.result index 3ff10cc2448..55d8bbf51c9 100644 --- a/mysql-test/main/stat_tables.result +++ b/mysql-test/main/stat_tables.result @@ -592,7 +592,7 @@ explain SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL -1 SIMPLE global_priv ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) +1 SIMPLE global_priv ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; # diff --git a/mysql-test/main/stat_tables_innodb.result b/mysql-test/main/stat_tables_innodb.result index d504b531170..45137f29a2d 100644 --- a/mysql-test/main/stat_tables_innodb.result +++ b/mysql-test/main/stat_tables_innodb.result @@ -624,7 +624,7 @@ explain SELECT * FROM INFORMATION_SCHEMA.PROFILING, mysql.user; id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE PROFILING ALL NULL NULL NULL NULL NULL -1 SIMPLE global_priv ALL NULL NULL NULL NULL 4 Using join buffer (flat, BNL join) +1 SIMPLE global_priv ALL NULL NULL NULL NULL 5 Using join buffer (flat, BNL join) set @@optimizer_use_condition_selectivity=@save_optimizer_use_condition_selectivity; set use_stat_tables=@save_use_stat_tables; # diff --git a/mysql-test/main/system_mysql_db.result b/mysql-test/main/system_mysql_db.result index 6a243ca0c43..838591b3b4b 100644 --- a/mysql-test/main/system_mysql_db.result +++ b/mysql-test/main/system_mysql_db.result @@ -62,7 +62,7 @@ db CREATE TABLE `db` ( ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' show create table user; View Create View character_set_client collation_connection -user CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci +user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci show create table func; Table Create Table func CREATE TABLE `func` ( diff --git a/mysql-test/main/system_mysql_db_fix40123.result b/mysql-test/main/system_mysql_db_fix40123.result index bc235227b42..fc9a5763dbd 100644 --- a/mysql-test/main/system_mysql_db_fix40123.result +++ b/mysql-test/main/system_mysql_db_fix40123.result @@ -100,7 +100,7 @@ db CREATE TABLE `db` ( ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' show create table user; View Create View character_set_client collation_connection -user CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci +user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci show create table func; Table Create Table func CREATE TABLE `func` ( diff --git a/mysql-test/main/system_mysql_db_fix50030.result b/mysql-test/main/system_mysql_db_fix50030.result index 842f9aca087..02047dc4a8c 100644 --- a/mysql-test/main/system_mysql_db_fix50030.result +++ b/mysql-test/main/system_mysql_db_fix50030.result @@ -104,7 +104,7 @@ db CREATE TABLE `db` ( ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' show create table user; View Create View character_set_client collation_connection -user CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci +user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci show create table func; Table Create Table func CREATE TABLE `func` ( diff --git a/mysql-test/main/system_mysql_db_fix50117.result b/mysql-test/main/system_mysql_db_fix50117.result index 078cdcbbe03..07119cda6c6 100644 --- a/mysql-test/main/system_mysql_db_fix50117.result +++ b/mysql-test/main/system_mysql_db_fix50117.result @@ -84,7 +84,7 @@ db CREATE TABLE `db` ( ) ENGINE=Aria DEFAULT CHARSET=utf8 COLLATE=utf8_bin PAGE_CHECKSUM=1 TRANSACTIONAL=1 COMMENT='Database privileges' show create table user; View Create View character_set_client collation_connection -user CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci +user CREATE ALGORITHM=UNDEFINED DEFINER=`mariadb.sys`@`localhost` SQL SECURITY DEFINER VIEW `user` AS select `global_priv`.`Host` AS `Host`,`global_priv`.`User` AS `User`,if(json_value(`global_priv`.`Priv`,'$.plugin') in ('mysql_native_password','mysql_old_password'),ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),''),'') AS `Password`,if(json_value(`global_priv`.`Priv`,'$.access') & 1,'Y','N') AS `Select_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2,'Y','N') AS `Insert_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4,'Y','N') AS `Update_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8,'Y','N') AS `Delete_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16,'Y','N') AS `Create_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32,'Y','N') AS `Drop_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 64,'Y','N') AS `Reload_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 128,'Y','N') AS `Shutdown_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 256,'Y','N') AS `Process_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 512,'Y','N') AS `File_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1024,'Y','N') AS `Grant_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2048,'Y','N') AS `References_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4096,'Y','N') AS `Index_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8192,'Y','N') AS `Alter_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16384,'Y','N') AS `Show_db_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 32768,'Y','N') AS `Super_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 65536,'Y','N') AS `Create_tmp_table_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 131072,'Y','N') AS `Lock_tables_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 262144,'Y','N') AS `Execute_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 524288,'Y','N') AS `Repl_slave_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 1048576,'Y','N') AS `Repl_client_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 2097152,'Y','N') AS `Create_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 4194304,'Y','N') AS `Show_view_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 8388608,'Y','N') AS `Create_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 16777216,'Y','N') AS `Alter_routine_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 33554432,'Y','N') AS `Create_user_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 67108864,'Y','N') AS `Event_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 134217728,'Y','N') AS `Trigger_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 268435456,'Y','N') AS `Create_tablespace_priv`,if(json_value(`global_priv`.`Priv`,'$.access') & 536870912,'Y','N') AS `Delete_history_priv`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.ssl_type'),0) + 1,'','ANY','X509','SPECIFIED') AS `ssl_type`,ifnull(json_value(`global_priv`.`Priv`,'$.ssl_cipher'),'') AS `ssl_cipher`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_issuer'),'') AS `x509_issuer`,ifnull(json_value(`global_priv`.`Priv`,'$.x509_subject'),'') AS `x509_subject`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_questions'),0) as unsigned) AS `max_questions`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_updates'),0) as unsigned) AS `max_updates`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_connections'),0) as unsigned) AS `max_connections`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_user_connections'),0) as signed) AS `max_user_connections`,ifnull(json_value(`global_priv`.`Priv`,'$.plugin'),'') AS `plugin`,ifnull(json_value(`global_priv`.`Priv`,'$.authentication_string'),'') AS `authentication_string`,'N' AS `password_expired`,elt(ifnull(json_value(`global_priv`.`Priv`,'$.is_role'),0) + 1,'N','Y') AS `is_role`,ifnull(json_value(`global_priv`.`Priv`,'$.default_role'),'') AS `default_role`,cast(ifnull(json_value(`global_priv`.`Priv`,'$.max_statement_time'),0.0) as decimal(12,6)) AS `max_statement_time` from `global_priv` latin1 latin1_swedish_ci show create table func; Table Create Table func CREATE TABLE `func` ( diff --git a/mysql-test/main/upgrade_MDEV-19650.result b/mysql-test/main/upgrade_MDEV-19650.result new file mode 100644 index 00000000000..386c15ae83e --- /dev/null +++ b/mysql-test/main/upgrade_MDEV-19650.result @@ -0,0 +1,209 @@ +call mtr.add_suppression("Cannot load from mysql.proc. The table is probably corrupted"); +create database mysqltest1; +use mysqltest1; +create table save_global_priv as select * from mysql.global_priv; +create table save_tables_priv as select * from mysql.tables_priv; +create table save_proxies_priv as select * from mysql.proxies_priv; +create table mysql.save_proc like mysql.proc; +insert into mysql.save_proc select * from mysql.proc; +set @save_sql_mode= @@sql_mode; +use mysql; +# make old definition of gis procedures and user view +drop view user; +CREATE DEFINER='root'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT +Host, +User, +IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password, +IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv, +IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv, +IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv, +IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv, +IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv, +IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv, +IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv, +IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv, +IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv, +IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv, +IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv, +IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv, +IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv, +IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv, +IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv, +IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv, +IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv, +IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv, +IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv, +IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv, +IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv, +IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv, +IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv, +IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv, +IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv, +IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv, +IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv, +IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv, +IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv, +IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv, +ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type, +IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher, +IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer, +IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject, +CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions, +CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates, +CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections, +CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections, +IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin, +IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string, +'N' AS password_expired, +ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role, +IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role, +CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time +FROM global_priv; +SET sql_mode=''; +DROP PROCEDURE IF EXISTS mysql.AddGeometryColumn; +DROP PROCEDURE IF EXISTS mysql.DropGeometryColumn; +CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64), +t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER +begin +set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end | +CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64), +t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER +begin +set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end | +set @@sql_mode= @save_sql_mode; +drop user 'mariadb.sys'@'localhost'; +# check old definitions mysql_upgrade +SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost'; +count(*) +1 +SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost'; +count(*) +0 +SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +# Run mysql_upgrade +Phase 1/7: Checking and upgrading mysql database +Processing databases +mysql +mysql.column_stats OK +mysql.columns_priv OK +mysql.db OK +mysql.event OK +mysql.func OK +mysql.global_priv OK +mysql.gtid_slave_pos OK +mysql.help_category OK +mysql.help_keyword OK +mysql.help_relation OK +mysql.help_topic OK +mysql.index_stats OK +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.plugin OK +mysql.proc OK +mysql.procs_priv OK +mysql.proxies_priv OK +mysql.roles_mapping OK +mysql.save_proc OK +mysql.servers OK +mysql.table_stats OK +mysql.tables_priv OK +mysql.time_zone OK +mysql.time_zone_leap_second OK +mysql.time_zone_name OK +mysql.time_zone_transition OK +mysql.time_zone_transition_type OK +mysql.transaction_registry +Error : Unknown storage engine 'InnoDB' +error : Corrupt + +Repairing tables +mysql.innodb_index_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.innodb_table_stats +Error : Unknown storage engine 'InnoDB' +error : Corrupt +mysql.transaction_registry +Error : Unknown storage engine 'InnoDB' +error : Corrupt +Phase 2/7: Installing used storage engines... Skipped +Phase 3/7: Fixing views +mysql.user OK +Phase 4/7: Running 'mysql_fix_privilege_tables' +Phase 5/7: Fixing table and database names +Phase 6/7: Checking and upgrading tables +Processing databases +information_schema +mtr +mtr.global_suppressions OK +mtr.test_suppressions OK +mysqltest1 +mysqltest1.save_global_priv OK +mysqltest1.save_proxies_priv OK +mysqltest1.save_tables_priv OK +performance_schema +test +Phase 7/7: Running 'FLUSH PRIVILEGES' +OK +# check new definitions mysql_upgrade +SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost'; +count(*) +0 +SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost'; +count(*) +1 +SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; +GRANTEE TABLE_CATALOG PRIVILEGE_TYPE IS_GRANTABLE +'mariadb.sys'@'localhost' def USAGE NO +SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; +GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'mariadb.sys'@'localhost' def mysql global_priv SELECT NO +'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO +'mariadb.sys'@'localhost' def mysql global_priv DELETE NO +# check non root +CREATE USER 'not_root'@'localhost'; +GRANT ALL PRIVILEGES ON *.* TO 'not_root'@'localhost'; +GRANT PROXY ON ''@'%' TO 'not_root'@'localhost' WITH GRANT OPTION; +connect con1,localhost,not_root,,; +connection con1; +DROP USER 'root'@'localhost'; +DROP USER 'root'@'127.0.0.1'; +DROP USER 'root'@'::1'; +use mysqltest1; +create table t1 (a int); +call mysql.AddGeometryColumn("def", "mysqltest1", "t1", "g", 101); +show create table t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `a` int(11) DEFAULT NULL, + `g` geometry DEFAULT NULL +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +use mysql; +select count(*) from user; +count(*) +3 +# restore environment +delete from global_priv; +delete from tables_priv; +delete from proxies_priv; +delete from proc; +insert into mysql.global_priv select * from mysqltest1.save_global_priv; +insert into mysql.tables_priv select * from mysqltest1.save_tables_priv; +insert into mysql.proxies_priv select * from mysqltest1.save_proxies_priv; +rename table proc to bad_proc; +rename table save_proc to proc; +drop table bad_proc; +flush privileges; +disconnect default; +connect default,localhost,root,,; +connection default; +disconnect con1; +drop database mysqltest1; +# End of 10.4 tests (but better do not add other tests here) diff --git a/mysql-test/main/upgrade_MDEV-19650.test b/mysql-test/main/upgrade_MDEV-19650.test new file mode 100644 index 00000000000..89cbfc8c7aa --- /dev/null +++ b/mysql-test/main/upgrade_MDEV-19650.test @@ -0,0 +1,159 @@ + +-- source include/mysql_upgrade_preparation.inc + +call mtr.add_suppression("Cannot load from mysql.proc. The table is probably corrupted"); +create database mysqltest1; +use mysqltest1; +create table save_global_priv as select * from mysql.global_priv; +create table save_tables_priv as select * from mysql.tables_priv; +create table save_proxies_priv as select * from mysql.proxies_priv; +create table mysql.save_proc like mysql.proc; +insert into mysql.save_proc select * from mysql.proc; +set @save_sql_mode= @@sql_mode; + +use mysql; + +--echo # make old definition of gis procedures and user view + +drop view user; + +CREATE DEFINER='root'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT + Host, + User, + IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password, + IF(JSON_VALUE(Priv, '$.access') & 1, 'Y', 'N') AS Select_priv, + IF(JSON_VALUE(Priv, '$.access') & 2, 'Y', 'N') AS Insert_priv, + IF(JSON_VALUE(Priv, '$.access') & 4, 'Y', 'N') AS Update_priv, + IF(JSON_VALUE(Priv, '$.access') & 8, 'Y', 'N') AS Delete_priv, + IF(JSON_VALUE(Priv, '$.access') & 16, 'Y', 'N') AS Create_priv, + IF(JSON_VALUE(Priv, '$.access') & 32, 'Y', 'N') AS Drop_priv, + IF(JSON_VALUE(Priv, '$.access') & 64, 'Y', 'N') AS Reload_priv, + IF(JSON_VALUE(Priv, '$.access') & 128, 'Y', 'N') AS Shutdown_priv, + IF(JSON_VALUE(Priv, '$.access') & 256, 'Y', 'N') AS Process_priv, + IF(JSON_VALUE(Priv, '$.access') & 512, 'Y', 'N') AS File_priv, + IF(JSON_VALUE(Priv, '$.access') & 1024, 'Y', 'N') AS Grant_priv, + IF(JSON_VALUE(Priv, '$.access') & 2048, 'Y', 'N') AS References_priv, + IF(JSON_VALUE(Priv, '$.access') & 4096, 'Y', 'N') AS Index_priv, + IF(JSON_VALUE(Priv, '$.access') & 8192, 'Y', 'N') AS Alter_priv, + IF(JSON_VALUE(Priv, '$.access') & 16384, 'Y', 'N') AS Show_db_priv, + IF(JSON_VALUE(Priv, '$.access') & 32768, 'Y', 'N') AS Super_priv, + IF(JSON_VALUE(Priv, '$.access') & 65536, 'Y', 'N') AS Create_tmp_table_priv, + IF(JSON_VALUE(Priv, '$.access') & 131072, 'Y', 'N') AS Lock_tables_priv, + IF(JSON_VALUE(Priv, '$.access') & 262144, 'Y', 'N') AS Execute_priv, + IF(JSON_VALUE(Priv, '$.access') & 524288, 'Y', 'N') AS Repl_slave_priv, + IF(JSON_VALUE(Priv, '$.access') & 1048576, 'Y', 'N') AS Repl_client_priv, + IF(JSON_VALUE(Priv, '$.access') & 2097152, 'Y', 'N') AS Create_view_priv, + IF(JSON_VALUE(Priv, '$.access') & 4194304, 'Y', 'N') AS Show_view_priv, + IF(JSON_VALUE(Priv, '$.access') & 8388608, 'Y', 'N') AS Create_routine_priv, + IF(JSON_VALUE(Priv, '$.access') & 16777216, 'Y', 'N') AS Alter_routine_priv, + IF(JSON_VALUE(Priv, '$.access') & 33554432, 'Y', 'N') AS Create_user_priv, + IF(JSON_VALUE(Priv, '$.access') & 67108864, 'Y', 'N') AS Event_priv, + IF(JSON_VALUE(Priv, '$.access') & 134217728, 'Y', 'N') AS Trigger_priv, + IF(JSON_VALUE(Priv, '$.access') & 268435456, 'Y', 'N') AS Create_tablespace_priv, + IF(JSON_VALUE(Priv, '$.access') & 536870912, 'Y', 'N') AS Delete_history_priv, + ELT(IFNULL(JSON_VALUE(Priv, '$.ssl_type'), 0) + 1, '', 'ANY','X509', 'SPECIFIED') AS ssl_type, + IFNULL(JSON_VALUE(Priv, '$.ssl_cipher'), '') AS ssl_cipher, + IFNULL(JSON_VALUE(Priv, '$.x509_issuer'), '') AS x509_issuer, + IFNULL(JSON_VALUE(Priv, '$.x509_subject'), '') AS x509_subject, + CAST(IFNULL(JSON_VALUE(Priv, '$.max_questions'), 0) AS UNSIGNED) AS max_questions, + CAST(IFNULL(JSON_VALUE(Priv, '$.max_updates'), 0) AS UNSIGNED) AS max_updates, + CAST(IFNULL(JSON_VALUE(Priv, '$.max_connections'), 0) AS UNSIGNED) AS max_connections, + CAST(IFNULL(JSON_VALUE(Priv, '$.max_user_connections'), 0) AS SIGNED) AS max_user_connections, + IFNULL(JSON_VALUE(Priv, '$.plugin'), '') AS plugin, + IFNULL(JSON_VALUE(Priv, '$.authentication_string'), '') AS authentication_string, + 'N' AS password_expired, + ELT(IFNULL(JSON_VALUE(Priv, '$.is_role'), 0) + 1, 'N', 'Y') AS is_role, + IFNULL(JSON_VALUE(Priv, '$.default_role'), '') AS default_role, + CAST(IFNULL(JSON_VALUE(Priv, '$.max_statement_time'), 0.0) AS DECIMAL(12,6)) AS max_statement_time + FROM global_priv; + + +SET sql_mode=''; + +delimiter |; + +DROP PROCEDURE IF EXISTS mysql.AddGeometryColumn; +DROP PROCEDURE IF EXISTS mysql.DropGeometryColumn; + +CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64), + t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER +begin + set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end | + +CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64), + t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER +begin + set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end | + +delimiter ;| +set @@sql_mode= @save_sql_mode; + +drop user 'mariadb.sys'@'localhost'; + +--echo # check old definitions mysql_upgrade + +SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost'; +SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost'; +SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; +SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; + +let $MYSQLD_DATADIR= `select @@datadir`; + +--echo # Run mysql_upgrade +--exec $MYSQL_UPGRADE 2>&1 +--file_exists $MYSQLD_DATADIR/mysql_upgrade_info +--remove_file $MYSQLD_DATADIR/mysql_upgrade_info + +--echo # check new definitions mysql_upgrade + +SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost'; +SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'mariadb.sys@localhost'; +SELECT * FROM information_schema.USER_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; +SELECT * FROM information_schema.TABLE_PRIVILEGES WHERE GRANTEE="'mariadb.sys'@'localhost'"; + +--echo # check non root + +CREATE USER 'not_root'@'localhost'; +GRANT ALL PRIVILEGES ON *.* TO 'not_root'@'localhost'; +GRANT PROXY ON ''@'%' TO 'not_root'@'localhost' WITH GRANT OPTION; + +connect con1,localhost,not_root,,; + +connection con1; + +DROP USER 'root'@'localhost'; +DROP USER 'root'@'127.0.0.1'; +DROP USER 'root'@'::1'; + +use mysqltest1; + +create table t1 (a int); +call mysql.AddGeometryColumn("def", "mysqltest1", "t1", "g", 101); + +show create table t1; +use mysql; + +select count(*) from user; + +--echo # restore environment + +delete from global_priv; +delete from tables_priv; +delete from proxies_priv; +delete from proc; +insert into mysql.global_priv select * from mysqltest1.save_global_priv; +insert into mysql.tables_priv select * from mysqltest1.save_tables_priv; +insert into mysql.proxies_priv select * from mysqltest1.save_proxies_priv; +rename table proc to bad_proc; +rename table save_proc to proc; +drop table bad_proc; +flush privileges; + +disconnect default; +connect default,localhost,root,,; +connection default; +disconnect con1; + +drop database mysqltest1; + +--echo # End of 10.4 tests (but better do not add other tests here) diff --git a/mysql-test/main/view_grant.result b/mysql-test/main/view_grant.result index 8af27de141f..263c932097d 100644 --- a/mysql-test/main/view_grant.result +++ b/mysql-test/main/view_grant.result @@ -1343,6 +1343,9 @@ disconnect root; connection default; select * from information_schema.table_privileges; GRANTEE TABLE_CATALOG TABLE_SCHEMA TABLE_NAME PRIVILEGE_TYPE IS_GRANTABLE +'mariadb.sys'@'localhost' def mysql global_priv SELECT NO +'mariadb.sys'@'localhost' def mysql global_priv UPDATE NO +'mariadb.sys'@'localhost' def mysql global_priv DELETE NO End of 5.0 tests. connection default; DROP VIEW IF EXISTS v1; diff --git a/mysql-test/suite/funcs_1/r/is_routines_embedded.result b/mysql-test/suite/funcs_1/r/is_routines_embedded.result index 1ac3651f254..992a5884d02 100644 --- a/mysql-test/suite/funcs_1/r/is_routines_embedded.result +++ b/mysql-test/suite/funcs_1/r/is_routines_embedded.result @@ -200,9 +200,9 @@ add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin - set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci + set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin - set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci + set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci connect testuser2, localhost, testuser2, , db_datadict; SELECT * FROM information_schema.routines; SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION @@ -216,9 +216,9 @@ add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin - set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci + set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin - set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci + set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci connect testuser3, localhost, testuser3, , test; SELECT * FROM information_schema.routines; SPECIFIC_NAME ROUTINE_CATALOG ROUTINE_SCHEMA ROUTINE_NAME ROUTINE_TYPE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE DATETIME_PRECISION CHARACTER_SET_NAME COLLATION_NAME DTD_IDENTIFIER ROUTINE_BODY ROUTINE_DEFINITION EXTERNAL_NAME EXTERNAL_LANGUAGE PARAMETER_STYLE IS_DETERMINISTIC SQL_DATA_ACCESS SQL_PATH SECURITY_TYPE CREATED LAST_ALTERED SQL_MODE ROUTINE_COMMENT DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION @@ -232,9 +232,9 @@ add_suppression def mtr add_suppression PROCEDURE NULL NULL NULL NULL NULL NULL check_testcase def mtr check_testcase PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN SELECT * FROM INFORMATION_SCHEMA.GLOBAL_VARIABLES WHERE variable_name NOT IN ('timestamp') AND variable_name not like "Last_IO_Err*" AND variable_name != 'INNODB_IBUF_MAX_SIZE' AND variable_name != 'INNODB_USE_NATIVE_AIO' AND variable_name != 'INNODB_BUFFER_POOL_LOAD_AT_STARTUP' AND variable_name not like 'GTID%POS' AND variable_name != 'GTID_BINLOG_STATE' ORDER BY variable_name; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA ORDER BY BINARY SCHEMA_NAME; SELECT * FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME NOT IN ('mtr_wsrep_notify', 'wsrep_schema') ORDER BY BINARY SCHEMA_NAME; SELECT table_name AS tables_in_test FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='test'; SELECT CONCAT(table_schema, '.', table_name) AS tables_in_mysql FROM INFORMATION_SCHEMA.TABLES WHERE table_schema='mysql' ORDER BY tables_in_mysql; SELECT CONCAT(table_schema, '.', table_name) AS columns_in_mysql, column_name, ordinal_position, column_default, is_nullable, data_type, character_maximum_length, character_octet_length, numeric_precision, numeric_scale, character_set_name, collation_name, column_type, column_key, extra, column_comment FROM INFORMATION_SCHEMA.COLUMNS WHERE table_schema='mysql' ORDER BY columns_in_mysql; SELECT * FROM INFORMATION_SCHEMA.EVENTS; SELECT * FROM INFORMATION_SCHEMA.TRIGGERS WHERE TRIGGER_NAME NOT IN ('gs_insert', 'ts_insert'); SELECT * FROM INFORMATION_SCHEMA.ROUTINES; SHOW STATUS LIKE 'slave_open_temp_tables'; checksum table mysql.columns_priv, mysql.db, mysql.func, mysql.help_category, mysql.help_keyword, mysql.help_relation, mysql.plugin, mysql.proc, mysql.procs_priv, mysql.roles_mapping, mysql.tables_priv, mysql.time_zone, mysql.time_zone_leap_second, mysql.time_zone_name, mysql.time_zone_transition, mysql.time_zone_transition_type, mysql.global_priv; SELECT * FROM INFORMATION_SCHEMA.PLUGINS; select * from information_schema.session_variables where variable_name = 'debug_sync'; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci check_warnings def mtr check_warnings PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL BEGIN DECLARE `pos` bigint unsigned; SET SQL_LOG_BIN=0, SQL_SAFE_UPDATES=0; UPDATE error_log el, global_suppressions gs SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP gs.pattern; UPDATE error_log el, test_suppressions ts SET suspicious=0 WHERE el.suspicious=1 AND el.line REGEXP ts.pattern; SELECT COUNT(*) INTO @num_warnings FROM error_log WHERE suspicious=1; IF @num_warnings > 0 THEN SELECT line FROM error_log WHERE suspicious=1; SELECT 2 INTO result; ELSE SELECT 0 INTO RESULT; END IF; TRUNCATE test_suppressions; DROP TABLE error_log; END NULL NULL SQL NO CONTAINS SQL NULL DEFINER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost utf8 utf8_general_ci latin1_swedish_ci AddGeometryColumn def mysql AddGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin - set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci + set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci DropGeometryColumn def mysql DropGeometryColumn PROCEDURE NULL NULL NULL NULL NULL NULL NULL NULL SQL begin - set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss root@localhost latin1 latin1_swedish_ci latin1_swedish_ci + set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end NULL NULL SQL NO CONTAINS SQL NULL INVOKER YYYY-MM-DD hh:mm:ss YYYY-MM-DD hh:mm:ss mariadb.sys@localhost latin1 latin1_swedish_ci latin1_swedish_ci connection default; disconnect testuser1; disconnect testuser2; diff --git a/mysql-test/suite/funcs_1/r/is_statistics.result b/mysql-test/suite/funcs_1/r/is_statistics.result index f2fd28b2a77..ad9af516fde 100644 --- a/mysql-test/suite/funcs_1/r/is_statistics.result +++ b/mysql-test/suite/funcs_1/r/is_statistics.result @@ -238,8 +238,8 @@ def db_datadict_2 t4 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` -GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` +GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION SHOW GRANTS FOR 'testuser2'@'localhost'; Grants for testuser2@localhost GRANT USAGE ON *.* TO `testuser2`@`localhost` @@ -257,8 +257,8 @@ def db_datadict_2 t3 0 db_datadict_2 PRIMARY 1 f1 NULL 0 NULL NULL HASH SHOW GRANTS FOR 'testuser1'@'localhost'; Grants for testuser1@localhost GRANT USAGE ON *.* TO `testuser1`@`localhost` -GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION GRANT SELECT (f5, f1) ON `db_datadict_2`.`t3` TO `testuser1`@`localhost` +GRANT SELECT ON `db_datadict`.`t1` TO `testuser1`@`localhost` WITH GRANT OPTION SHOW GRANTS FOR 'testuser2'@'localhost'; ERROR 42000: Access denied for user 'testuser1'@'localhost' to database 'mysql' connection testuser2; diff --git a/mysql-test/suite/funcs_1/r/is_table_privileges.result b/mysql-test/suite/funcs_1/r/is_table_privileges.result index 2c0942f44f1..d4f0de131d1 100644 --- a/mysql-test/suite/funcs_1/r/is_table_privileges.result +++ b/mysql-test/suite/funcs_1/r/is_table_privileges.result @@ -55,6 +55,9 @@ IS_GRANTABLE varchar(3) NO SELECT table_catalog, table_schema, table_name, privilege_type FROM information_schema.table_privileges WHERE table_catalog IS NOT NULL; table_catalog table_schema table_name privilege_type +def mysql global_priv SELECT +def mysql global_priv UPDATE +def mysql global_priv DELETE ###################################################################### # Testcase 3.2.11.2+3.2.11.3+3.2.11.4: # INFORMATION_SCHEMA.TABLE_PRIVILEGES accessible information @@ -227,8 +230,8 @@ ERROR 42000: There is no such grant defined for user 'testuser1' on host 'localh SHOW GRANTS FOR 'the_user'@'localhost'; Grants for the_user@localhost GRANT USAGE ON *.* TO `the_user`@`localhost` -GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost` GRANT ALL PRIVILEGES ON `test`.`t1_table` TO `the_user`@`localhost` +GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost` SELECT DISTINCT table_schema,table_name FROM information_schema.table_privileges WHERE table_name LIKE 't1_%' ORDER BY table_schema,table_name; @@ -247,8 +250,8 @@ test t1_view SHOW GRANTS FOR 'the_user'@'localhost'; Grants for the_user@localhost GRANT USAGE ON *.* TO `the_user`@`localhost` -GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost` GRANT ALL PRIVILEGES ON `test`.`t1_table` TO `the_user`@`localhost` +GRANT ALL PRIVILEGES ON `test`.`t1_view` TO `the_user`@`localhost` REVOKE ALL PRIVILEGES ON test.t1_table FROM 'the_user'@'localhost'; REVOKE ALL PRIVILEGES ON test.t1_view FROM 'the_user'@'localhost'; DROP VIEW test.t1_view; diff --git a/mysql-test/suite/perfschema/r/privilege_table_io.result b/mysql-test/suite/perfschema/r/privilege_table_io.result index 00f382de966..fd56d3e1776 100644 --- a/mysql-test/suite/perfschema/r/privilege_table_io.result +++ b/mysql-test/suite/perfschema/r/privilege_table_io.result @@ -101,6 +101,7 @@ wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL +wait/io/table/sql/handler handler.cc: TABLE mysql global_priv fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql db fetch NULL @@ -109,6 +110,7 @@ wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql proxies_priv fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql roles_mapping fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch NULL +wait/io/table/sql/handler handler.cc: TABLE mysql tables_priv fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql procs_priv fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql servers fetch NULL wait/io/table/sql/handler handler.cc: TABLE mysql table_stats fetch NULL diff --git a/mysql-test/suite/roles/acl_statistics.result b/mysql-test/suite/roles/acl_statistics.result index 46e48b86936..f43f692cc48 100644 --- a/mysql-test/suite/roles/acl_statistics.result +++ b/mysql-test/suite/roles/acl_statistics.result @@ -9,8 +9,8 @@ Acl_package_body_grants 0 Acl_proxy_users 2 Acl_role_grants 0 Acl_roles 0 -Acl_table_grants 0 -Acl_users 4 +Acl_table_grants 1 +Acl_users 5 SELECT count(*) COLUMN_GRANTS from mysql.columns_priv; COLUMN_GRANTS 0 @@ -34,10 +34,10 @@ ROLES 0 SELECT count(*) TABLE_GRANTS from mysql.tables_priv; TABLE_GRANTS -0 +1 SELECT count(*) USERS from mysql.user where is_role='N'; USERS -4 +5 CREATE USER u1; CREATE ROLE r1; CREATE ROLE r2; @@ -74,8 +74,8 @@ Acl_package_body_grants 0 Acl_proxy_users 3 Acl_role_grants 4 Acl_roles 2 -Acl_table_grants 2 -Acl_users 5 +Acl_table_grants 3 +Acl_users 6 SELECT count(*) COLUMN_GRANTS from mysql.columns_priv; COLUMN_GRANTS 2 @@ -99,10 +99,10 @@ ROLES 2 SELECT count(*) TABLE_GRANTS from mysql.tables_priv; TABLE_GRANTS -2 +3 SELECT count(*) USERS from mysql.user where is_role='N'; USERS -5 +6 DROP PROCEDURE mysql.test_proc; DROP FUNCTION mysql.test_func; DROP ROLE r2; diff --git a/mysql-test/suite/roles/grant_revoke_current.result b/mysql-test/suite/roles/grant_revoke_current.result index 80de2d3414e..329cab6474b 100644 --- a/mysql-test/suite/roles/grant_revoke_current.result +++ b/mysql-test/suite/roles/grant_revoke_current.result @@ -41,4 +41,4 @@ GRANT PROXY ON ''@'%' TO 'root'@'localhost' WITH GRANT OPTION GRANT USAGE ON *.* TO `r1` set password=''; drop role r1; -update mysql.global_priv set priv=@root_priv; +update mysql.global_priv set priv=@root_priv where user='root' and host='localhost'; diff --git a/mysql-test/suite/roles/grant_revoke_current.test b/mysql-test/suite/roles/grant_revoke_current.test index 65a0809ac9c..fda55358b20 100644 --- a/mysql-test/suite/roles/grant_revoke_current.test +++ b/mysql-test/suite/roles/grant_revoke_current.test @@ -29,4 +29,4 @@ set password=''; #cleanup drop role r1; -update mysql.global_priv set priv=@root_priv; +update mysql.global_priv set priv=@root_priv where user='root' and host='localhost'; diff --git a/mysql-test/suite/roles/set_role-database-recursive.result b/mysql-test/suite/roles/set_role-database-recursive.result index 80c5d9a8e39..bc3914413a3 100644 --- a/mysql-test/suite/roles/set_role-database-recursive.result +++ b/mysql-test/suite/roles/set_role-database-recursive.result @@ -6,6 +6,7 @@ grant test_role2 to test_user@localhost; grant test_role2 to test_role1; select user, host from mysql.user where user not like 'root'; User Host +mariadb.sys localhost test_role1 test_role2 test_user localhost diff --git a/mysql-test/suite/roles/set_role-database-simple.result b/mysql-test/suite/roles/set_role-database-simple.result index 156a4453b69..a48f04985bb 100644 --- a/mysql-test/suite/roles/set_role-database-simple.result +++ b/mysql-test/suite/roles/set_role-database-simple.result @@ -3,6 +3,7 @@ create role test_role1; grant test_role1 to test_user@localhost; select user, host from mysql.user where user not like 'root'; User Host +mariadb.sys localhost test_role1 test_user localhost select * from mysql.roles_mapping; diff --git a/mysql-test/suite/roles/set_role-recursive.result b/mysql-test/suite/roles/set_role-recursive.result index 207e9a71bd9..0413a9c4e04 100644 --- a/mysql-test/suite/roles/set_role-recursive.result +++ b/mysql-test/suite/roles/set_role-recursive.result @@ -5,6 +5,7 @@ create role test_role2; grant test_role2 to test_role1; select user, host from mysql.user where user not like 'root'; User Host +mariadb.sys localhost test_role1 test_role2 test_user localhost diff --git a/mysql-test/suite/roles/set_role-routine-simple.result b/mysql-test/suite/roles/set_role-routine-simple.result index 74771991b0d..eaa630f4b6a 100644 --- a/mysql-test/suite/roles/set_role-routine-simple.result +++ b/mysql-test/suite/roles/set_role-routine-simple.result @@ -7,6 +7,7 @@ grant test_role3 to test_user@localhost; grant test_role2 to test_role1; select user, host from mysql.user where user not like 'root'; User Host +mariadb.sys localhost test_role1 test_role2 test_role3 diff --git a/mysql-test/suite/roles/set_role-simple.result b/mysql-test/suite/roles/set_role-simple.result index d54528f23d7..59e61d4836a 100644 --- a/mysql-test/suite/roles/set_role-simple.result +++ b/mysql-test/suite/roles/set_role-simple.result @@ -3,6 +3,7 @@ create role test_role1; grant test_role1 to test_user@localhost; select user, host from mysql.user where user not like 'root'; User Host +mariadb.sys localhost test_role1 test_user localhost select * from mysql.roles_mapping; diff --git a/mysql-test/suite/roles/set_role-table-column-priv.result b/mysql-test/suite/roles/set_role-table-column-priv.result index 92fc53a15cc..9e1d21bab5e 100644 --- a/mysql-test/suite/roles/set_role-table-column-priv.result +++ b/mysql-test/suite/roles/set_role-table-column-priv.result @@ -5,6 +5,7 @@ grant test_role1 to test_user@localhost; grant test_role2 to test_role1; select user, host from mysql.user where user not like 'root'; User Host +mariadb.sys localhost test_role1 test_role2 test_user localhost @@ -62,6 +63,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'ro drop user 'test_user'@'localhost'; select * from mysql.tables_priv; Host Db User Table_name Grantor Timestamp Table_priv Column_priv +localhost mysql mariadb.sys global_priv root@localhost 0000-00-00 00:00:00 Select,Update,Delete mysql test_role2 roles_mapping root@localhost 0000-00-00 00:00:00 Select revoke select on mysql.roles_mapping from test_role2; delete from mysql.user where user like'test_%'; diff --git a/mysql-test/suite/roles/set_role-table-simple.result b/mysql-test/suite/roles/set_role-table-simple.result index 1fca819b2d5..107ca726e22 100644 --- a/mysql-test/suite/roles/set_role-table-simple.result +++ b/mysql-test/suite/roles/set_role-table-simple.result @@ -5,6 +5,7 @@ grant test_role1 to test_user@localhost; grant test_role2 to test_role1; select user, host from mysql.user where user not like 'root'; User Host +mariadb.sys localhost test_role1 test_role2 test_user localhost @@ -60,6 +61,7 @@ ERROR 42000: SELECT command denied to user 'test_user'@'localhost' for table 'ro drop user 'test_user'@'localhost'; select * from mysql.tables_priv; Host Db User Table_name Grantor Timestamp Table_priv Column_priv +localhost mysql mariadb.sys global_priv root@localhost 0000-00-00 00:00:00 Select,Update,Delete mysql test_role2 roles_mapping root@localhost 0000-00-00 00:00:00 Select revoke select on mysql.roles_mapping from test_role2; delete from mysql.user where user like'test_%'; diff --git a/mysql-test/suite/roles/show_grants.result b/mysql-test/suite/roles/show_grants.result index 57149e401ce..1867133525d 100644 --- a/mysql-test/suite/roles/show_grants.result +++ b/mysql-test/suite/roles/show_grants.result @@ -6,6 +6,7 @@ grant test_role2 to test_user@localhost; grant test_role2 to test_role1; select user, host from mysql.user where user not like 'root'; User Host +mariadb.sys localhost test_role1 test_role2 test_user localhost diff --git a/mysql-test/suite/rpl/disabled.def b/mysql-test/suite/rpl/disabled.def index ef1630f87eb..67e710f2637 100644 --- a/mysql-test/suite/rpl/disabled.def +++ b/mysql-test/suite/rpl/disabled.def @@ -19,3 +19,4 @@ rpl_parallel2 : fails after MDEV-16172 rpl_semi_sync_after_sync : fails after MDEV-16172 rpl_slave_grp_exec: MDEV-10514 rpl_auto_increment_update_failure : disabled for now +rpl_current_user : waits for MDEV-22374 fix diff --git a/mysql-test/suite/rpl/r/rpl_ignore_table.result b/mysql-test/suite/rpl/r/rpl_ignore_table.result index e4113b74e55..3e6cdac820e 100644 --- a/mysql-test/suite/rpl/r/rpl_ignore_table.result +++ b/mysql-test/suite/rpl/r/rpl_ignore_table.result @@ -39,27 +39,27 @@ GRANT INSERT ON test.* TO mysqltest6@localhost; GRANT INSERT ON test.t1 TO mysqltest6@localhost; show grants for mysqltest1@localhost; Grants for mysqltest1@localhost -GRANT USAGE ON *.* TO `mysqltest1`@`localhost` GRANT SELECT ON `test`.`t1` TO `mysqltest1`@`localhost` +GRANT USAGE ON *.* TO `mysqltest1`@`localhost` show grants for mysqltest2@localhost; Grants for mysqltest2@localhost -GRANT USAGE ON *.* TO `mysqltest2`@`localhost` -GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO `mysqltest2`@`localhost` GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost` +GRANT SELECT, INSERT, UPDATE, REFERENCES ON `test`.`t1` TO `mysqltest2`@`localhost` +GRANT USAGE ON *.* TO `mysqltest2`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO `mysqltest3`@`localhost` -GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' GRANT SELECT ON `mysqltest2`.`t2` TO `mysqltest4`@`localhost` +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' show grants for mysqltest6@localhost; Grants for mysqltest6@localhost -GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost` GRANT INSERT ON `test`.* TO `mysqltest6`@`localhost` GRANT INSERT ON `test`.`t1` TO `mysqltest6`@`localhost` +GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost` flush privileges; show grants for mysqltest5@somehost; Grants for mysqltest5@somehost @@ -69,24 +69,24 @@ connection slave; **** Checking grants on slave **** show grants for mysqltest2@localhost; Grants for mysqltest2@localhost -GRANT USAGE ON *.* TO `mysqltest2`@`localhost` GRANT INSERT ON `test`.`t4` TO `mysqltest2`@`localhost` +GRANT USAGE ON *.* TO `mysqltest2`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO `mysqltest3`@`localhost` -GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` GRANT SELECT (a), INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost -GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' GRANT SELECT ON `mysqltest2`.`t2` TO `mysqltest4`@`localhost` +GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' show grants for mysqltest5@somehost; Grants for mysqltest5@somehost GRANT USAGE ON *.* TO `mysqltest5`@`somehost` show grants for mysqltest6@localhost; Grants for mysqltest6@localhost -GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost` GRANT INSERT ON `test`.* TO `mysqltest6`@`localhost` +GRANT SELECT, INSERT ON *.* TO `mysqltest6`@`localhost` show grants for mysqltest1@localhost; ERROR 42000: There is no such grant defined for user 'mysqltest1' on host 'localhost' **** Revoking grants on master **** @@ -100,9 +100,9 @@ Grants for mysqltest1@localhost GRANT USAGE ON *.* TO `mysqltest1`@`localhost` show grants for mysqltest3@localhost; Grants for mysqltest3@localhost -GRANT USAGE ON *.* TO `mysqltest3`@`localhost` -GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` GRANT INSERT, INSERT (a), UPDATE (a), REFERENCES (a) ON `test`.`t4` TO `mysqltest3`@`localhost` +GRANT SELECT ON `test`.* TO `mysqltest3`@`localhost` +GRANT USAGE ON *.* TO `mysqltest3`@`localhost` show grants for mysqltest4@localhost; Grants for mysqltest4@localhost GRANT USAGE ON *.* TO `mysqltest4`@`localhost` IDENTIFIED BY PASSWORD '*196BDEDE2AE4F84CA44C47D54D78478C7E2BD7B7' diff --git a/mysql-test/suite/rpl/t/rpl_ignore_table.test b/mysql-test/suite/rpl/t/rpl_ignore_table.test index a3fcfc95901..19797b89013 100644 --- a/mysql-test/suite/rpl/t/rpl_ignore_table.test +++ b/mysql-test/suite/rpl/t/rpl_ignore_table.test @@ -77,10 +77,15 @@ GRANT INSERT ON *.* TO mysqltest6@localhost; GRANT INSERT ON test.* TO mysqltest6@localhost; GRANT INSERT ON test.t1 TO mysqltest6@localhost; +--sorted_result show grants for mysqltest1@localhost; +--sorted_result show grants for mysqltest2@localhost; +--sorted_result show grants for mysqltest3@localhost; +--sorted_result show grants for mysqltest4@localhost; +--sorted_result show grants for mysqltest6@localhost; flush privileges; @@ -92,10 +97,15 @@ sync_slave_with_master; --echo **** Checking grants on slave **** # Check that grants are replicated to slave +--sorted_result show grants for mysqltest2@localhost; +--sorted_result show grants for mysqltest3@localhost; +--sorted_result show grants for mysqltest4@localhost; +--sorted_result show grants for mysqltest5@somehost; +--sorted_result show grants for mysqltest6@localhost; # mysqltest1 should not be on slave @@ -109,8 +119,11 @@ REVOKE SELECT ON mysqltest2.t2 FROM mysqltest4@localhost; REVOKE select(a) on t4 from mysqltest3@localhost; +--sorted_result show grants for mysqltest1@localhost; +--sorted_result show grants for mysqltest3@localhost; +--sorted_result show grants for mysqltest4@localhost; sync_slave_with_master; diff --git a/scripts/maria_add_gis_sp.sql.in b/scripts/maria_add_gis_sp.sql.in index 412b83e3d78..682cf52de22 100644 --- a/scripts/maria_add_gis_sp.sql.in +++ b/scripts/maria_add_gis_sp.sql.in @@ -23,12 +23,12 @@ SET sql_mode=''; DROP PROCEDURE IF EXISTS AddGeometryColumn; DROP PROCEDURE IF EXISTS DropGeometryColumn; -CREATE DEFINER=`root`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64), +CREATE DEFINER=`mariadb.sys`@`localhost` PROCEDURE AddGeometryColumn(catalog varchar(64), t_schema varchar(64), t_name varchar(64), geometry_column varchar(64), t_srid int) SQL SECURITY INVOKER begin set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' ADD ', geometry_column,' GEOMETRY REF_SYSTEM_ID=', t_srid); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end @ADD_GIS_SP_EOL@ -CREATE DEFINER=`root`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64), +CREATE DEFINER=`mariadb.sys`@`localhost` PROCEDURE DropGeometryColumn(catalog varchar(64), t_schema varchar(64), t_name varchar(64), geometry_column varchar(64)) SQL SECURITY INVOKER begin set @qwe= concat('ALTER TABLE ', t_schema, '.', t_name, ' DROP ', geometry_column); PREPARE ls from @qwe; execute ls; deallocate prepare ls; end @ADD_GIS_SP_EOL@ diff --git a/scripts/mysql_system_tables.sql b/scripts/mysql_system_tables.sql index 29f2a4c1ef6..6e1377660e9 100644 --- a/scripts/mysql_system_tables.sql +++ b/scripts/mysql_system_tables.sql @@ -33,9 +33,17 @@ CREATE TABLE IF NOT EXISTS db ( Host char(60) binary DEFAULT '' NOT NULL, Db c -- Remember for later if db table already existed set @had_db_table= @@warning_count != 0; -CREATE TABLE IF NOT EXISTS global_priv (Host char(60) binary DEFAULT '', User char(80) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY Host (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'; +CREATE TABLE IF NOT EXISTS global_priv (Host char(60) binary DEFAULT '', User char(80) binary DEFAULT '', Priv JSON NOT NULL DEFAULT '{}' CHECK(JSON_VALID(Priv)), PRIMARY KEY (Host,User)) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Users and global privileges'; -CREATE DEFINER=root@localhost SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT +set @had_sys_user= 0 <> (select count(*) from mysql.global_priv where Host="localhost" and User="mariadb.sys"); + +CREATE TEMPORARY TABLE tmp_user_sys LIKE global_priv; +INSERT INTO tmp_user_sys (Host,User,Priv) VALUES ('localhost','mariadb.sys','{"access":0,"plugin":"mysql_native_password","authentication_string":"","account_locked":true,"password_last_changed":0}'); +INSERT INTO global_priv SELECT * FROM tmp_user_sys WHERE NOT @had_sys_user; +DROP TABLE tmp_user_sys; + + +CREATE DEFINER='mariadb.sys'@'localhost' SQL SECURITY DEFINER VIEW IF NOT EXISTS user AS SELECT Host, User, IF(JSON_VALUE(Priv, '$.plugin') IN ('mysql_native_password', 'mysql_old_password'), IFNULL(JSON_VALUE(Priv, '$.authentication_string'), ''), '') AS Password, @@ -101,6 +109,11 @@ CREATE TABLE IF NOT EXISTS servers ( Server_name char(64) NOT NULL DEFAULT '', H CREATE TABLE IF NOT EXISTS tables_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Grantor char(141) DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Table_priv set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger','Delete versioning rows') COLLATE utf8_general_ci DEFAULT '' NOT NULL, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name), KEY Grantor (Grantor) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Table privileges'; +CREATE TEMPORARY TABLE tmp_user_sys LIKE tables_priv; +INSERT INTO tmp_user_sys (Host,Db,User,Table_name,Grantor,Timestamp,Table_priv) VALUES ('localhost','mysql','mariadb.sys','global_priv','root@localhost','0','Select,Update,Delete'); +INSERT INTO tables_priv SELECT * FROM tmp_user_sys WHERE NOT @had_sys_user; +DROP TABLE tmp_user_sys; + CREATE TABLE IF NOT EXISTS columns_priv ( Host char(60) binary DEFAULT '' NOT NULL, Db char(64) binary DEFAULT '' NOT NULL, User char(80) binary DEFAULT '' NOT NULL, Table_name char(64) binary DEFAULT '' NOT NULL, Column_name char(64) binary DEFAULT '' NOT NULL, Timestamp timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, Column_priv set('Select','Insert','Update','References') COLLATE utf8_general_ci DEFAULT '' NOT NULL, PRIMARY KEY (Host,Db,User,Table_name,Column_name) ) engine=Aria transactional=1 CHARACTER SET utf8 COLLATE utf8_bin comment='Column privileges'; diff --git a/scripts/mysql_system_tables_fix.sql b/scripts/mysql_system_tables_fix.sql index 8faf7bcaf14..c68aa1e4103 100644 --- a/scripts/mysql_system_tables_fix.sql +++ b/scripts/mysql_system_tables_fix.sql @@ -808,4 +808,9 @@ IF 'BASE TABLE' = (select table_type from information_schema.tables where table_ FROM user; DROP TABLE user; END IF// + +IF 1 = (SELECT count(*) FROM information_schema.VIEWS WHERE TABLE_CATALOG = 'def' and TABLE_SCHEMA = 'mysql' and TABLE_NAME='user' and DEFINER = 'root@localhost') THEN + DROP VIEW IF EXISTS mysql.user; +END IF// + DELIMITER ; From 8d85715d507de8937a181e999501e205ff3dca34 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Wed, 6 May 2020 15:37:19 +0300 Subject: [PATCH 09/18] MDEV-21794: Optimizer flag rowid_filter leads to long query Rowid Filter check is just like Index Condition Pushdown check: before we check the filter, we must check if we have walked out of the range we are scanning. (If we did, we should return, and not continue the scan). Consequences of this: - Rowid filtering doesn't work for keys that have partially-covered blob columns (just like Index Condition Pushdown) - The rowid filter function has three return values: CHECK_POS (passed) CHECK_NEG (filtered out), CHECK_OUT_OF_RANGE. All of the above is implemented in this patch --- include/my_compare.h | 45 +++++----- mysql-test/main/rowid_filter.result | 50 +++++++++++- mysql-test/main/rowid_filter.test | 46 +++++++++++ mysql-test/main/rowid_filter_innodb.result | 42 ++++++++++ sql/handler.cc | 34 ++++++-- sql/handler.h | 7 +- sql/rowid_filter.cc | 8 ++ storage/innobase/row/row0sel.cc | 69 +++++++++------- storage/maria/ha_maria.h | 4 +- storage/maria/ma_key.c | 22 ++--- storage/maria/ma_rkey.c | 8 +- storage/maria/ma_rnext.c | 6 +- storage/maria/ma_rnext_same.c | 6 +- storage/maria/ma_rprev.c | 6 +- storage/maria/maria_def.h | 2 +- storage/myisam/ha_myisam.h | 4 +- storage/myisam/mi_extra.c | 2 +- storage/myisam/mi_key.c | 95 ++++++++++++++-------- storage/myisam/mi_rkey.c | 11 +-- storage/myisam/mi_rnext.c | 9 +- storage/myisam/mi_rnext_same.c | 9 +- storage/myisam/mi_rprev.c | 9 +- storage/myisam/myisamdef.h | 9 +- storage/rocksdb/ha_rocksdb.cc | 9 +- storage/tokudb/ha_tokudb.cc | 14 ++-- storage/tokudb/ha_tokudb.h | 2 +- 26 files changed, 354 insertions(+), 174 deletions(-) diff --git a/include/my_compare.h b/include/my_compare.h index 6568e5f2f27..9ae6c9582fb 100644 --- a/include/my_compare.h +++ b/include/my_compare.h @@ -127,31 +127,32 @@ extern HA_KEYSEG *ha_find_null(HA_KEYSEG *keyseg, const uchar *a); #endif /** - Return values of index_cond_func_xxx functions. + Return values for pushed index condition or rowid filter check functions. - 0=ICP_NO_MATCH - index tuple doesn't satisfy the pushed index condition (the - engine should discard the tuple and go to the next one) - 1=ICP_MATCH - index tuple satisfies the pushed index condition (the - engine should fetch and return the record) - 2=ICP_OUT_OF_RANGE - index tuple is out range that we're scanning, e.g. this - if we're scanning "t.key BETWEEN 10 AND 20" and got a - "t.key=21" tuple (the engine should stop scanning and - return HA_ERR_END_OF_FILE right away). - 3=ICP_ABORTED_BY_USER - engine must stop scanning and should return - HA_ERR_ABORTED_BY_USER right away - -1= ICP_ERROR - Reserved for internal errors in engines. Should not be - returned by index_cond_func_xxx + 0=CHECK_NEG - The filter is not satisfied. The engine should discard this + index tuple and continue the scan. + 1=CHECK_POS - The filter is statisfied. Current index tuple should be + returned to the SQL layer. + 2=CHECK_OUT_OF_RANGE - the index tuple is outside of the range that we're + scanning. (Example: if we're scanning "t.key BETWEEN 10 AND + 20" and got a "t.key=21" tuple) Tthe engine should stop + scanning and return HA_ERR_END_OF_FILE right away). + 3=CHECK_ABORTED_BY_USER - the engine must stop scanning and should return + HA_ERR_ABORTED_BY_USER right away + -1=CHECK_ERROR - Reserved for internal errors in engines. Should not be + returned by ICP or rowid filter check functions. */ -typedef enum icp_result { - ICP_ERROR=-1, - ICP_NO_MATCH=0, - ICP_MATCH=1, - ICP_OUT_OF_RANGE=2, - ICP_ABORTED_BY_USER=3 -} ICP_RESULT; +typedef enum check_result { + CHECK_ERROR=-1, + CHECK_NEG=0, + CHECK_POS=1, + CHECK_OUT_OF_RANGE=2, + CHECK_ABORTED_BY_USER=3 +} check_result_t; -typedef ICP_RESULT (*index_cond_func_t)(void *param); -typedef int (*rowid_filter_func_t)(void *param); +typedef check_result_t (*index_cond_func_t)(void *param); +typedef check_result_t (*rowid_filter_func_t)(void *param); +typedef int (*rowid_filter_is_active_func_t)(void *param); #endif /* _my_compare_h */ diff --git a/mysql-test/main/rowid_filter.result b/mysql-test/main/rowid_filter.result index 430e4d8f7ea..a5223666fb4 100644 --- a/mysql-test/main/rowid_filter.result +++ b/mysql-test/main/rowid_filter.result @@ -54,6 +54,17 @@ orders CREATE TABLE `orders` ( KEY `i_o_totalprice` (`o_totalprice`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 set optimizer_use_condition_selectivity=2; +select +100 * +(select count(*) from lineitem +WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45 +) +/ +(select count(*) from lineitem +where l_shipdate BETWEEN '1997-01-01' AND '1997-06-30') +as correct_r_filtered_when_using_l_shipdate; +correct_r_filtered_when_using_l_shipdate +11.7647 set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45; @@ -92,7 +103,7 @@ set statement optimizer_switch='rowid_filter=on' for ANALYZE SELECT l_orderkey, WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45; id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 SIMPLE lineitem range|filter i_l_shipdate,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 509 (12%) 60.00 (3%) 11.69 100.00 Using index condition; Using where; Using rowid filter +1 SIMPLE lineitem range|filter i_l_shipdate,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 509 (12%) 60.00 (11%) 11.69 100.00 Using index condition; Using where; Using rowid filter set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45; @@ -117,7 +128,7 @@ ANALYZE "rows": 702, "selectivity_pct": 11.69, "r_rows": 605, - "r_selectivity_pct": 3.6855, + "r_selectivity_pct": 11.765, "r_buffer_size": "REPLACED", "r_filling_time_ms": "REPLACED" }, @@ -641,7 +652,7 @@ WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45 AND o_totalprice between 180000 and 230000; id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra -1 SIMPLE lineitem range|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 509 (12%) 60.00 (3%) 11.69 100.00 Using index condition; Using where; Using rowid filter +1 SIMPLE lineitem range|filter PRIMARY,i_l_shipdate,i_l_orderkey,i_l_orderkey_quantity,i_l_quantity i_l_shipdate|i_l_quantity 4|9 NULL 509 (12%) 60.00 (11%) 11.69 100.00 Using index condition; Using where; Using rowid filter 1 SIMPLE orders eq_ref|filter PRIMARY,i_o_totalprice PRIMARY|i_o_totalprice 4|9 dbt3_s001.lineitem.l_orderkey 1 (9%) 0.27 (25%) 9.27 100.00 Using where; Using rowid filter set statement optimizer_switch='rowid_filter=on' for ANALYZE FORMAT=JSON SELECT o_orderkey, l_linenumber, l_shipdate, l_quantity, o_totalprice FROM orders JOIN lineitem ON o_orderkey=l_orderkey @@ -675,7 +686,7 @@ ANALYZE "rows": 702, "selectivity_pct": 11.69, "r_rows": 605, - "r_selectivity_pct": 3.6855, + "r_selectivity_pct": 11.765, "r_buffer_size": "REPLACED", "r_filling_time_ms": "REPLACED" }, @@ -2105,6 +2116,37 @@ EXPLAIN } DROP TABLE t1,t2; # +# MDEV-21794: Optimizer flag rowid_filter leads to long query +# +create table t10(a int); +insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t11(a int); +insert into t11 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C; +CREATE TABLE t1 ( +el_id int(10) unsigned NOT NULL , +el_index blob NOT NULL, +el_index_60 varbinary(60) NOT NULL, +filler blob, +PRIMARY KEY (el_id), +KEY el_index (el_index(60)), +KEY el_index_60 (el_index_60,el_id) +); +insert into t1 +select +A.a+1000*B.a, +A.a+1000*B.a + 10000, +A.a+1000*B.a + 10000, +'filler-data-filler-data' +from +t11 A, t10 B; +# This must not use rowid_filter with key=el_index|el_index_60: +explain +select * from t1 +where el_index like '10%' and (el_index_60 like '10%' or el_index_60 like '20%'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range el_index,el_index_60 el_index 62 NULL 645 Using where +drop table t10, t11, t1; +# # MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT # set @save_optimizer_switch= @@optimizer_switch; diff --git a/mysql-test/main/rowid_filter.test b/mysql-test/main/rowid_filter.test index 9ac9465963b..c47710e65b8 100644 --- a/mysql-test/main/rowid_filter.test +++ b/mysql-test/main/rowid_filter.test @@ -39,6 +39,16 @@ set statement optimizer_switch='rowid_filter=on' for; let $without_filter= set statement optimizer_switch='rowid_filter=off' for; +select + 100 * + (select count(*) from lineitem + WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45 + ) + / + (select count(*) from lineitem + where l_shipdate BETWEEN '1997-01-01' AND '1997-06-30') + as correct_r_filtered_when_using_l_shipdate; + let $q1= SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND @@ -339,6 +349,42 @@ eval EXPLAIN FORMAT=JSON $q; DROP TABLE t1,t2; +--echo # +--echo # MDEV-21794: Optimizer flag rowid_filter leads to long query +--echo # +create table t10(a int); +insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); + +create table t11(a int); +insert into t11 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C; + +CREATE TABLE t1 ( + el_id int(10) unsigned NOT NULL , + el_index blob NOT NULL, + el_index_60 varbinary(60) NOT NULL, + filler blob, + + PRIMARY KEY (el_id), + KEY el_index (el_index(60)), + KEY el_index_60 (el_index_60,el_id) +); + +insert into t1 +select + A.a+1000*B.a, + A.a+1000*B.a + 10000, + A.a+1000*B.a + 10000, + 'filler-data-filler-data' +from + t11 A, t10 B; + +--echo # This must not use rowid_filter with key=el_index|el_index_60: +explain +select * from t1 +where el_index like '10%' and (el_index_60 like '10%' or el_index_60 like '20%'); + +drop table t10, t11, t1; + --echo # --echo # MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result index 515872d8c5b..05d97b746a7 100644 --- a/mysql-test/main/rowid_filter_innodb.result +++ b/mysql-test/main/rowid_filter_innodb.result @@ -55,6 +55,17 @@ orders CREATE TABLE `orders` ( KEY `i_o_totalprice` (`o_totalprice`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 set optimizer_use_condition_selectivity=2; +select +100 * +(select count(*) from lineitem +WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45 +) +/ +(select count(*) from lineitem +where l_shipdate BETWEEN '1997-01-01' AND '1997-06-30') +as correct_r_filtered_when_using_l_shipdate; +correct_r_filtered_when_using_l_shipdate +11.7647 set statement optimizer_switch='rowid_filter=on' for EXPLAIN SELECT l_orderkey, l_linenumber, l_shipdate, l_quantity FROM lineitem WHERE l_shipdate BETWEEN '1997-01-01' AND '1997-06-30' AND l_quantity > 45; @@ -2034,6 +2045,37 @@ EXPLAIN } DROP TABLE t1,t2; # +# MDEV-21794: Optimizer flag rowid_filter leads to long query +# +create table t10(a int); +insert into t10 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9); +create table t11(a int); +insert into t11 select A.a + B.a* 10 + C.a * 100 from t10 A, t10 B, t10 C; +CREATE TABLE t1 ( +el_id int(10) unsigned NOT NULL , +el_index blob NOT NULL, +el_index_60 varbinary(60) NOT NULL, +filler blob, +PRIMARY KEY (el_id), +KEY el_index (el_index(60)), +KEY el_index_60 (el_index_60,el_id) +); +insert into t1 +select +A.a+1000*B.a, +A.a+1000*B.a + 10000, +A.a+1000*B.a + 10000, +'filler-data-filler-data' +from +t11 A, t10 B; +# This must not use rowid_filter with key=el_index|el_index_60: +explain +select * from t1 +where el_index like '10%' and (el_index_60 like '10%' or el_index_60 like '20%'); +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 range el_index,el_index_60 el_index 62 NULL 1000 Using where +drop table t10, t11, t1; +# # MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT # set @save_optimizer_switch= @@optimizer_switch; diff --git a/sql/handler.cc b/sql/handler.cc index c371da22a87..a7e7e2554cb 100644 --- a/sql/handler.cc +++ b/sql/handler.cc @@ -5970,22 +5970,22 @@ int handler::compare_key2(key_range *range) const /** ICP callback - to be called by an engine to check the pushed condition */ -extern "C" enum icp_result handler_index_cond_check(void* h_arg) +extern "C" check_result_t handler_index_cond_check(void* h_arg) { handler *h= (handler*)h_arg; THD *thd= h->table->in_use; - enum icp_result res; + check_result_t res; enum thd_kill_levels abort_at= h->has_transactions() ? THD_ABORT_SOFTLY : THD_ABORT_ASAP; if (thd_kill_level(thd) > abort_at) - return ICP_ABORTED_BY_USER; + return CHECK_ABORTED_BY_USER; if (h->end_range && h->compare_key2(h->end_range) > 0) - return ICP_OUT_OF_RANGE; + return CHECK_OUT_OF_RANGE; h->increment_statistics(&SSV::ha_icp_attempts); - if ((res= h->pushed_idx_cond->val_int()? ICP_MATCH : ICP_NO_MATCH) == - ICP_MATCH) + if ((res= h->pushed_idx_cond->val_int()? CHECK_POS : CHECK_NEG) == + CHECK_POS) h->increment_statistics(&SSV::ha_icp_match); return res; } @@ -5996,12 +5996,30 @@ extern "C" enum icp_result handler_index_cond_check(void* h_arg) keys of the rows whose data is to be fetched against the used rowid filter */ -extern "C" int handler_rowid_filter_check(void *h_arg) +extern "C" +check_result_t handler_rowid_filter_check(void *h_arg) { handler *h= (handler*) h_arg; TABLE *tab= h->get_table(); + + /* + Check for out-of-range and killed conditions only if we haven't done it + already in the pushed index condition check + */ + if (!h->pushed_idx_cond) + { + THD *thd= h->table->in_use; + enum thd_kill_levels abort_at= h->has_transactions() ? + THD_ABORT_SOFTLY : THD_ABORT_ASAP; + if (thd_kill_level(thd) > abort_at) + return CHECK_ABORTED_BY_USER; + + if (h->end_range && h->compare_key2(h->end_range) > 0) + return CHECK_OUT_OF_RANGE; + } + h->position(tab->record[0]); - return h->pushed_rowid_filter->check((char *) h->ref); + return h->pushed_rowid_filter->check((char*)h->ref)? CHECK_POS: CHECK_NEG; } diff --git a/sql/handler.h b/sql/handler.h index 756481f06bb..c764915cc51 100644 --- a/sql/handler.h +++ b/sql/handler.h @@ -2913,9 +2913,9 @@ public: {} }; -extern "C" enum icp_result handler_index_cond_check(void* h_arg); +extern "C" check_result_t handler_index_cond_check(void* h_arg); -extern "C" int handler_rowid_filter_check(void* h_arg); +extern "C" check_result_t handler_rowid_filter_check(void* h_arg); extern "C" int handler_rowid_filter_is_active(void* h_arg); uint calculate_key_len(TABLE *, uint, const uchar *, key_part_map); @@ -4837,7 +4837,8 @@ public: virtual void set_lock_type(enum thr_lock_type lock); - friend enum icp_result handler_index_cond_check(void* h_arg); + friend check_result_t handler_index_cond_check(void* h_arg); + friend check_result_t handler_rowid_filter_check(void *h_arg); /** Find unique record by index or unique constrain diff --git a/sql/rowid_filter.cc b/sql/rowid_filter.cc index 6ab9e40de32..9faab828871 100644 --- a/sql/rowid_filter.cc +++ b/sql/rowid_filter.cc @@ -469,6 +469,14 @@ TABLE::best_range_rowid_filter_for_partial_join(uint access_key_no, covering_keys.is_set(access_key_no)) return 0; + // Disallow use of range filter if the key contains partially-covered + // columns. + for (uint i= 0; i < key_info[access_key_no].usable_key_parts; i++) + { + if (key_info[access_key_no].key_part[i].field->type() == MYSQL_TYPE_BLOB) + return 0; + } + /* Currently we do not support usage of range filters if the table is accessed by the clustered primary key. It does not make sense diff --git a/storage/innobase/row/row0sel.cc b/storage/innobase/row/row0sel.cc index 490dc726f0f..394689225e5 100644 --- a/storage/innobase/row/row0sel.cc +++ b/storage/innobase/row/row0sel.cc @@ -3877,9 +3877,9 @@ exhausted: /*********************************************************************//** Check a pushed-down index condition. -@return ICP_NO_MATCH, ICP_MATCH, or ICP_OUT_OF_RANGE */ +@return CHECK_NEG, CHECK_POS, or CHECK_OUT_OF_RANGE */ static -ICP_RESULT +check_result_t row_search_idx_cond_check( /*======================*/ byte* mysql_rec, /*!< out: record @@ -3897,7 +3897,7 @@ row_search_idx_cond_check( if (!prebuilt->idx_cond) { if (!handler_rowid_filter_is_active(prebuilt->pk_filter)) { - return(ICP_MATCH); + return(CHECK_POS); } } else { MONITOR_INC(MONITOR_ICP_ATTEMPTS); @@ -3922,7 +3922,7 @@ row_search_idx_cond_check( rec, prebuilt->index, offsets, templ->icp_rec_field_no, templ)) { - return(ICP_NO_MATCH); + return(CHECK_NEG); } } @@ -3932,12 +3932,12 @@ row_search_idx_cond_check( index, if the case of the column has been updated in the past, or a record has been deleted and a record inserted in a different case. */ - ICP_RESULT result = prebuilt->idx_cond + check_result_t result = prebuilt->idx_cond ? handler_index_cond_check(prebuilt->idx_cond) - : ICP_MATCH; + : CHECK_POS; switch (result) { - case ICP_MATCH: + case CHECK_POS: if (handler_rowid_filter_is_active(prebuilt->pk_filter)) { ut_ad(!prebuilt->index->is_primary()); if (prebuilt->clust_index_was_generated) { @@ -3952,9 +3952,18 @@ row_search_idx_cond_check( ut_ad(len == DATA_ROW_ID_LEN); memcpy(prebuilt->row_id, data, DATA_ROW_ID_LEN); } - if (!handler_rowid_filter_check(prebuilt->pk_filter)) { - MONITOR_INC(MONITOR_ICP_MATCH); - return(ICP_NO_MATCH); + result = handler_rowid_filter_check(prebuilt->pk_filter); + switch (result) { + case CHECK_NEG: + MONITOR_INC(MONITOR_ICP_NO_MATCH); + return(result); + case CHECK_OUT_OF_RANGE: + MONITOR_INC(MONITOR_ICP_OUT_OF_RANGE); + return(result); + case CHECK_POS: + break; + default: + ut_error; } } /* Convert the remaining fields to MySQL format. @@ -3966,19 +3975,19 @@ row_search_idx_cond_check( mysql_rec, prebuilt, rec, NULL, false, prebuilt->index, offsets)) { ut_ad(dict_index_is_clust(prebuilt->index)); - return(ICP_NO_MATCH); + return(CHECK_NEG); } } MONITOR_INC(MONITOR_ICP_MATCH); return(result); - case ICP_NO_MATCH: + case CHECK_NEG: MONITOR_INC(MONITOR_ICP_NO_MATCH); return(result); - case ICP_OUT_OF_RANGE: + case CHECK_OUT_OF_RANGE: MONITOR_INC(MONITOR_ICP_OUT_OF_RANGE); return(result); - case ICP_ERROR: - case ICP_ABORTED_BY_USER: + case CHECK_ERROR: + case CHECK_ABORTED_BY_USER: return(result); } @@ -4414,12 +4423,12 @@ row_search_mvcc( switch (row_search_idx_cond_check( buf, prebuilt, rec, offsets)) { - case ICP_NO_MATCH: - case ICP_OUT_OF_RANGE: - case ICP_ABORTED_BY_USER: - case ICP_ERROR: + case CHECK_NEG: + case CHECK_OUT_OF_RANGE: + case CHECK_ABORTED_BY_USER: + case CHECK_ERROR: goto shortcut_mismatch; - case ICP_MATCH: + case CHECK_POS: goto shortcut_match; } } @@ -5198,14 +5207,14 @@ no_gap_lock: index entry. */ switch (row_search_idx_cond_check( buf, prebuilt, rec, offsets)) { - case ICP_NO_MATCH: + case CHECK_NEG: goto next_rec; - case ICP_OUT_OF_RANGE: - case ICP_ABORTED_BY_USER: - case ICP_ERROR: + case CHECK_OUT_OF_RANGE: + case CHECK_ABORTED_BY_USER: + case CHECK_ERROR: err = DB_RECORD_NOT_FOUND; goto idx_cond_failed; - case ICP_MATCH: + case CHECK_POS: goto requires_clust_rec; } @@ -5255,17 +5264,17 @@ locks_ok_del_marked: /* Check if the record matches the index condition. */ switch (row_search_idx_cond_check(buf, prebuilt, rec, offsets)) { - case ICP_NO_MATCH: + case CHECK_NEG: if (did_semi_consistent_read) { row_unlock_for_mysql(prebuilt, TRUE); } goto next_rec; - case ICP_OUT_OF_RANGE: - case ICP_ABORTED_BY_USER: - case ICP_ERROR: + case CHECK_OUT_OF_RANGE: + case CHECK_ABORTED_BY_USER: + case CHECK_ERROR: err = DB_RECORD_NOT_FOUND; goto idx_cond_failed; - case ICP_MATCH: + case CHECK_POS: break; } diff --git a/storage/maria/ha_maria.h b/storage/maria/ha_maria.h index ef0ceb1cd32..f6b00420c9c 100644 --- a/storage/maria/ha_maria.h +++ b/storage/maria/ha_maria.h @@ -32,7 +32,7 @@ #define HA_RECOVER_QUICK 8 /* Don't check rows in data file */ C_MODE_START -ICP_RESULT index_cond_func_maria(void *arg); +check_result_t index_cond_func_maria(void *arg); C_MODE_END extern TYPELIB maria_recover_typelib; @@ -187,7 +187,7 @@ public: int find_unique_row(uchar *record, uint unique_idx); private: DsMrr_impl ds_mrr; - friend ICP_RESULT index_cond_func_maria(void *arg); + friend check_result_t index_cond_func_maria(void *arg); friend void reset_thd_trn(THD *thd); }; diff --git a/storage/maria/ma_key.c b/storage/maria/ma_key.c index 9e804a1e9dc..5061f3d0143 100644 --- a/storage/maria/ma_key.c +++ b/storage/maria/ma_key.c @@ -666,20 +666,20 @@ int _ma_read_key_record(MARIA_HA *info, uchar *buf, MARIA_RECORD_POS filepos) will look for column values there) RETURN - ICP_ERROR Error ; my_errno set to HA_ERR_CRASHED - ICP_NO_MATCH Index condition is not satisfied, continue scanning - ICP_MATCH Index condition is satisfied - ICP_OUT_OF_RANGE Index condition is not satisfied, end the scan. + CHECK_ERROR Error ; my_errno set to HA_ERR_CRASHED + CHECK_NEG Index condition is not satisfied, continue scanning + CHECK_POS Index condition is satisfied + CHECK_OUT_OF_RANGE Index condition is not satisfied, end the scan. my_errno set to HA_ERR_END_OF_FILE - info->cur_row.lastpos is set to HA_OFFSET_ERROR in case of ICP_ERROR or - ICP_OUT_OF_RANGE to indicate that we don't have any active row. + info->cur_row.lastpos is set to HA_OFFSET_ERROR in case of CHECK_ERROR or + CHECK_OUT_OF_RANGE to indicate that we don't have any active row. */ -ICP_RESULT ma_check_index_cond(register MARIA_HA *info, uint keynr, - uchar *record) +check_result_t ma_check_index_cond(register MARIA_HA *info, uint keynr, + uchar *record) { - ICP_RESULT res= ICP_MATCH; + check_result_t res= CHECK_POS; if (info->index_cond_func) { if (_ma_put_key_in_record(info, keynr, FALSE, record)) @@ -688,10 +688,10 @@ ICP_RESULT ma_check_index_cond(register MARIA_HA *info, uint keynr, maria_print_error(info->s, HA_ERR_CRASHED); info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_CRASHED; - res= ICP_ERROR; + res= CHECK_ERROR; } else if ((res= info->index_cond_func(info->index_cond_func_arg)) == - ICP_OUT_OF_RANGE) + CHECK_OUT_OF_RANGE) { /* We got beyond the end of scanned range */ info->cur_row.lastpos= HA_OFFSET_ERROR; /* No active record */ diff --git a/storage/maria/ma_rkey.c b/storage/maria/ma_rkey.c index d19caaf6137..b48b0fc0c6b 100644 --- a/storage/maria/ma_rkey.c +++ b/storage/maria/ma_rkey.c @@ -34,7 +34,7 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data, HA_KEYSEG *last_used_keyseg; uint32 nextflag; MARIA_KEY key; - ICP_RESULT icp_res= ICP_MATCH; + check_result_t check= CHECK_POS; DBUG_ENTER("maria_rkey"); DBUG_PRINT("enter", ("base:%p buf:%p inx: %d search_flag: %d", info, buf, inx, search_flag)); @@ -115,7 +115,7 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data, not satisfied with an out-of-range condition. */ if ((*share->row_is_visible)(info) && - ((icp_res= ma_check_index_cond(info, inx, buf)) != ICP_NO_MATCH)) + ((check= ma_check_index_cond(info, inx, buf)) != CHECK_NEG)) break; /* The key references a concurrently inserted record. */ @@ -174,7 +174,7 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data, } } while (!(*share->row_is_visible)(info) || - ((icp_res= ma_check_index_cond(info, inx, buf)) == 0)); + ((check= ma_check_index_cond(info, inx, buf)) == 0)); } else { @@ -186,7 +186,7 @@ int maria_rkey(MARIA_HA *info, uchar *buf, int inx, const uchar *key_data, if (info->cur_row.lastpos == HA_OFFSET_ERROR) { - if (icp_res == ICP_OUT_OF_RANGE) + if (check == CHECK_OUT_OF_RANGE) { /* We don't want HA_ERR_END_OF_FILE in this particular case */ my_errno= HA_ERR_KEY_NOT_FOUND; diff --git a/storage/maria/ma_rnext.c b/storage/maria/ma_rnext.c index 5ea90a242fc..6fd6f89139f 100644 --- a/storage/maria/ma_rnext.c +++ b/storage/maria/ma_rnext.c @@ -30,7 +30,7 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx) uint flag; MARIA_SHARE *share= info->s; MARIA_KEYDEF *keyinfo; - ICP_RESULT icp_res= ICP_MATCH; + check_result_t check= CHECK_POS; uint update_mask= HA_STATE_NEXT_FOUND; DBUG_ENTER("maria_rnext"); @@ -107,7 +107,7 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx) if (!error) { while (!(*share->row_is_visible)(info) || - ((icp_res= ma_check_index_cond(info, inx, buf)) == ICP_NO_MATCH)) + ((check= ma_check_index_cond(info, inx, buf)) == CHECK_NEG)) { /* If we are at the last key on the key page, allow writers to @@ -135,7 +135,7 @@ int maria_rnext(MARIA_HA *info, uchar *buf, int inx) info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= update_mask; - if (error || icp_res != ICP_MATCH) + if (error || check != CHECK_POS) { fast_ma_writeinfo(info); if (my_errno == HA_ERR_KEY_NOT_FOUND) diff --git a/storage/maria/ma_rnext_same.c b/storage/maria/ma_rnext_same.c index b07967ca9e9..19a950d31bb 100644 --- a/storage/maria/ma_rnext_same.c +++ b/storage/maria/ma_rnext_same.c @@ -30,7 +30,7 @@ int maria_rnext_same(MARIA_HA *info, uchar *buf) int error; uint inx,not_used[2]; MARIA_KEYDEF *keyinfo; - ICP_RESULT icp_res= ICP_MATCH; + check_result_t check= CHECK_POS; DBUG_ENTER("maria_rnext_same"); if ((int) (inx= info->lastinx) < 0 || @@ -92,7 +92,7 @@ int maria_rnext_same(MARIA_HA *info, uchar *buf) } /* Skip rows that are inserted by other threads since we got a lock */ if ((info->s->row_is_visible)(info) && - ((icp_res= ma_check_index_cond(info, inx, buf)) != ICP_NO_MATCH)) + ((check= ma_check_index_cond(info, inx, buf)) != CHECK_NEG)) break; } } @@ -102,7 +102,7 @@ int maria_rnext_same(MARIA_HA *info, uchar *buf) info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= HA_STATE_NEXT_FOUND | HA_STATE_RNEXT_SAME; - if (error || icp_res != ICP_MATCH) + if (error || check != CHECK_POS) { fast_ma_writeinfo(info); if (my_errno == HA_ERR_KEY_NOT_FOUND) diff --git a/storage/maria/ma_rprev.c b/storage/maria/ma_rprev.c index eebc8cba0c7..15010d962bb 100644 --- a/storage/maria/ma_rprev.c +++ b/storage/maria/ma_rprev.c @@ -28,7 +28,7 @@ int maria_rprev(MARIA_HA *info, uchar *buf, int inx) register uint flag; MARIA_SHARE *share= info->s; MARIA_KEYDEF *keyinfo; - ICP_RESULT icp_res= ICP_MATCH; + check_result_t check= CHECK_POS; DBUG_ENTER("maria_rprev"); if ((inx = _ma_check_index(info,inx)) < 0) @@ -58,7 +58,7 @@ int maria_rprev(MARIA_HA *info, uchar *buf, int inx) { my_off_t cur_keypage= info->last_keypage; while (!(*share->row_is_visible)(info) || - ((icp_res= ma_check_index_cond(info, inx, buf)) == ICP_NO_MATCH)) + ((check= ma_check_index_cond(info, inx, buf)) == CHECK_NEG)) { /* If we are at the last (i.e. first?) key on the key page, @@ -86,7 +86,7 @@ int maria_rprev(MARIA_HA *info, uchar *buf, int inx) info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= HA_STATE_PREV_FOUND; - if (error || icp_res != ICP_MATCH) + if (error || check != CHECK_POS) { fast_ma_writeinfo(info); if (my_errno == HA_ERR_KEY_NOT_FOUND) diff --git a/storage/maria/maria_def.h b/storage/maria/maria_def.h index 3c0574fd783..c89623daea9 100644 --- a/storage/maria/maria_def.h +++ b/storage/maria/maria_def.h @@ -1433,7 +1433,7 @@ extern my_bool maria_flush_log_for_page_none(PAGECACHE_IO_HOOK_ARGS *args); extern PAGECACHE *maria_log_pagecache; extern void ma_set_index_cond_func(MARIA_HA *info, index_cond_func_t func, void *func_arg); -ICP_RESULT ma_check_index_cond(MARIA_HA *info, uint keynr, uchar *record); +check_result_t ma_check_index_cond(MARIA_HA *info, uint keynr, uchar *record); extern my_bool ma_yield_and_check_if_killed(MARIA_HA *info, int inx); extern my_bool ma_killed_standalone(MARIA_HA *); diff --git a/storage/myisam/ha_myisam.h b/storage/myisam/ha_myisam.h index 0af4215e8f9..70c99a617f6 100644 --- a/storage/myisam/ha_myisam.h +++ b/storage/myisam/ha_myisam.h @@ -38,7 +38,7 @@ extern const char *myisam_recover_names[]; extern ulonglong myisam_recover_options; C_MODE_START -ICP_RESULT index_cond_func_myisam(void *arg); +check_result_t index_cond_func_myisam(void *arg); C_MODE_END class ha_myisam: public handler @@ -175,5 +175,5 @@ public: private: DsMrr_impl ds_mrr; - friend ICP_RESULT index_cond_func_myisam(void *arg); + friend check_result_t index_cond_func_myisam(void *arg); }; diff --git a/storage/myisam/mi_extra.c b/storage/myisam/mi_extra.c index d1bf903bd46..67cb714e7bf 100644 --- a/storage/myisam/mi_extra.c +++ b/storage/myisam/mi_extra.c @@ -424,7 +424,7 @@ void mi_set_index_cond_func(MI_INFO *info, index_cond_func_t func, void mi_set_rowid_filter_func(MI_INFO *info, rowid_filter_func_t check_func, - rowid_filter_func_t is_active_func, + rowid_filter_is_active_func_t is_active_func, void *func_arg) { info->rowid_filter_func= check_func; diff --git a/storage/myisam/mi_key.c b/storage/myisam/mi_key.c index dd838a05ada..d17eef06969 100644 --- a/storage/myisam/mi_key.c +++ b/storage/myisam/mi_key.c @@ -490,58 +490,83 @@ int _mi_read_key_record(MI_INFO *info, my_off_t filepos, uchar *buf) } -/* - Save current key tuple to record and call index condition check function - - SYNOPSIS - mi_check_index_cond() - info MyISAM handler - keynr Index we're running a scan on - record Record buffer to use (it is assumed that index check function - will look for column values there) - - RETURN - ICP_ERROR Error - ICP_NO_MATCH Index condition is not satisfied, continue scanning - ICP_MATCH Index condition is satisfied - ICP_OUT_OF_RANGE Index condition is not satisfied, end the scan. -*/ - -ICP_RESULT mi_check_index_cond(register MI_INFO *info, uint keynr, - uchar *record) +static +int mi_unpack_index_tuple(MI_INFO *info, uint keynr, uchar *record) { - ICP_RESULT res; if (_mi_put_key_in_record(info, keynr, FALSE, record)) { /* Impossible case; Can only happen if bug in code */ mi_print_error(info->s, HA_ERR_CRASHED); info->lastpos= HA_OFFSET_ERROR; /* No active record */ my_errno= HA_ERR_CRASHED; - res= ICP_ERROR; + return 1; } - else if ((res= info->index_cond_func(info->index_cond_func_arg)) == - ICP_OUT_OF_RANGE) - { - /* We got beyond the end of scanned range */ - info->lastpos= HA_OFFSET_ERROR; /* No active record */ - my_errno= HA_ERR_END_OF_FILE; - } - return res; + return 0; } -int mi_check_rowid_filter(MI_INFO *info) -{ - return info->rowid_filter_func(info->rowid_filter_func_arg); -} - -int mi_check_rowid_filter_is_active(MI_INFO *info) +static int mi_check_rowid_filter_is_active(MI_INFO *info) { if (info->rowid_filter_is_active_func == NULL) return 0; return info->rowid_filter_is_active_func(info->rowid_filter_func_arg); } + +/* + Check the current index tuple: Check ICP condition and/or Rowid Filter + + SYNOPSIS + mi_check_index_tuple() + info MyISAM handler + keynr Index we're running a scan on + record Record buffer to use (it is assumed that index check function + will look for column values there) + + RETURN + Check result according to check_result_t definition +*/ + +check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record) +{ + int need_unpack= TRUE; + check_result_t res= CHECK_POS; + + if (info->index_cond_func) + { + if (mi_unpack_index_tuple(info, keynr, record)) + res= CHECK_ERROR; + else if ((res= info->index_cond_func(info->index_cond_func_arg)) == + CHECK_OUT_OF_RANGE) + { + /* We got beyond the end of scanned range */ + info->lastpos= HA_OFFSET_ERROR; /* No active record */ + my_errno= HA_ERR_END_OF_FILE; + } + + /* + If we got an error, out-of-range condition, or ICP condition computed to + FALSE - we don't need to check the Rowid Filter. + */ + if (res != CHECK_POS) + return res; + + need_unpack= FALSE; + } + + /* Check the Rowid Filter, if present */ + if (mi_check_rowid_filter_is_active(info)) + { + /* Unpack the index tuple if we haven't done it already */ + if (need_unpack && mi_unpack_index_tuple(info, keynr, record)) + res= CHECK_ERROR; + else + res= info->rowid_filter_func(info->rowid_filter_func_arg); + } + return res; +} + + /* Retrieve auto_increment info diff --git a/storage/myisam/mi_rkey.c b/storage/myisam/mi_rkey.c index 8ef1d917f38..bf6f3ef852c 100644 --- a/storage/myisam/mi_rkey.c +++ b/storage/myisam/mi_rkey.c @@ -30,7 +30,7 @@ int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key, MI_KEYDEF *keyinfo; HA_KEYSEG *last_used_keyseg; uint pack_key_length, use_key_length, nextflag; - ICP_RESULT res= ICP_NO_MATCH; + check_result_t res= CHECK_NEG; DBUG_ENTER("mi_rkey"); DBUG_PRINT("enter", ("base: %p buf: %p inx: %d search_flag: %d", info, buf, inx, search_flag)); @@ -119,10 +119,7 @@ int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key, while ((info->lastpos >= info->state->data_file_length && (search_flag != HA_READ_KEY_EXACT || last_used_keyseg != keyinfo->seg + keyinfo->keysegs)) || - (info->index_cond_func && - (res= mi_check_index_cond(info, inx, buf)) == ICP_NO_MATCH) || - (mi_check_rowid_filter_is_active(info) && - !mi_check_rowid_filter(info))) + (res= mi_check_index_tuple(info, inx, buf)) == CHECK_NEG) { uint not_used[2]; /* @@ -162,12 +159,12 @@ int mi_rkey(MI_INFO *info, uchar *buf, int inx, const uchar *key, /* Aborted by user */ DBUG_ASSERT(info->lastpos == HA_OFFSET_ERROR && my_errno == HA_ERR_ABORTED_BY_USER); - res= ICP_ERROR; + res= CHECK_ERROR; buf= 0; /* Fast abort */ break; } } - if (res == ICP_OUT_OF_RANGE) + if (res == CHECK_OUT_OF_RANGE) { /* Change error from HA_ERR_END_OF_FILE */ DBUG_ASSERT(info->lastpos == HA_OFFSET_ERROR); diff --git a/storage/myisam/mi_rnext.c b/storage/myisam/mi_rnext.c index 9f5f4702ed2..7124c102f82 100644 --- a/storage/myisam/mi_rnext.c +++ b/storage/myisam/mi_rnext.c @@ -28,7 +28,7 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx) { int error,changed; uint flag; - ICP_RESULT icp_res= ICP_MATCH; + check_result_t check= CHECK_POS; uint update_mask= HA_STATE_NEXT_FOUND; DBUG_ENTER("mi_rnext"); @@ -101,10 +101,7 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx) { while ((info->s->concurrent_insert && info->lastpos >= info->state->data_file_length) || - (info->index_cond_func && - (icp_res= mi_check_index_cond(info, inx, buf)) == ICP_NO_MATCH) || - (mi_check_rowid_filter_is_active(info) && - !mi_check_rowid_filter(info))) + (check= mi_check_index_tuple(info, inx, buf)) == CHECK_NEG) { /* If we are at the last key on the key page, allow writers to @@ -137,7 +134,7 @@ int mi_rnext(MI_INFO *info, uchar *buf, int inx) info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= update_mask; - if (error || icp_res != ICP_MATCH) + if (error || check != CHECK_POS) { fast_mi_writeinfo(info); if (my_errno == HA_ERR_KEY_NOT_FOUND) diff --git a/storage/myisam/mi_rnext_same.c b/storage/myisam/mi_rnext_same.c index ee6b962c8c3..480b54f742c 100644 --- a/storage/myisam/mi_rnext_same.c +++ b/storage/myisam/mi_rnext_same.c @@ -30,7 +30,7 @@ int mi_rnext_same(MI_INFO *info, uchar *buf) int error; uint inx,not_used[2]; MI_KEYDEF *keyinfo; - ICP_RESULT icp_res= ICP_MATCH; + check_result_t check= CHECK_POS; DBUG_ENTER("mi_rnext_same"); if ((int) (inx=info->lastinx) < 0 || info->lastpos == HA_OFFSET_ERROR) @@ -94,10 +94,7 @@ int mi_rnext_same(MI_INFO *info, uchar *buf) - rows that don't match index condition */ if (info->lastpos < info->state->data_file_length && - (!info->index_cond_func || - (icp_res= mi_check_index_cond(info, inx, buf)) != ICP_NO_MATCH) && - (!mi_check_rowid_filter_is_active(info) || - mi_check_rowid_filter(info))) + (check= mi_check_index_tuple(info, inx, buf)) != CHECK_NEG) break; } } @@ -109,7 +106,7 @@ int mi_rnext_same(MI_INFO *info, uchar *buf) info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= HA_STATE_NEXT_FOUND | HA_STATE_RNEXT_SAME; - if (error || icp_res != ICP_MATCH) + if (error || check != CHECK_POS) { fast_mi_writeinfo(info); if (my_errno == HA_ERR_KEY_NOT_FOUND) diff --git a/storage/myisam/mi_rprev.c b/storage/myisam/mi_rprev.c index cac0d672765..698e3b5957f 100644 --- a/storage/myisam/mi_rprev.c +++ b/storage/myisam/mi_rprev.c @@ -28,7 +28,7 @@ int mi_rprev(MI_INFO *info, uchar *buf, int inx) int error,changed; register uint flag; MYISAM_SHARE *share=info->s; - ICP_RESULT icp_res= ICP_MATCH; + check_result_t check= CHECK_POS; DBUG_ENTER("mi_rprev"); if ((inx = _mi_check_index(info,inx)) < 0) @@ -58,10 +58,7 @@ int mi_rprev(MI_INFO *info, uchar *buf, int inx) my_off_t cur_keypage= info->last_keypage; while ((share->concurrent_insert && info->lastpos >= info->state->data_file_length) || - (info->index_cond_func && - (icp_res= mi_check_index_cond(info, inx, buf)) == ICP_NO_MATCH) || - (mi_check_rowid_filter_is_active(info) && - !mi_check_rowid_filter(info))) + (check= mi_check_index_tuple(info, inx, buf)) == CHECK_NEG) { /* If we are at the last (i.e. first?) key on the key page, @@ -95,7 +92,7 @@ int mi_rprev(MI_INFO *info, uchar *buf, int inx) info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED); info->update|= HA_STATE_PREV_FOUND; - if (error || icp_res != ICP_MATCH) + if (error || check != CHECK_POS) { fast_mi_writeinfo(info); if (my_errno == HA_ERR_KEY_NOT_FOUND) diff --git a/storage/myisam/myisamdef.h b/storage/myisam/myisamdef.h index f7b61ae638c..06de992d6de 100644 --- a/storage/myisam/myisamdef.h +++ b/storage/myisam/myisamdef.h @@ -307,7 +307,7 @@ struct st_myisam_info index_cond_func_t index_cond_func; /* Index condition function */ void *index_cond_func_arg; /* parameter for the func */ rowid_filter_func_t rowid_filter_func; /* rowid filter check function */ - rowid_filter_func_t rowid_filter_is_active_func; /* is activefunction */ + rowid_filter_is_active_func_t rowid_filter_is_active_func; /* is activefunction */ void *rowid_filter_func_arg; /* parameter for the func */ THR_LOCK_DATA lock; uchar *rtree_recursion_state; /* For RTREE */ @@ -725,9 +725,8 @@ my_bool mi_dynmap_file(MI_INFO *info, my_off_t size); int mi_munmap_file(MI_INFO *info); void mi_remap_file(MI_INFO *info, my_off_t size); -ICP_RESULT mi_check_index_cond(MI_INFO *info, uint keynr, uchar *record); -int mi_check_rowid_filter(MI_INFO *info); -int mi_check_rowid_filter_is_active(MI_INFO *info); +check_result_t mi_check_index_tuple(MI_INFO *info, uint keynr, uchar *record); + /* Functions needed by mi_check */ int killed_ptr(HA_CHECK *param); void mi_check_print_error(HA_CHECK *param, const char *fmt, ...); @@ -738,7 +737,7 @@ extern void mi_set_index_cond_func(MI_INFO *info, index_cond_func_t check_func, void *func_arg); extern void mi_set_rowid_filter_func(MI_INFO *info, rowid_filter_func_t check_func, - rowid_filter_func_t is_active_func, + rowid_filter_is_active_func_t is_active_func, void *func_arg); int flush_blocks(HA_CHECK *param, KEY_CACHE *key_cache, File file, ulonglong *dirty_part_map); diff --git a/storage/rocksdb/ha_rocksdb.cc b/storage/rocksdb/ha_rocksdb.cc index ca7880779e8..1f4b53029b8 100644 --- a/storage/rocksdb/ha_rocksdb.cc +++ b/storage/rocksdb/ha_rocksdb.cc @@ -8680,17 +8680,18 @@ int ha_rocksdb::find_icp_matching_index_rec(const bool move_forward, return err; } - const enum icp_result icp_status= handler_index_cond_check(this); - if (icp_status == ICP_NO_MATCH) { + const check_result_t icp_status= handler_index_cond_check(this); + if (icp_status == CHECK_NEG) { rocksdb_smart_next(!move_forward, m_scan_it); continue; /* Get the next (or prev) index tuple */ } - else if (icp_status == ICP_OUT_OF_RANGE || icp_status == ICP_ABORTED_BY_USER) { + else if (icp_status == CHECK_OUT_OF_RANGE || + icp_status == CHECK_ABORTED_BY_USER) { /* We have walked out of range we are scanning */ table->status = STATUS_NOT_FOUND; return HA_ERR_END_OF_FILE; } - else /* icp_status == ICP_MATCH */ + else /* icp_status == CHECK_POS */ { /* Index Condition is satisfied. We have rc==0, proceed to fetch the * row. */ diff --git a/storage/tokudb/ha_tokudb.cc b/storage/tokudb/ha_tokudb.cc index 67888216849..b8b4d86ce1c 100644 --- a/storage/tokudb/ha_tokudb.cc +++ b/storage/tokudb/ha_tokudb.cc @@ -5223,10 +5223,10 @@ static int smart_dbt_bf_callback( info->key_to_compare); } -enum icp_result ha_tokudb::toku_handler_index_cond_check( +check_result_t ha_tokudb::toku_handler_index_cond_check( Item* pushed_idx_cond) { - enum icp_result res; + check_result_t res; if (end_range) { int cmp; #ifdef MARIADB_BASE_VERSION @@ -5235,10 +5235,10 @@ enum icp_result ha_tokudb::toku_handler_index_cond_check( cmp = compare_key_icp(end_range); #endif if (cmp > 0) { - return ICP_OUT_OF_RANGE; + return CHECK_OUT_OF_RANGE; } } - res = pushed_idx_cond->val_int() ? ICP_MATCH : ICP_NO_MATCH; + res = pushed_idx_cond->val_int() ? CHECK_POS : CHECK_NEG; return res; } @@ -5278,19 +5278,19 @@ int ha_tokudb::fill_range_query_buf( if (toku_pushed_idx_cond && (tokudb_active_index == toku_pushed_idx_cond_keyno)) { unpack_key(buf, key, tokudb_active_index); - enum icp_result result = + check_result_t result = toku_handler_index_cond_check(toku_pushed_idx_cond); // If we have reason to stop, we set icp_went_out_of_range and get out // otherwise, if we simply see that the current key is no match, // we tell the cursor to continue and don't store // the key locally - if (result == ICP_OUT_OF_RANGE || thd_kill_level(thd)) { + if (result == CHECK_OUT_OF_RANGE || thd_kill_level(thd)) { icp_went_out_of_range = true; error = 0; DEBUG_SYNC(ha_thd(), "tokudb_icp_asc_scan_out_of_range"); goto cleanup; - } else if (result == ICP_NO_MATCH) { + } else if (result == CHECK_NEG) { // Optimizer change for MyRocks also benefits us here in TokuDB as // opt_range.cc QUICK_SELECT::get_next now sets end_range during // descending scan. We should not ever hit this condition, but diff --git a/storage/tokudb/ha_tokudb.h b/storage/tokudb/ha_tokudb.h index fb1d2cd7a67..d74c99a5f8b 100644 --- a/storage/tokudb/ha_tokudb.h +++ b/storage/tokudb/ha_tokudb.h @@ -1027,7 +1027,7 @@ private: int get_next(uchar* buf, int direction, DBT* key_to_compare, bool do_key_read); int read_data_from_range_query_buff(uchar* buf, bool need_val, bool do_key_read); // for ICP, only in MariaDB and MySQL 5.6 - enum icp_result toku_handler_index_cond_check(Item* pushed_idx_cond); + check_result_t toku_handler_index_cond_check(Item* pushed_idx_cond); void invalidate_bulk_fetch(); void invalidate_icp(); int delete_all_rows_internal(); From 6b521ac003bbfaa346814b28fe652060c8638658 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 8 May 2020 01:52:31 +0200 Subject: [PATCH 10/18] MDEV-22180 Planner opens unnecessary tables when updated table is referenced by foreign keys under LOCK TABLES we still have to open everything, otherwise DML prelocking will try to take an MDL on a table that wasn't in the LOCK TABLES list. --- mysql-test/suite/innodb/r/foreign-keys.result | 28 +++++++++++++++++++ mysql-test/suite/innodb/t/foreign-keys.test | 21 +++++++++++++- sql/sql_base.cc | 9 ++++++ 3 files changed, 57 insertions(+), 1 deletion(-) diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result index 3778dd082c7..d76f01f7095 100644 --- a/mysql-test/suite/innodb/r/foreign-keys.result +++ b/mysql-test/suite/innodb/r/foreign-keys.result @@ -144,4 +144,32 @@ show status like '%opened_tab%'; Variable_name Value Opened_table_definitions 1 Opened_tables 1 +flush tables; +flush status; +lock tables t1 write; +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 2 +Opened_tables 2 +insert t1 values (4,4); +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 2 +Opened_tables 2 +unlock tables; +create function foo() returns int +begin +insert t1 values (5,5); +return 5; +end| +flush tables; +flush status; +select foo(); +foo() +5 +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 2 +Opened_tables 2 +drop function foo; drop table t2, t1; diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test index b3293e88676..9f1622d74cd 100644 --- a/mysql-test/suite/innodb/t/foreign-keys.test +++ b/mysql-test/suite/innodb/t/foreign-keys.test @@ -162,7 +162,6 @@ DROP TABLE t1, t2; # # MDEV-22180 Planner opens unnecessary tables when updated table is referenced by foreign keys # -source include/have_innodb.inc; create table t1 (pk int primary key, data int) engine=innodb; insert t1 values (1,1),(2,2),(3,3); @@ -180,4 +179,24 @@ flush status; # neither are parent tables update t2 set t1_pk=11 where t1_pk+1>10; show status like '%opened_tab%'; +# under LOCK TABLES +flush tables; +flush status; +lock tables t1 write; +show status like '%opened_tab%'; +insert t1 values (4,4); +show status like '%opened_tab%'; +unlock tables; +delimiter |; +create function foo() returns int +begin + insert t1 values (5,5); + return 5; +end| +delimiter ;| +flush tables; +flush status; +select foo(); +show status like '%opened_tab%'; +drop function foo; drop table t2, t1; diff --git a/sql/sql_base.cc b/sql/sql_base.cc index 1dbed8c55d1..c092faa986b 100644 --- a/sql/sql_base.cc +++ b/sql/sql_base.cc @@ -5037,10 +5037,19 @@ bool Lock_tables_prelocking_strategy:: handle_table(THD *thd, Query_tables_list *prelocking_ctx, TABLE_LIST *table_list, bool *need_prelocking) { + TABLE_LIST **last= prelocking_ctx->query_tables_last; + if (DML_prelocking_strategy::handle_table(thd, prelocking_ctx, table_list, need_prelocking)) return TRUE; + /* + normally we don't need to open FK-prelocked tables for RESTRICT, + MDL is enough. But under LOCK TABLES we have to open everything + */ + for (TABLE_LIST *tl= *last; tl; tl= tl->next_global) + tl->open_strategy= TABLE_LIST::OPEN_NORMAL; + /* We rely on a caller to check that table is going to be changed. */ DBUG_ASSERT(table_list->lock_type >= TL_WRITE_ALLOW_WRITE); From 530da97c65a8018ef049dfb990df6b98bc5e4ccd Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 8 May 2020 09:14:34 +0200 Subject: [PATCH 11/18] cleanup: foreign-keys.test vs foreign_key.test --- mysql-test/suite/innodb/r/foreign-keys.result | 175 --------------- mysql-test/suite/innodb/r/foreign_key.result | 103 +++++++++ .../suite/innodb/r/foreign_key_debug.result | 60 ++++++ mysql-test/suite/innodb/t/foreign-keys.test | 202 ------------------ mysql-test/suite/innodb/t/foreign_key.test | 130 +++++++++++ .../suite/innodb/t/foreign_key_debug.test | 78 +++++++ 6 files changed, 371 insertions(+), 377 deletions(-) delete mode 100644 mysql-test/suite/innodb/r/foreign-keys.result create mode 100644 mysql-test/suite/innodb/r/foreign_key_debug.result delete mode 100644 mysql-test/suite/innodb/t/foreign-keys.test create mode 100644 mysql-test/suite/innodb/t/foreign_key_debug.test diff --git a/mysql-test/suite/innodb/r/foreign-keys.result b/mysql-test/suite/innodb/r/foreign-keys.result deleted file mode 100644 index d76f01f7095..00000000000 --- a/mysql-test/suite/innodb/r/foreign-keys.result +++ /dev/null @@ -1,175 +0,0 @@ -# -# Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE -# ADD FOREIGN KEY -# -CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT, -PRIMARY KEY (`department_id`)) engine=innodb; -CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT, -`title_reporter_fk` INT, PRIMARY KEY (`title_id`)) engine=innodb; -CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb; -ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES -`people` (`people_id`); -ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people` -(`people_id`); -ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people` -(`people_id`); -drop table title, department, people; -create table t1 (a int primary key, b int) engine=innodb; -create table t2 (c int primary key, d int, -foreign key (d) references t1 (a) on update cascade) engine=innodb; -insert t1 values (1,1),(2,2),(3,3); -insert t2 values (4,1),(5,2),(6,3); -flush table t2 with read lock; -connect con1,localhost,root; -delete from t1 where a=2; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`d`) REFERENCES `t1` (`a`) ON UPDATE CASCADE) -update t1 set a=10 where a=1; -connection default; -unlock tables; -connection con1; -connection default; -lock table t2 write; -connection con1; -delete from t1 where a=2; -connection default; -unlock tables; -connection con1; -ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`d`) REFERENCES `t1` (`a`) ON UPDATE CASCADE) -connection default; -unlock tables; -disconnect con1; -create user foo; -grant select,update on test.t1 to foo; -connect foo,localhost,foo; -update t1 set a=30 where a=3; -disconnect foo; -connection default; -select * from t2; -c d -5 2 -4 10 -6 30 -drop table t2, t1; -drop user foo; -create table t1 (f1 int primary key) engine=innodb; -create table t2 (f2 int primary key) engine=innodb; -create table t3 (f3 int primary key, foreign key (f3) references t2(f2)) engine=innodb; -insert into t1 values (1),(2),(3),(4),(5); -insert into t2 values (1),(2),(3),(4),(5); -insert into t3 values (1),(2),(3),(4),(5); -connect con1,localhost,root; -set debug_sync='alter_table_before_rename_result_table signal g1 wait_for g2'; -alter table t2 add constraint foreign key (f2) references t1(f1) on delete cascade on update cascade; -connection default; -set debug_sync='before_execute_sql_command wait_for g1'; -update t1 set f1 = f1 + 100000 limit 2; -connect con2,localhost,root; -kill query UPDATE; -disconnect con2; -connection default; -ERROR 70100: Query execution was interrupted -set debug_sync='now signal g2'; -connection con1; -show create table t2; -Table Create Table -t2 CREATE TABLE `t2` ( - `f2` int(11) NOT NULL, - PRIMARY KEY (`f2`), - CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`) ON DELETE CASCADE ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=latin1 -disconnect con1; -connection default; -select * from t2 where f2 not in (select f1 from t1); -f2 -select * from t3 where f3 not in (select f2 from t2); -f3 -drop table t3; -drop table t2; -drop table t1; -set debug_sync='reset'; -# -# MDEV-17595 - Server crashes in copy_data_between_tables or -# Assertion `thd->transaction.stmt.is_empty() || -# (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' -# fails in close_tables_for_reopen upon concurrent -# ALTER TABLE and FLUSH -# -CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB; -INSERT INTO t1 VALUES(1),(2); -CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB; -INSERT INTO t2 VALUES(2); -ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE; -DROP TABLE t2, t1; -# -# MDEV-16060 - InnoDB: Failing assertion: ut_strcmp(index->name, key->name) -# -CREATE TABLE t1 (`pk` INT PRIMARY KEY) ENGINE=InnoDB; -CREATE TABLE t2 LIKE t1; -FLUSH TABLES; -SET debug_sync='alter_table_intermediate_table_created SIGNAL ready WAIT_FOR go'; -ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE; -connect con1, localhost, root; -SET debug_sync='now WAIT_FOR ready'; -SET lock_wait_timeout=1; -UPDATE t2 SET pk=10 WHERE pk=1; -ERROR HY000: Lock wait timeout exceeded; try restarting transaction -PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1'; -DEALLOCATE PREPARE stmt; -FLUSH TABLE t2; -SET debug_sync='now SIGNAL go'; -connection default; -disconnect con1; -connection default; -SET debug_sync='reset'; -SHOW OPEN TABLES FROM test; -Database Table In_use Name_locked -DROP TABLE t1, t2; -create table t1 (pk int primary key, data int) engine=innodb; -insert t1 values (1,1),(2,2),(3,3); -create table t2 (t1_pk int, foreign key (t1_pk) references t1 (pk)) engine=innodb; -insert t2 values (1),(2); -insert t2 values (10); -ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_pk`) REFERENCES `t1` (`pk`)) -flush tables; -flush status; -update t1 set data=10 where pk+1>10; -show status like '%opened_tab%'; -Variable_name Value -Opened_table_definitions 1 -Opened_tables 1 -flush tables; -flush status; -update t2 set t1_pk=11 where t1_pk+1>10; -show status like '%opened_tab%'; -Variable_name Value -Opened_table_definitions 1 -Opened_tables 1 -flush tables; -flush status; -lock tables t1 write; -show status like '%opened_tab%'; -Variable_name Value -Opened_table_definitions 2 -Opened_tables 2 -insert t1 values (4,4); -show status like '%opened_tab%'; -Variable_name Value -Opened_table_definitions 2 -Opened_tables 2 -unlock tables; -create function foo() returns int -begin -insert t1 values (5,5); -return 5; -end| -flush tables; -flush status; -select foo(); -foo() -5 -show status like '%opened_tab%'; -Variable_name Value -Opened_table_definitions 2 -Opened_tables 2 -drop function foo; -drop table t2, t1; diff --git a/mysql-test/suite/innodb/r/foreign_key.result b/mysql-test/suite/innodb/r/foreign_key.result index 7098faca0c9..378fe74e14b 100644 --- a/mysql-test/suite/innodb/r/foreign_key.result +++ b/mysql-test/suite/innodb/r/foreign_key.result @@ -130,3 +130,106 @@ ALTER TABLE t1 DROP f3; ALTER TABLE t1 CHANGE f f3 INT; DROP TABLE t1; SET FOREIGN_KEY_CHECKS=1; +# +# Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE +# ADD FOREIGN KEY +# +CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT, +PRIMARY KEY (`department_id`)) engine=innodb; +CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT, +`title_reporter_fk` INT, PRIMARY KEY (`title_id`)) engine=innodb; +CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb; +ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES +`people` (`people_id`); +ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people` +(`people_id`); +ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people` +(`people_id`); +drop table title, department, people; +create table t1 (a int primary key, b int) engine=innodb; +create table t2 (c int primary key, d int, +foreign key (d) references t1 (a) on update cascade) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +insert t2 values (4,1),(5,2),(6,3); +flush table t2 with read lock; +delete from t1 where a=2; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`d`) REFERENCES `t1` (`a`) ON UPDATE CASCADE) +update t1 set a=10 where a=1; +unlock tables; +lock table t2 write; +delete from t1 where a=2; +unlock tables; +ERROR 23000: Cannot delete or update a parent row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`d`) REFERENCES `t1` (`a`) ON UPDATE CASCADE) +unlock tables; +create user foo; +grant select,update on test.t1 to foo; +update t1 set a=30 where a=3; +select * from t2; +c d +5 2 +4 10 +6 30 +drop table t2, t1; +drop user foo; +# +# MDEV-17595 - Server crashes in copy_data_between_tables or +# Assertion `thd->transaction.stmt.is_empty() || +# (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' +# fails in close_tables_for_reopen upon concurrent +# ALTER TABLE and FLUSH +# +CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(1),(2); +CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB; +INSERT INTO t2 VALUES(2); +ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE; +DROP TABLE t2, t1; +create table t1 (pk int primary key, data int) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +create table t2 (t1_pk int, foreign key (t1_pk) references t1 (pk)) engine=innodb; +insert t2 values (1),(2); +insert t2 values (10); +ERROR 23000: Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1_pk`) REFERENCES `t1` (`pk`)) +flush tables; +flush status; +update t1 set data=10 where pk+1>10; +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 1 +Opened_tables 1 +flush tables; +flush status; +update t2 set t1_pk=11 where t1_pk+1>10; +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 1 +Opened_tables 1 +flush tables; +flush status; +lock tables t1 write; +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 2 +Opened_tables 2 +insert t1 values (4,4); +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 2 +Opened_tables 2 +unlock tables; +create function foo() returns int +begin +insert t1 values (5,5); +return 5; +end| +flush tables; +flush status; +select foo(); +foo() +5 +show status like '%opened_tab%'; +Variable_name Value +Opened_table_definitions 2 +Opened_tables 2 +drop function foo; +drop table t2, t1; diff --git a/mysql-test/suite/innodb/r/foreign_key_debug.result b/mysql-test/suite/innodb/r/foreign_key_debug.result new file mode 100644 index 00000000000..741200b62b2 --- /dev/null +++ b/mysql-test/suite/innodb/r/foreign_key_debug.result @@ -0,0 +1,60 @@ +create table t1 (f1 int primary key) engine=innodb; +create table t2 (f2 int primary key) engine=innodb; +create table t3 (f3 int primary key, foreign key (f3) references t2(f2)) engine=innodb; +insert into t1 values (1),(2),(3),(4),(5); +insert into t2 values (1),(2),(3),(4),(5); +insert into t3 values (1),(2),(3),(4),(5); +connect con1,localhost,root; +set debug_sync='alter_table_before_rename_result_table signal g1 wait_for g2'; +alter table t2 add constraint foreign key (f2) references t1(f1) on delete cascade on update cascade; +connection default; +set debug_sync='before_execute_sql_command wait_for g1'; +update t1 set f1 = f1 + 100000 limit 2; +connect con2,localhost,root; +kill query UPDATE; +disconnect con2; +connection default; +ERROR 70100: Query execution was interrupted +set debug_sync='now signal g2'; +connection con1; +show create table t2; +Table Create Table +t2 CREATE TABLE `t2` ( + `f2` int(11) NOT NULL, + PRIMARY KEY (`f2`), + CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`f2`) REFERENCES `t1` (`f1`) ON DELETE CASCADE ON UPDATE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=latin1 +disconnect con1; +connection default; +select * from t2 where f2 not in (select f1 from t1); +f2 +select * from t3 where f3 not in (select f2 from t2); +f3 +drop table t3; +drop table t2; +drop table t1; +set debug_sync='reset'; +# +# MDEV-16060 - InnoDB: Failing assertion: ut_strcmp(index->name, key->name) +# +CREATE TABLE t1 (`pk` INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 LIKE t1; +FLUSH TABLES; +SET debug_sync='alter_table_intermediate_table_created SIGNAL ready WAIT_FOR go'; +ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE; +connect con1, localhost, root; +SET debug_sync='now WAIT_FOR ready'; +SET lock_wait_timeout=1; +UPDATE t2 SET pk=10 WHERE pk=1; +ERROR HY000: Lock wait timeout exceeded; try restarting transaction +PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1'; +DEALLOCATE PREPARE stmt; +FLUSH TABLE t2; +SET debug_sync='now SIGNAL go'; +connection default; +disconnect con1; +connection default; +SET debug_sync='reset'; +SHOW OPEN TABLES FROM test; +Database Table In_use Name_locked +DROP TABLE t1, t2; diff --git a/mysql-test/suite/innodb/t/foreign-keys.test b/mysql-test/suite/innodb/t/foreign-keys.test deleted file mode 100644 index 9f1622d74cd..00000000000 --- a/mysql-test/suite/innodb/t/foreign-keys.test +++ /dev/null @@ -1,202 +0,0 @@ ---source include/have_innodb.inc ---source include/have_debug.inc ---source include/have_debug_sync.inc - ---enable_connect_log - ---echo # ---echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE ---echo # ADD FOREIGN KEY ---echo # - -CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT, -PRIMARY KEY (`department_id`)) engine=innodb; - -CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT, -`title_reporter_fk` INT, PRIMARY KEY (`title_id`)) engine=innodb; - -CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb; - -ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES -`people` (`people_id`); - -ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people` -(`people_id`); - -ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people` -(`people_id`); - -drop table title, department, people; - -# -# FK and prelocking: -# child table accesses (reads and writes) wait for locks. -# -create table t1 (a int primary key, b int) engine=innodb; -create table t2 (c int primary key, d int, - foreign key (d) references t1 (a) on update cascade) engine=innodb; -insert t1 values (1,1),(2,2),(3,3); -insert t2 values (4,1),(5,2),(6,3); -flush table t2 with read lock; # this takes MDL_SHARED_NO_WRITE -connect (con1,localhost,root); ---error ER_ROW_IS_REFERENCED_2 -delete from t1 where a=2; -send update t1 set a=10 where a=1; -connection default; -let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; -source include/wait_condition.inc; -unlock tables; -connection con1; -reap; -connection default; -lock table t2 write; # this takes MDL_SHARED_NO_READ_WRITE -connection con1; -send delete from t1 where a=2; -connection default; -let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; -source include/wait_condition.inc; -unlock tables; -connection con1; ---error ER_ROW_IS_REFERENCED_2 -reap; -connection default; -unlock tables; -disconnect con1; - -# but privileges should not be checked -create user foo; -grant select,update on test.t1 to foo; -connect(foo,localhost,foo); -update t1 set a=30 where a=3; -disconnect foo; -connection default; -select * from t2; -drop table t2, t1; -drop user foo; - -# -# MDEV-16465 Invalid (old?) table or database name or hang in ha_innobase::delete_table and log semaphore wait upon concurrent DDL with foreign keys -# -create table t1 (f1 int primary key) engine=innodb; -create table t2 (f2 int primary key) engine=innodb; -create table t3 (f3 int primary key, foreign key (f3) references t2(f2)) engine=innodb; -insert into t1 values (1),(2),(3),(4),(5); -insert into t2 values (1),(2),(3),(4),(5); -insert into t3 values (1),(2),(3),(4),(5); -connect con1,localhost,root; -set debug_sync='alter_table_before_rename_result_table signal g1 wait_for g2'; -send alter table t2 add constraint foreign key (f2) references t1(f1) on delete cascade on update cascade; -connection default; -let $conn=`select connection_id()`; -set debug_sync='before_execute_sql_command wait_for g1'; -send update t1 set f1 = f1 + 100000 limit 2; -connect con2,localhost,root; -let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock' and info like 'update t1 %'; -source include/wait_condition.inc; ---replace_result $conn UPDATE -eval kill query $conn; -disconnect con2; -connection default; -error ER_QUERY_INTERRUPTED; -reap; -set debug_sync='now signal g2'; -connection con1; -reap; -show create table t2; -disconnect con1; -connection default; -select * from t2 where f2 not in (select f1 from t1); -select * from t3 where f3 not in (select f2 from t2); -drop table t3; -drop table t2; -drop table t1; -set debug_sync='reset'; - - ---echo # ---echo # MDEV-17595 - Server crashes in copy_data_between_tables or ---echo # Assertion `thd->transaction.stmt.is_empty() || ---echo # (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' ---echo # fails in close_tables_for_reopen upon concurrent ---echo # ALTER TABLE and FLUSH ---echo # -CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB; -INSERT INTO t1 VALUES(1),(2); -CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB; -INSERT INTO t2 VALUES(2); -ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE; -DROP TABLE t2, t1; - - ---echo # ---echo # MDEV-16060 - InnoDB: Failing assertion: ut_strcmp(index->name, key->name) ---echo # -CREATE TABLE t1 (`pk` INT PRIMARY KEY) ENGINE=InnoDB; -CREATE TABLE t2 LIKE t1; -FLUSH TABLES; - -SET debug_sync='alter_table_intermediate_table_created SIGNAL ready WAIT_FOR go'; -send ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE; - -connect con1, localhost, root; -SET debug_sync='now WAIT_FOR ready'; -SET lock_wait_timeout=1; # change to 0 in 10.3 ---error ER_LOCK_WAIT_TIMEOUT -UPDATE t2 SET pk=10 WHERE pk=1; -PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1'; -DEALLOCATE PREPARE stmt; -FLUSH TABLE t2; -SET debug_sync='now SIGNAL go'; - -connection default; -reap; - -# Cleanup -disconnect con1; - -connection default; -SET debug_sync='reset'; -SHOW OPEN TABLES FROM test; -DROP TABLE t1, t2; - -# -# MDEV-22180 Planner opens unnecessary tables when updated table is referenced by foreign keys -# - -create table t1 (pk int primary key, data int) engine=innodb; -insert t1 values (1,1),(2,2),(3,3); -create table t2 (t1_pk int, foreign key (t1_pk) references t1 (pk)) engine=innodb; -insert t2 values (1),(2); -error ER_NO_REFERENCED_ROW_2; -insert t2 values (10); -flush tables; -flush status; -# with ON UPDATE RESTRICT child tables are not opened -update t1 set data=10 where pk+1>10; -show status like '%opened_tab%'; -flush tables; -flush status; -# neither are parent tables -update t2 set t1_pk=11 where t1_pk+1>10; -show status like '%opened_tab%'; -# under LOCK TABLES -flush tables; -flush status; -lock tables t1 write; -show status like '%opened_tab%'; -insert t1 values (4,4); -show status like '%opened_tab%'; -unlock tables; -delimiter |; -create function foo() returns int -begin - insert t1 values (5,5); - return 5; -end| -delimiter ;| -flush tables; -flush status; -select foo(); -show status like '%opened_tab%'; -drop function foo; -drop table t2, t1; diff --git a/mysql-test/suite/innodb/t/foreign_key.test b/mysql-test/suite/innodb/t/foreign_key.test index afaeaa073a2..b33fbf60675 100644 --- a/mysql-test/suite/innodb/t/foreign_key.test +++ b/mysql-test/suite/innodb/t/foreign_key.test @@ -158,3 +158,133 @@ ALTER TABLE t1 CHANGE f f3 INT; DROP TABLE t1; SET FOREIGN_KEY_CHECKS=1; + +--echo # +--echo # Bug #19471516 SERVER CRASHES WHEN EXECUTING ALTER TABLE +--echo # ADD FOREIGN KEY +--echo # + +CREATE TABLE `department` (`department_id` INT, `department_people_fk` INT, +PRIMARY KEY (`department_id`)) engine=innodb; + +CREATE TABLE `title` (`title_id` INT, `title_manager_fk` INT, +`title_reporter_fk` INT, PRIMARY KEY (`title_id`)) engine=innodb; + +CREATE TABLE `people` (`people_id` INT, PRIMARY KEY (`people_id`)) engine=innodb; + +ALTER TABLE `department` ADD FOREIGN KEY (`department_people_fk`) REFERENCES +`people` (`people_id`); + +ALTER TABLE `title` ADD FOREIGN KEY (`title_manager_fk`) REFERENCES `people` +(`people_id`); + +ALTER TABLE `title` ADD FOREIGN KEY (`title_reporter_fk`) REFERENCES `people` +(`people_id`); + +drop table title, department, people; + +# +# FK and prelocking: +# child table accesses (reads and writes) wait for locks. +# +create table t1 (a int primary key, b int) engine=innodb; +create table t2 (c int primary key, d int, + foreign key (d) references t1 (a) on update cascade) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +insert t2 values (4,1),(5,2),(6,3); +flush table t2 with read lock; # this takes MDL_SHARED_NO_WRITE +connect (con1,localhost,root); +--error ER_ROW_IS_REFERENCED_2 +delete from t1 where a=2; +send update t1 set a=10 where a=1; +connection default; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; +source include/wait_condition.inc; +unlock tables; +connection con1; +reap; +connection default; +lock table t2 write; # this takes MDL_SHARED_NO_READ_WRITE +connection con1; +send delete from t1 where a=2; +connection default; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock'; +source include/wait_condition.inc; +unlock tables; +connection con1; +--error ER_ROW_IS_REFERENCED_2 +reap; +connection default; +unlock tables; +disconnect con1; + +# but privileges should not be checked +create user foo; +grant select,update on test.t1 to foo; +connect(foo,localhost,foo); +update t1 set a=30 where a=3; +disconnect foo; +connection default; +select * from t2; +drop table t2, t1; +drop user foo; + +--echo # +--echo # MDEV-17595 - Server crashes in copy_data_between_tables or +--echo # Assertion `thd->transaction.stmt.is_empty() || +--echo # (thd->state_flags & Open_tables_state::BACKUPS_AVAIL)' +--echo # fails in close_tables_for_reopen upon concurrent +--echo # ALTER TABLE and FLUSH +--echo # +CREATE TABLE t1 (a INT, KEY(a)) ENGINE=InnoDB; +INSERT INTO t1 VALUES(1),(2); +CREATE TABLE t2 (b INT, KEY(b)) ENGINE=InnoDB; +INSERT INTO t2 VALUES(2); +ALTER TABLE t2 ADD FOREIGN KEY(b) REFERENCES t1(a), LOCK=EXCLUSIVE; +DROP TABLE t2, t1; + +# +# MDEV-22180 Planner opens unnecessary tables when updated table is referenced by foreign keys +# + +create table t1 (pk int primary key, data int) engine=innodb; +insert t1 values (1,1),(2,2),(3,3); +create table t2 (t1_pk int, foreign key (t1_pk) references t1 (pk)) engine=innodb; +insert t2 values (1),(2); +error ER_NO_REFERENCED_ROW_2; +insert t2 values (10); +flush tables; +flush status; +# with ON UPDATE RESTRICT child tables are not opened +update t1 set data=10 where pk+1>10; +show status like '%opened_tab%'; +flush tables; +flush status; +# neither are parent tables +update t2 set t1_pk=11 where t1_pk+1>10; +show status like '%opened_tab%'; +# under LOCK TABLES +flush tables; +flush status; +lock tables t1 write; +show status like '%opened_tab%'; +insert t1 values (4,4); +show status like '%opened_tab%'; +unlock tables; +delimiter |; +create function foo() returns int +begin + insert t1 values (5,5); + return 5; +end| +delimiter ;| +flush tables; +flush status; +select foo(); +show status like '%opened_tab%'; +drop function foo; +drop table t2, t1; + +# +# End of 10.1 tests +# diff --git a/mysql-test/suite/innodb/t/foreign_key_debug.test b/mysql-test/suite/innodb/t/foreign_key_debug.test new file mode 100644 index 00000000000..75d05801b5f --- /dev/null +++ b/mysql-test/suite/innodb/t/foreign_key_debug.test @@ -0,0 +1,78 @@ +--source include/have_innodb.inc +--source include/have_debug.inc +--source include/have_debug_sync.inc + +--enable_connect_log + +# +# MDEV-16465 Invalid (old?) table or database name or hang in ha_innobase::delete_table and log semaphore wait upon concurrent DDL with foreign keys +# +create table t1 (f1 int primary key) engine=innodb; +create table t2 (f2 int primary key) engine=innodb; +create table t3 (f3 int primary key, foreign key (f3) references t2(f2)) engine=innodb; +insert into t1 values (1),(2),(3),(4),(5); +insert into t2 values (1),(2),(3),(4),(5); +insert into t3 values (1),(2),(3),(4),(5); +connect con1,localhost,root; +set debug_sync='alter_table_before_rename_result_table signal g1 wait_for g2'; +send alter table t2 add constraint foreign key (f2) references t1(f1) on delete cascade on update cascade; +connection default; +let $conn=`select connection_id()`; +set debug_sync='before_execute_sql_command wait_for g1'; +send update t1 set f1 = f1 + 100000 limit 2; +connect con2,localhost,root; +let $wait_condition= select 1 from information_schema.processlist where state='Waiting for table metadata lock' and info like 'update t1 %'; +source include/wait_condition.inc; +--replace_result $conn UPDATE +eval kill query $conn; +disconnect con2; +connection default; +error ER_QUERY_INTERRUPTED; +reap; +set debug_sync='now signal g2'; +connection con1; +reap; +show create table t2; +disconnect con1; +connection default; +select * from t2 where f2 not in (select f1 from t1); +select * from t3 where f3 not in (select f2 from t2); +drop table t3; +drop table t2; +drop table t1; +set debug_sync='reset'; + +--echo # +--echo # MDEV-16060 - InnoDB: Failing assertion: ut_strcmp(index->name, key->name) +--echo # +CREATE TABLE t1 (`pk` INT PRIMARY KEY) ENGINE=InnoDB; +CREATE TABLE t2 LIKE t1; +FLUSH TABLES; + +SET debug_sync='alter_table_intermediate_table_created SIGNAL ready WAIT_FOR go'; +send ALTER TABLE t1 ADD FOREIGN KEY(pk) REFERENCES t2(pk) ON UPDATE CASCADE; + +connect con1, localhost, root; +SET debug_sync='now WAIT_FOR ready'; +SET lock_wait_timeout=1; # change to 0 in 10.3 +--error ER_LOCK_WAIT_TIMEOUT +UPDATE t2 SET pk=10 WHERE pk=1; +PREPARE stmt FROM 'UPDATE t2 SET pk=10 WHERE pk=1'; +DEALLOCATE PREPARE stmt; +FLUSH TABLE t2; +SET debug_sync='now SIGNAL go'; + +connection default; +reap; + +# Cleanup +disconnect con1; + +connection default; +SET debug_sync='reset'; +SHOW OPEN TABLES FROM test; +DROP TABLE t1, t2; + +# +# End of 10.1 tests +# From 403dc759d0bc5d045da06fb326cdf59b23084953 Mon Sep 17 00:00:00 2001 From: Vladislav Vaintroub Date: Tue, 5 May 2020 18:10:53 +0200 Subject: [PATCH 12/18] Update WolfSSL Fix WolfSSL build: - Do not build with TLSv1.0,it stopped working,at least with SChannel client - Disable a test that depends on TLSv1.0 - define FP_MAX_BITS always, to fix 32bit builds. - Increase MAX_AES_CTX_SIZE, to fix build on Linux --- extra/wolfssl/user_settings.h.in | 8 ++++++-- extra/wolfssl/wolfssl | 2 +- include/mysql/service_my_crypt.h | 2 +- include/ssl_compat.h | 2 +- mysql-test/suite.pm | 3 +++ 5 files changed, 12 insertions(+), 5 deletions(-) diff --git a/extra/wolfssl/user_settings.h.in b/extra/wolfssl/user_settings.h.in index 65be4542b08..de9d9b5a8d9 100644 --- a/extra/wolfssl/user_settings.h.in +++ b/extra/wolfssl/user_settings.h.in @@ -20,14 +20,18 @@ #define WOLFSSL_AES_COUNTER #define NO_WOLFSSL_STUB #define OPENSSL_ALL -#define WOLFSSL_ALLOW_TLSV10 +#define NO_OLD_TIMEVAL_NAME +/* + FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test + WolfSSL will use more stack space with it, with fastmath +*/ +#define FP_MAX_BITS 16384 #cmakedefine WOLFSSL_AESNI #cmakedefine USE_FAST_MATH #cmakedefine TFM_TIMING_RESISTANT #cmakedefine HAVE_INTEL_RDSEED #cmakedefine USE_INTEL_SPEEDUP -#cmakedefine FP_MAX_BITS @FP_MAX_BITS@ #cmakedefine USE_FAST_MATH #cmakedefine WOLFSSL_X86_64_BUILD diff --git a/extra/wolfssl/wolfssl b/extra/wolfssl/wolfssl index 3f13b49fa31..e116c89a58a 160000 --- a/extra/wolfssl/wolfssl +++ b/extra/wolfssl/wolfssl @@ -1 +1 @@ -Subproject commit 3f13b49fa318fbd3216d7da36d942e7c276d3413 +Subproject commit e116c89a58af750421d82ece13f80516d2bde02e diff --git a/include/mysql/service_my_crypt.h b/include/mysql/service_my_crypt.h index 039125066ca..930d12a7dd1 100644 --- a/include/mysql/service_my_crypt.h +++ b/include/mysql/service_my_crypt.h @@ -45,7 +45,7 @@ extern "C" { /* The max key length of all supported algorithms */ #define MY_AES_MAX_KEY_LENGTH 32 -#define MY_AES_CTX_SIZE 600 +#define MY_AES_CTX_SIZE 640 enum my_aes_mode { MY_AES_ECB, MY_AES_CBC diff --git a/include/ssl_compat.h b/include/ssl_compat.h index cff5f7ef3de..8cc0e6a9a2b 100644 --- a/include/ssl_compat.h +++ b/include/ssl_compat.h @@ -81,8 +81,8 @@ #ifndef HAVE_WOLFSSL #define EVP_MD_CTX_reset(X) EVP_MD_CTX_cleanup(X) -#endif #define EVP_CIPHER_CTX_reset(X) EVP_CIPHER_CTX_cleanup(X) +#endif #define X509_get0_notBefore(X) X509_get_notBefore(X) #define X509_get0_notAfter(X) X509_get_notAfter(X) #endif diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index cb30a3186e5..4cf55e3eac8 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -74,6 +74,9 @@ sub skip_combinations { $skip{'main/ssl_verify_ip.test'} = 'x509v3 support required' unless $openssl_ver ge "1.0.2"; + $skip{'main/tls_version1.test'} = 'No TLSv1.0 support' + if $ssl_lib =~ /WolfSSL/; + %skip; } From 1d1fb13e59a410f4097802be7076c90b1bca695b Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 7 May 2020 16:14:54 +0200 Subject: [PATCH 13/18] update C/C --- libmariadb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmariadb b/libmariadb index ca8f94f727d..2759b87d729 160000 --- a/libmariadb +++ b/libmariadb @@ -1 +1 @@ -Subproject commit ca8f94f727dba19a6ac43691df53fdc829e2124e +Subproject commit 2759b87d72926b7c9b5426437a7c8dd15ff57945 From 5b0df7433d36cc0fa220f3593382908198ad87a3 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 8 May 2020 12:31:33 +0200 Subject: [PATCH 14/18] WolfSSL fixes remove Timeval workaround (not needed anymore). add template workaround. comments. --- extra/wolfssl/user_settings.h.in | 1 + include/violite.h | 4 ++-- mysql-test/suite.pm | 4 ++-- mysys_ssl/my_crypt.cc | 2 ++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/extra/wolfssl/user_settings.h.in b/extra/wolfssl/user_settings.h.in index de9d9b5a8d9..98f05079e05 100644 --- a/extra/wolfssl/user_settings.h.in +++ b/extra/wolfssl/user_settings.h.in @@ -20,6 +20,7 @@ #define WOLFSSL_AES_COUNTER #define NO_WOLFSSL_STUB #define OPENSSL_ALL +#undef WOLFSSL_ALLOW_TLSV10 /* see https://github.com/wolfSSL/wolfssl/issues/2960 */ #define NO_OLD_TIMEVAL_NAME /* FP_MAX_BITS is set high solely to satisfy ssl_8k_key.test diff --git a/include/violite.h b/include/violite.h index 3a163d45976..34f59f2e598 100644 --- a/include/violite.h +++ b/include/violite.h @@ -146,9 +146,9 @@ int vio_getnameinfo(const struct sockaddr *sa, /* Set yaSSL to use same type as MySQL do for socket handles */ typedef my_socket YASSL_SOCKET_T; #define YASSL_SOCKET_T_DEFINED -#define Timeval WOLFSSL_Timeval +#define template _template /* bug in WolfSSL 4.4.0, see also my_crypt.cc */ #include -#undef Timeval +#undef template #include #ifdef DEPRECATED #undef DEPRECATED diff --git a/mysql-test/suite.pm b/mysql-test/suite.pm index 4cf55e3eac8..8ff2e95c083 100644 --- a/mysql-test/suite.pm +++ b/mysql-test/suite.pm @@ -74,8 +74,8 @@ sub skip_combinations { $skip{'main/ssl_verify_ip.test'} = 'x509v3 support required' unless $openssl_ver ge "1.0.2"; - $skip{'main/tls_version1.test'} = 'No TLSv1.0 support' - if $ssl_lib =~ /WolfSSL/; + $skip{'main/tls_version1.test'} = 'https://github.com/wolfSSL/wolfssl/issues/2960' + if $ssl_lib =~ /WolfSSL 4.4.0/; %skip; } diff --git a/mysys_ssl/my_crypt.cc b/mysys_ssl/my_crypt.cc index 02770644259..e512eee9066 100644 --- a/mysys_ssl/my_crypt.cc +++ b/mysys_ssl/my_crypt.cc @@ -18,7 +18,9 @@ #include #include +#define template _template /* bug in WolfSSL 4.4.0, see also violite.h */ #include +#undef template #include #include #include From e84c62d59b8036138998b0e521a47bdde4ac3875 Mon Sep 17 00:00:00 2001 From: Oleksandr Byelkin Date: Fri, 8 May 2020 12:41:45 +0200 Subject: [PATCH 15/18] MDEV-22504: Session tracking return incorrectly long traking data When we move data we should fix buffer string length --- mysql-test/r/mysqltest_tracking_info.result | 18 +++++++++++++++- mysql-test/t/mysqltest_tracking_info.test | 24 ++++++++++++++++++++- sql/session_tracker.cc | 3 ++- 3 files changed, 42 insertions(+), 3 deletions(-) diff --git a/mysql-test/r/mysqltest_tracking_info.result b/mysql-test/r/mysqltest_tracking_info.result index df966ae1d39..16d737dc4e6 100644 --- a/mysql-test/r/mysqltest_tracking_info.result +++ b/mysql-test/r/mysqltest_tracking_info.result @@ -1,3 +1,4 @@ +set @save_session_track_system_variables=@@session_track_system_variables; SELECT @@session.character_set_connection; @@session.character_set_connection latin1 @@ -28,4 +29,19 @@ SET NAMES 'utf8'; # tracking info off once SET NAMES 'big5'; -SET @@session.session_track_system_variables= default; +SET @@session.session_track_system_variables= @save_session_track_system_variables; +# +# MDEV-22504: session tracking return incorrectly long traking data +# +set @save_optimizer_switch=@@optimizer_switch; +SET @@session.session_track_system_variables='optimizer_switch'; +set optimizer_switch='index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off'; +-- Tracker : SESSION_TRACK_SYSTEM_VARIABLES +-- optimizer_switch +-- index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off + +Warnings: +Warning 1681 'engine_condition_pushdown=on' is deprecated and will be removed in a future release +set @@optimizer_switch=@save_optimizer_switch; +SET @@session.session_track_system_variables= @save_session_track_system_variables; +# End of 10.2 tests diff --git a/mysql-test/t/mysqltest_tracking_info.test b/mysql-test/t/mysqltest_tracking_info.test index d31f68b3cbd..da7732b5011 100644 --- a/mysql-test/t/mysqltest_tracking_info.test +++ b/mysql-test/t/mysqltest_tracking_info.test @@ -2,6 +2,9 @@ --source include/no_protocol.inc --source include/not_embedded.inc + +set @save_session_track_system_variables=@@session_track_system_variables; + SELECT @@session.character_set_connection; SET @@session.session_track_system_variables='character_set_connection'; @@ -22,4 +25,23 @@ SET NAMES 'utf8'; SET NAMES 'big5'; --disable_session_track_info -SET @@session.session_track_system_variables= default; +SET @@session.session_track_system_variables= @save_session_track_system_variables; + +--echo # +--echo # MDEV-22504: session tracking return incorrectly long traking data +--echo # + +set @save_optimizer_switch=@@optimizer_switch; + +SET @@session.session_track_system_variables='optimizer_switch'; + +--enable_session_track_info +set optimizer_switch='index_merge=off,index_merge_union=off,index_merge_sort_union=off,index_merge_intersection=off,index_merge_sort_intersection=on,engine_condition_pushdown=on,index_condition_pushdown=off,derived_merge=off,derived_with_keys=off,firstmatch=off,loosescan=off,materialization=off,in_to_exists=off,semijoin=off,partial_match_rowid_merge=off,partial_match_table_scan=off,subquery_cache=off,mrr=on,mrr_cost_based=on,mrr_sort_keys=on,outer_join_with_cache=off,semijoin_with_cache=off,join_cache_incremental=off,join_cache_hashed=off,join_cache_bka=off,optimize_join_buffer_size=on,table_elimination=off,extended_keys=off,exists_to_in=off,orderby_uses_equalities=off,condition_pushdown_for_derived=off'; +--disable_session_track_info + +set @@optimizer_switch=@save_optimizer_switch; + + +SET @@session.session_track_system_variables= @save_session_track_system_variables; + +--echo # End of 10.2 tests diff --git a/sql/session_tracker.cc b/sql/session_tracker.cc index 7538295fcea..b73bd1d1d4a 100644 --- a/sql/session_tracker.cc +++ b/sql/session_tracker.cc @@ -1698,7 +1698,7 @@ void Session_tracker::store(THD *thd, String *buf) if ((size= net_length_size(length)) != 1) { - if (buf->reserve(size - 1, EXTRA_ALLOC)) + if (buf->reserve(size - 1, 0)) { buf->length(start); // it is safer to have 0-length block in case of error return; @@ -1708,6 +1708,7 @@ void Session_tracker::store(THD *thd, String *buf) The 'buf->reserve()' can change the buf->ptr() so we cannot calculate the 'data' earlier. */ + buf->length(buf->length() + (size - 1)); data= (uchar *)(buf->ptr() + start); memmove(data + (size - 1), data, length); } From 7337abd2f7b0104f2a6c862c1829ac3a034d89a2 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Mon, 4 May 2020 23:25:20 +0200 Subject: [PATCH 16/18] MDEV-22123 On RHEL8 mariadb-server is not provided setup alternative name for rhel8/centos8 use correct C/C version when providing mariadb-connector-c and other changes for installation over distro packages to work: dnf install mariadb-server dnf install --allowerasing MariaDB-{server,common,client,shared}*.rpm --- CMakeLists.txt | 10 ++++++---- cmake/cpack_rpm.cmake | 28 ++++++++++++++++++++++++---- cmake/mariadb_connector_c.cmake | 3 +++ 3 files changed, 33 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 1dd28a413df..8412e58b72c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -140,8 +140,6 @@ INCLUDE(mysql_version) INCLUDE(cpack_source_ignore_files) INCLUDE(install_layout) INCLUDE(wsrep) -INCLUDE(cpack_rpm) -INCLUDE(cpack_deb) # Add macros INCLUDE(character_sets) @@ -374,8 +372,6 @@ MYSQL_CHECK_SSL() MYSQL_CHECK_READLINE() SET(MALLOC_LIBRARY "system") -SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang") -MARK_AS_ADVANCED(PYTHON_SHEBANG) CHECK_PCRE() @@ -413,6 +409,12 @@ SET (MYSQLD_STATIC_PLUGIN_LIBS "" CACHE INTERNAL "") INCLUDE(submodules) INCLUDE(mariadb_connector_c) # this does ADD_SUBDIRECTORY(libmariadb) +INCLUDE(cpack_rpm) +INCLUDE(cpack_deb) + +SET(PYTHON_SHEBANG "/usr/bin/env python" CACHE STRING "python shebang") +MARK_AS_ADVANCED(PYTHON_SHEBANG) + # Add storage engines and plugins. CONFIGURE_PLUGINS() diff --git a/cmake/cpack_rpm.cmake b/cmake/cpack_rpm.cmake index d63661b3f1a..5adb8b4496f 100644 --- a/cmake/cpack_rpm.cmake +++ b/cmake/cpack_rpm.cmake @@ -114,12 +114,16 @@ SET(ignored "%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd" "%ignore ${CMAKE_INSTALL_PREFIX}/lib/systemd/system" "%ignore ${CMAKE_INSTALL_PREFIX}/lib/tmpfiles.d" + "%ignore ${CMAKE_INSTALL_PREFIX}/lib/sysusers.d" "%ignore ${CMAKE_INSTALL_PREFIX}/lib64" + "%ignore ${CMAKE_INSTALL_PREFIX}/lib64/pkgconfig" "%ignore ${CMAKE_INSTALL_PREFIX}/sbin" "%ignore ${CMAKE_INSTALL_PREFIX}/share" "%ignore ${CMAKE_INSTALL_PREFIX}/share/aclocal" "%ignore ${CMAKE_INSTALL_PREFIX}/share/doc" "%ignore ${CMAKE_INSTALL_PREFIX}/share/man" + "%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man1" + "%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man8" "%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man1*" "%ignore ${CMAKE_INSTALL_PREFIX}/share/man/man8*" "%ignore ${CMAKE_INSTALL_PREFIX}/share/pkgconfig" @@ -192,9 +196,10 @@ SET(CPACK_RPM_compat_POST_INSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/ SET(CPACK_RPM_compat_POST_UNINSTALL_SCRIPT_FILE ${CMAKE_SOURCE_DIR}/support-files/rpm/shared-post.sh) MACRO(ALTERNATIVE_NAME real alt) - SET(ver "%{version}-%{release}") - IF (${epoch}) - SET(ver "${epoch}:${ver}") + IF(${ARGC} GREATER 2) + SET(ver ${ARGV2}) + ELSE() + SET(ver "${epoch}%{version}-%{release}") ENDIF() SET(p "CPACK_RPM_${real}_PACKAGE_PROVIDES") @@ -209,17 +214,32 @@ ALTERNATIVE_NAME("test" "mysql-test") # Argh! Different distributions call packages differently, to be a drop-in # replacement we have to fake distribution-specific dependencies +# NOTE, use ALTERNATIVE_NAME when a package has a different name +# in some distribution, it's not for adding new PROVIDES IF(RPM MATCHES "(rhel|centos)6") ALTERNATIVE_NAME("client" "mysql") ELSEIF(RPM MATCHES "fedora" OR RPM MATCHES "(rhel|centos)7") - SET(epoch 1) # this is fedora + SET(epoch 1:) # this is fedora ALTERNATIVE_NAME("client" "mariadb") ALTERNATIVE_NAME("client" "mysql") ALTERNATIVE_NAME("devel" "mariadb-devel") ALTERNATIVE_NAME("server" "mariadb-server") ALTERNATIVE_NAME("server" "mysql-compat-server") ALTERNATIVE_NAME("test" "mariadb-test") +ELSEIF(RPM MATCHES "(rhel|centos)8") + SET(epoch 3:) + ALTERNATIVE_NAME("backup" "mariadb-backup") + ALTERNATIVE_NAME("client" "mariadb") + ALTERNATIVE_NAME("common" "mariadb-common") + ALTERNATIVE_NAME("common" "mariadb-errmsg") + ALTERNATIVE_NAME("server" "mariadb-server") + ALTERNATIVE_NAME("server" "mariadb-server-utils") + ALTERNATIVE_NAME("shared" "mariadb-connector-c" ${MARIADB_CONNECTOR_C_VERSION}-1) + ALTERNATIVE_NAME("shared" "mariadb-connector-c-config" ${MARIADB_CONNECTOR_C_VERSION}-1) + SETA(CPACK_RPM_client_PACKAGE_PROVIDES "mariadb-galera = 3:%{version}-%{release}") + SETA(CPACK_RPM_common_PACKAGE_PROVIDES "mariadb-galera-common = 3:%{version}-%{release}") + SETA(CPACK_RPM_common_PACKAGE_REQUIRES "MariaDB-shared") ENDIF() IF(RPM MATCHES "fedora31" OR RPM MATCHES "(rhel|centos)8") SET(PYTHON_SHEBANG "/usr/bin/python3" CACHE STRING "python shebang") diff --git a/cmake/mariadb_connector_c.cmake b/cmake/mariadb_connector_c.cmake index 0f08c3464c4..ca0e16c8518 100644 --- a/cmake/mariadb_connector_c.cmake +++ b/cmake/mariadb_connector_c.cmake @@ -42,3 +42,6 @@ ADD_SUBDIRECTORY(libmariadb) IF(TARGET caching_sha2_password AND CMAKE_C_FLAGS_DEBUG MATCHES "-Werror") SET_PROPERTY(TARGET caching_sha2_password APPEND_STRING PROPERTY COMPILE_FLAGS -Wno-unused-function) ENDIF() + +GET_DIRECTORY_PROPERTY(MARIADB_CONNECTOR_C_VERSION DIRECTORY libmariadb DEFINITION CPACK_PACKAGE_VERSION) +MESSAGE1(MARIADB_CONNECTOR_C_VERSION "MariaDB Connector/C ${MARIADB_CONNECTOR_C_VERSION}") From 54ba541b649d7b498c7369a97a7a9afba256e0b8 Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Tue, 5 May 2020 21:15:37 +0300 Subject: [PATCH 17/18] List of unstable tests for 10.3.23 release --- mysql-test/unstable-tests | 439 +++++++++++++++++++++----------------- 1 file changed, 242 insertions(+), 197 deletions(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index 07b4db37504..c66ac9c625e 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,143 +23,155 @@ # ############################################################################## # -# Based on bb-10.3-release e10e922afd138aec491c646682f4989922527cfb +# Based on bb-10.3-release 8648b9bed86e9f52c027daec760d6ab5ce52e889 -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.cache_temporal_4265 : Modified in 10.3.22 -main.connect : MDEV-17282 - Wrong result -main.connect2 : MDEV-13885 - Server crash -main.connect_debug : Modified in 10.3.22 -main.count_distinct2 : MDEV-11768 - timeout -main.create_delayed : MDEV-10605 - failed with timeout -main.create_drop_event : MDEV-16271 - Wrong result -main.create_or_replace2 : Modified in 10.3.22 -main.cte_nonrecursive : Modified in 10.3.22 -main.ctype_ucs : MDEV-17681 - Data too long for column -main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade -main.ctype_utf16 : MDEV-10675: timeout or extra warnings -main.ctype_utf16le : MDEV-10675: timeout or extra warnings -main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison -main.debug_sync : MDEV-10607 - internal error -main.default_session : Modified in 10.3.22 -main.delete_use_source : Modified in 10.3.22 -main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.3.22 -main.derived_opt : MDEV-11768 - timeout -main.dirty_close : MDEV-19368 - mysqltest failed but provided no output -main.distinct : MDEV-14194 - Crash -main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.3.22 -main.dyncol : MDEV-19455 - Extra warning -main.engine_error_in_alter-8453 : Modified in 10.3.22 -main.error_simulation : Modified in 10.3.22 -main.events_2 : MDEV-13277 - Crash -main.events_bugs : MDEV-12892 - Crash; modified in 10.3.22 -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.foreign_key : Modified in 10.3.22 -main.func_math : MDEV-20532 - Floating point differences -main.func_misc : Modified in 10.3.22 -main.func_regexp_pcre : Modified in 10.3.22 -main.func_regexp_pcre_debug : Modified in 10.3.22 -main.func_time : Modified in 10.3.22 -main.gis : MDEV-13411 - wrong result on P8 -main.gis_notembedded : MDEV-21264 - Wrong result with different default charset -main.group_by : Modified in 10.3.22 -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 - Plan mismatch -main.innodb_mysql_lock : MDEV-7861 - Wrong result -main.insert_debug : Added in 10.3.22 -main.join : Modified in 10.3.22 -main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.3.22 -main.kill-2 : MDEV-13257 - Wrong result -main.kill_processlist-6619 : MDEV-10793 - Wrong result -main.loaddata : MDEV-19368 - mysqltest failed but provided no output -main.locale : MDEV-20521 - Missing warning -main.log_slow : MDEV-13263 - Wrong result -main.log_slow_debug : Modified in 10.3.22 -main.log_tables-big : MDEV-13408 - wrong result -main.mdev-504 : MDEV-15171 - warning -main.mdev375 : MDEV-10607 - sporadic "can't connect" -main.mdev6830 : Modified in 10.3.22 -main.merge : MDEV-10607 - sporadic "can't connect" -main.merge-big : Modified in 10.3.22 -main.merge_debug : Modified in 10.3.22 -main.multi_update_debug : MDEV-20136 - Debug sync point wait timed out -main.myisam_debug : Modified in 10.3.22 -main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2 -main.mysql_client_test_comp : MDEV-16641 - Error in exec -main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed -main.mysql_upgrade_noengine : MDEV-14355 - Wrong result -main.mysqld_option_err : MDEV-21236 - Wrong error; MDEV-21571 - Crash on bootstrap -main.mysqldump : MDEV-14800 - Stack smashing detected -main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug -main.mysqlslap : MDEV-11801 - timeout -main.mysqltest : MDEV-13887 - Wrong result -main.old-mode : MDEV-19373 - Wrong result -main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.opt_tvc : Modified in 10.3.22 -main.order_by : Modified in 10.3.21 -main.order_by_optimizer_innodb : MDEV-10683 - Wrong result -main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock -main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings -main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 -main.partition_mrr_aria : Added in 10.3.21 -main.partition_mrr_innodb : Added in 10.3.21 -main.partition_mrr_myisam : Added in 10.3.21 -main.partition_pruning : Modified in 10.3.21 -main.pool_of_threads : MDEV-18135 - SSL error: key too small -main.ps : MDEV-11017 - Sporadic wrong Prepared_stmt_count -main.query_cache : MDEV-16180 - Wrong result -main.query_cache_debug : MDEV-15281 - Query cache is disabled -main.range_innodb : Modified in 10.3.22 -main.range_interrupted-13751 : Modified in 10.3.22 -main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away -main.select : MDEV-20532 - Floating point differences -main.select_debug : Modified in 10.3.22 -main.select_jcl6 : MDEV-20532 - Floating point differences -main.select_pkeycache : MDEV-20532 - Floating point differences -main.selectivity : Modified in 10.3.21 -main.set_statement : MDEV-13183 - Wrong result -main.set_statement_notembedded : MDEV-19414 - Wrong result -main.shm : MDEV-12727 - Mismatch, ERROR 2013 -main.show_explain : MDEV-10674 - Wrong result code; modified in 10.3.22 -main.show_explain_non_select : Modified in 10.3.22 -main.show_explain_ps : Modified in 10.3.22 -main.slowlog_enospace-10508 : Modified in 10.3.22 -main.sp : MDEV-7866 - Mismatch -main.sp-security : MDEV-10607 - sporadic "can't connect" -main.sp_notembedded : MDEV-10607 - internal error -main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.ssl_7937 : Modified in 10.3.22 -main.ssl_8k_key : Modified in 10.3.22 -main.ssl_ca : MDEV-10895 - SSL connection error on Power -main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 -main.ssl_crl : MDEV-19119 - Wrong error code; modified in 10.3.21 -main.ssl_crl_clients : Modified in 10.3.22 -main.ssl_system_ca : Added in 10.3.22 -main.ssl_timeout : MDEV-11244 - Crash -main.stat_tables-enospc : Modified in 10.3.22 -main.stat_tables_par : MDEV-13266 - Wrong result -main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding -main.status : MDEV-13255 - Wrong result -main.subselect : MDEV-20551 - Valgrind failure -main.subselect_innodb : MDEV-10614 - Wrong result -main.tc_heuristic_recover : MDEV-14189 - Wrong result -main.type_blob : MDEV-15195 - Wrong result -main.type_datetime : Modified in 10.3.22 -main.type_datetime_hires : MDEV-10687 - Timeout -main.type_float : MDEV-20532 - Floating point differences -main.type_int : Modified in 10.3.22 -main.type_time : Modified in 10.3.22 -main.union_crash-714 : Modified in 10.3.22 -main.userstat : MDEV-12904 - SSL errors -main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query -main.warnings_debug : Modified in 10.3.22 -main.win : Modified in 10.3.22 -main.xa : MDEV-11769 - lock wait timeout +main.alter_table_trans : MDEV-12084 - timeout +main.alter_user : Modified in 10.3.23 +main.analyze_stmt_slow_query_log : MDEV-12237 - Wrong result +main.auth_named_pipe : MDEV-14724 - System error 2 +main.cache_temporal_4265 : Modified in 10.3.22 +main.column_compression : Modified in 10.3.23 +main.connect : MDEV-17282 - Wrong result +main.connect2 : MDEV-13885 - Server crash +main.connect_debug : Modified in 10.3.22 +main.count_distinct2 : MDEV-11768 - timeout +main.create_delayed : MDEV-10605 - failed with timeout +main.create_drop_event : MDEV-16271 - Wrong result +main.create_or_replace2 : Modified in 10.3.22 +main.cte_nonrecursive : Modified in 10.3.23 +main.ctype_ucs : MDEV-17681 - Data too long for column +main.ctype_upgrade : MDEV-16945 - Error upon mysql_upgrade +main.ctype_utf16 : MDEV-10675: timeout or extra warnings +main.ctype_utf16le : MDEV-10675: timeout or extra warnings +main.ctype_utf8mb4_innodb : MDEV-17744 - Timeout; MDEV-18567 - ASAN use-after-poison +main.debug_sync : MDEV-10607 - internal error +main.default_session : Modified in 10.3.22 +main.delete_use_source : Modified in 10.3.22 +main.derived_cond_pushdown : MDEV-20532 - Floating point differences; modified in 10.3.23 +main.derived_opt : MDEV-11768 - timeout +main.dirty_close : MDEV-19368 - mysqltest failed but provided no output +main.distinct : MDEV-14194 - Crash +main.drop_bad_db_type : MDEV-15676 - Wrong result; modified in 10.3.22 +main.dyncol : MDEV-19455 - Extra warning +main.engine_error_in_alter-8453 : Modified in 10.3.22 +main.error_simulation : Modified in 10.3.22 +main.errors : Modified in 10.3.23 +main.events_2 : MDEV-13277 - Crash +main.events_bugs : MDEV-12892 - Crash; modified in 10.3.22 +main.events_restart : MDEV-12236 - Server shutdown problem; modified in 10.3.23 +main.events_slowlog : MDEV-12821 - Wrong result +main.flush : MDEV-19368 - mysqltest failed but provided no output +main.foreign_key : Modified in 10.3.22 +main.fulltext : Modified in 10.3.23 +main.func_math : MDEV-20532 - Floating point differences; modified in 10.3.23 +main.func_misc : Modified in 10.3.22 +main.func_regexp_pcre : Modified in 10.3.22 +main.func_regexp_pcre_debug : Modified in 10.3.22 +main.func_time : Modified in 10.3.22 +main.gis : MDEV-13411 - wrong result on P8; modified in 10.3.23 +main.gis-rtree : Modified in 10.3.23 +main.gis_notembedded : MDEV-21264 - Wrong result with different default charset +main.grant5 : Modified in 10.3.23 +main.group_by : Modified in 10.3.23 +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 - Plan mismatch +main.index_merge_myisam : Modified in 10.3.23 +main.innodb_mysql_lock : Modified in 10.3.23 +main.insert_debug : Added in 10.3.22 +main.invisible_field_grant_completely : MDEV-22254 - Syscall param write points to uninitialised bytes +main.join : Modified in 10.3.23 +main.join_cache : MDEV-17743 - Bad address from storage engine MyISAM; modified in 10.3.22 +main.key : Modified in 10.3.23 +main.kill-2 : MDEV-13257 - Wrong result +main.kill_processlist-6619 : MDEV-10793 - Wrong result +main.loaddata : MDEV-19368 - mysqltest failed but provided no output +main.locale : MDEV-20521 - Missing warning; configuration added in 10.3.23 +main.log_slow : MDEV-13263 - Wrong result +main.log_slow_debug : Modified in 10.3.22 +main.log_tables-big : MDEV-13408 - wrong result +main.mdev-504 : MDEV-15171 - warning +main.mdev375 : MDEV-10607 - sporadic "can't connect"; modified in 10.3.23 +main.mdev6830 : Modified in 10.3.22 +main.merge : MDEV-10607 - sporadic "can't connect" +main.merge-big : Modified in 10.3.22 +main.merge_debug : Modified in 10.3.22 +main.multi_update : Modified in 10.3.23 +main.multi_update_debug : Modified in 10.3.23 +main.myisam_debug : Modified in 10.3.22 +main.mysql_client_test : MDEV-19369 - error: 5888, status: 23, errno: 2; modified in 10.2.32 +main.mysql_client_test_comp : MDEV-16641 - Error in exec +main.mysql_client_test_nonblock : CONC-208 - Error on Power; MDEV-15096 - exec failed +main.mysql_upgrade_noengine : MDEV-14355 - Wrong result +main.mysqld--defaults-file : Modified in 10.3.23 +main.mysqld_option_err : MDEV-21236 - Wrong error; MDEV-21571 - Crash on bootstrap +main.mysqldump : MDEV-22147 - Wrong result; MDEV-14800 - Stack smashing detected; modified in 10.3.23 +main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug +main.mysqlslap : MDEV-11801 - timeout +main.mysqltest : MDEV-13887 - Wrong result +main.old-mode : MDEV-19373 - Wrong result +main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.opt_tvc : Modified in 10.3.22 +main.order_by_optimizer_innodb : MDEV-10683 - Wrong result +main.partition_alter : Modified in 10.3.23 +main.partition_debug_sync : MDEV-15669 - Deadlock found when trying to get lock +main.partition_innodb : Modified in 10.3.23 +main.partition_innodb_plugin : MDEV-12901 - Valgrind warnings +main.partition_innodb_semi_consistent : MDEV-19411 - Failed to start mysqld.1 +main.partition_mrr_aria : Include file modified in 10.3.23 +main.partition_mrr_innodb : Include file modified in 10.3.23 +main.partition_mrr_myisam : Modified in 10.3.23 +main.partition_range : Modified in 10.3.23 +main.pool_of_threads : MDEV-18135 - SSL error: key too small +main.ps : MDEV-11017 - Sporadic wrong Prepared_stmt_count +main.query_cache : MDEV-16180 - Wrong result +main.query_cache_debug : MDEV-15281 - Query cache is disabled +main.range : Modified in 10.3.23 +main.range_innodb : Modified in 10.3.23 +main.range_interrupted-13751 : Modified in 10.3.22 +main.range_vs_index_merge_innodb : MDEV-15283 - Server has gone away +main.rpl_mysql_upgrade_slave_repo_check : Added in 10.3.23 +main.select : MDEV-20532 - Floating point differences +main.select_debug : Modified in 10.3.22 +main.select_jcl6 : MDEV-20532 - Floating point differences +main.select_pkeycache : MDEV-20532 - Floating point differences +main.set_statement : MDEV-13183 - Wrong result +main.set_statement_notembedded : MDEV-19414 - Wrong result +main.shm : MDEV-12727 - Mismatch, ERROR 2013 +main.show_explain : MDEV-10674 - Wrong result code; modified in 10.3.22 +main.show_explain_non_select : Modified in 10.3.22 +main.show_explain_ps : Modified in 10.3.22 +main.slowlog_enospace-10508 : Modified in 10.3.22 +main.sp : MDEV-7866 - Mismatch +main.sp-security : MDEV-10607 - sporadic "can't connect" +main.sp_notembedded : MDEV-10607 - internal error +main.ssl : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.ssl_7937 : Modified in 10.3.22 +main.ssl_8k_key : Modified in 10.3.22 +main.ssl_ca : MDEV-10895 - SSL connection error on Power +main.ssl_cipher : MDEV-17184 - Failures with OpenSSL 1.1.1 +main.ssl_crl_clients : Modified in 10.3.22 +main.ssl_system_ca : Added in 10.3.22 +main.ssl_timeout : MDEV-11244 - Crash +main.stat_tables-enospc : Modified in 10.3.22 +main.stat_tables_par : MDEV-13266 - Wrong result +main.stat_tables_par_innodb : MDEV-14155 - Wrong rounding +main.status : MDEV-13255 - Wrong result +main.subselect : MDEV-20551 - Valgrind failure +main.subselect_innodb : MDEV-10614 - Wrong result +main.tc_heuristic_recover : MDEV-14189 - Wrong result +main.type_blob : MDEV-15195 - Wrong result +main.type_datetime : Modified in 10.3.22 +main.type_datetime_hires : MDEV-10687 - Timeout +main.type_float : MDEV-20532 - Floating point differences +main.type_int : Modified in 10.3.22 +main.type_time : Modified in 10.3.22 +main.union_crash-714 : Modified in 10.3.22 +main.userstat : MDEV-12904 - SSL errors +main.wait_timeout : MDEV-19023 - Lost connection to MySQL server during query +main.warnings_debug : Modified in 10.3.22 +main.win : Modified in 10.3.22 +main.xa : MDEV-11769 - lock wait timeout #----------------------------------------------------------------------- @@ -176,7 +188,7 @@ archive-test_sql_discovery.discover : MDEV-16817 - Table marked as crashed binlog.binlog_commit_wait : MDEV-10150 - Mismatch binlog.binlog_index : Include file modified in 10.2.31 -binlog.binlog_invalid_read_in_rotate : Added in 10.3.22 +binlog.binlog_invalid_read_in_rotate : MDEV-22455 - Server crash; added in 10.3.22 binlog.binlog_ioerr : Include file modified in 10.2.31 binlog.binlog_killed : MDEV-12925 - Wrong result binlog.binlog_max_extension : MDEV-19762 - Crash on shutdown @@ -184,7 +196,7 @@ binlog.binlog_mysqlbinlog_row_innodb : MDEV-20530 - Binary files dif binlog.binlog_mysqlbinlog_row_myisam : MDEV-20530 - Binary files differ binlog.binlog_parallel_replication_marks_row : Include file modified in 10.3.22 binlog.binlog_parallel_replication_marks_stm_mix : Include file modified in 10.3.22 -binlog.binlog_show_binlog_event_random_pos : Added in 10.3.22 +binlog.binlog_show_binlog_event_random_pos : MDEV-22473 - Server crash; added in 10.3.22 binlog.binlog_write_error : Include file Include file modified in 10.2.31 binlog.binlog_xa_recover : MDEV-8517 - Extra checkpoint binlog.flashback-largebinlog : MDEV-19764 - Out of memory @@ -201,15 +213,15 @@ binlog_encryption.encrypted_master_switch_to_unencrypted : MDEV-14190 - Can't in binlog_encryption.encrypted_slave : MDEV-18135 - SSL error: key too small binlog_encryption.encryption_combo : MDEV-14199 - Table is marked as crashed binlog_encryption.multisource : MDEV-21289 - Wrong error code -binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash +binlog_encryption.rpl_binlog_errors : MDEV-12742 - Crash; include file include file modified in 10.3.23 binlog_encryption.rpl_checksum : MDEV-16951 - Wrong result; include file modified in 10.3.22 -binlog_encryption.rpl_corruption : Include file modified in 10.3.22 +binlog_encryption.rpl_corruption : Include file modified in 10.3.23 binlog_encryption.rpl_gtid_basic : MDEV-16947 - Server failed to start -binlog_encryption.rpl_incident : Include file modified in 10.3.22 +binlog_encryption.rpl_incident : MDEV-21569 - mutex: LOCK_global_system_variables unlocking; include file modified in 10.3.22 binlog_encryption.rpl_init_slave_errors : Include file modified in 10.3.22 binlog_encryption.rpl_loadfile : MDEV-16645 - Timeout in include binlog_encryption.rpl_parallel : MDEV-10653 - Timeout in include; include file modified in 10.3.22 -binlog_encryption.rpl_parallel_ignored_errors : Include file modified in 10.3.22 +binlog_encryption.rpl_parallel_ignored_errors : MDEV-22471 - Slave crash; include file modified in 10.3.22 binlog_encryption.rpl_relayrotate : MDEV-15194 - Timeout binlog_encryption.rpl_semi_sync : MDEV-11673 - Valgrind binlog_encryption.rpl_skip_replication : MDEV-13571 - Unexpected warning; MDEV-20573 - Wrong result @@ -243,6 +255,10 @@ connect.zip : MDEV-13884 - Wrong result #----------------------------------------------------------------------- +disks.disks_notembedded : MDEV-21587 - Wrong result + +#----------------------------------------------------------------------- + encryption.create_or_replace : MDEV-16115 - Trying to access tablespace encryption.debug_key_management : MDEV-13841 - Timeout encryption.encrypt_and_grep : MDEV-13765 - Wrong result @@ -264,7 +280,7 @@ encryption.innodb_encrypt_key_rotation_age : MDEV-19763 - Timeout encryption.innodb_encrypt_log : MDEV-13725 - Wrong result encryption.innodb_encrypt_log_corruption : MDEV-14379 - Server crash encryption.innodb_encrypt_temporary_tables : MDEV-20142 - Wrong result -encryption.innodb_encryption : MDEV-15675 - Timeout +encryption.innodb_encryption : MDEV-14728 - Unable to get certificate; MDEV-15675 - Timeout encryption.innodb_encryption-page-compression : MDEV-12630 - crash or assertion failure encryption.innodb_encryption_discard_import : MDEV-16116 - Wrong result encryption.innodb_encryption_filekeys : MDEV-15673 - Timeout @@ -279,7 +295,8 @@ encryption.innodb_scrub_compressed : MDEV-8139 - scrubbing tests n #----------------------------------------------------------------------- -engines/funcs.* : Not maintained in timely manner +engines/funcs.* : Not maintained in timely manner +engines/funcs.rpl_row_until : MDEV-22474 - Warning, slaves cannot process events #----------------------------------------------------------------------- @@ -296,7 +313,7 @@ federated.federated_bug_585688 : MDEV-14805 - Server crash, MDEV-12907 - Valgr federated.federated_innodb : MDEV-10617 - Wrong checksum federated.federated_partition : MDEV-10417 - Fails on Mips federated.federated_transactions : MDEV-10617 - Wrong checksum -federated.federatedx : MDEV-10617 - Wrong checksum; modified in 10.3.21 +federated.federatedx : MDEV-10617 - Wrong checksum #----------------------------------------------------------------------- @@ -327,34 +344,41 @@ galera_3nodes.* : Suite is not stable yet gcol.gcol_rollback : MDEV-16954 - Unknown storage engine 'InnoDB' gcol.innodb_virtual_basic : MDEV-16950 - Failing assertion gcol.innodb_virtual_debug : MDEV-19114 - Assertion failure -gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.3.22 +gcol.innodb_virtual_debug_purge : MDEV-16952 - Wrong result; modified in 10.3.23 gcol.innodb_virtual_fk_restart : MDEV-17466 - Assertion failure #----------------------------------------------------------------------- innodb.101_compatibility : MDEV-13891 - Wrong result +innodb.alter_algorithm : Modified in 10.3.23 +innodb.alter_algorithm2 : Added in 10.3.23 innodb.alter_copy : MDEV-16181 - Assertion failure innodb.alter_crash : MDEV-16944 - The process cannot access the file innodb.alter_large_dml : MDEV-20148 - Debug sync point wait timed out +innodb.alter_missing_tablespace : Modified in 10.3.23 innodb.autoinc_persist : MDEV-15282 - Assertion failure innodb.binlog_consistent : MDEV-10618 - Server fails to start innodb.blob-crash : MDEV-20481 - Crash during recovery innodb.blob-update-debug : Modified in 10.3.22 +innodb.buf_pool_resize_oom : Added in 10.3.23 +innodb.corrupted_during_recovery : Modified in 10.3.23 innodb.doublewrite : MDEV-12905 - Server crash +innodb.foreign_key : Modified in 10.3.23 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure -innodb.ibuf_not_empty : MDEV-19021 - Wrong result; modified in 10.3.21 -innodb.innodb-32k-crash : MDEV-20194 - Extra warning; modified in 10.3.21 -innodb.innodb-64k-crash : MDEV-13872 - Failure and crash on startup; modified in 10.3.21 +innodb.ibuf_not_empty : MDEV-19021 - Wrong result +innodb.innodb-32k-crash : MDEV-20194 - Extra warning +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-table : MDEV-10619 - Testcase timeout +innodb.innodb-alter-timestamp : Modified in 10.3.23 innodb.innodb-bigblob : MDEV-18655 - ASAN unknown crash -innodb.innodb-blob : MDEV-12053 - Client crash +innodb.innodb-blob : MDEV-12053 - Client crash; modified in 10.3.23 innodb.innodb-change-buffer-recovery : MDEV-19115 - Lost connection to MySQL server during query innodb.innodb-fk : MDEV-13832 - Assertion failure on shutdown innodb.innodb-get-fk : MDEV-13276 - Server crash innodb.innodb-index-online : MDEV-14809 - Cannot save statistics -innodb.innodb-mdev-7513 : Modified in 10.3.21 +innodb.innodb-online-alter-gis : MDEV-22071 - Uninitialised value innodb.innodb-page_compression_default : MDEV-13644 - Assertion failure innodb.innodb-page_compression_lzma : MDEV-14353 - Wrong result innodb.innodb-page_compression_snappy : MDEV-13644 - Assertion failure @@ -363,10 +387,12 @@ innodb.innodb-page_compression_zip : MDEV-10641 - mutex problem innodb.innodb-replace-debug : Modified in 10.3.22 innodb.innodb-stats-initialize-failure : Modified in 10.3.22 innodb.innodb-table-online : MDEV-13894 - Wrong result -innodb.innodb-wl5522 : MDEV-13644 - Assertion failure -innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno +innodb.innodb-wl5522 : MDEV-13644 - Assertion failure; modified in 10.3.23 +innodb.innodb-wl5522-debug : MDEV-14200 - Wrong errno; modified in 10.3.23 innodb.innodb_buffer_pool_dump_pct : MDEV-20139 - Timeout in wait_condition.inc +innodb.innodb_buffer_pool_load_now : Added in 10.3.23 innodb.innodb_buffer_pool_resize : MDEV-16964 - Assertion failure +innodb.innodb_buffer_pool_resize_debug : Added in 10.3.23 innodb.innodb_buffer_pool_resize_with_chunks : MDEV-16964 - Assertion failure innodb.innodb_bug11754376 : Modified in 10.3.22 innodb.innodb_bug14147491 : MDEV-11808 - Index is corrupt @@ -378,10 +404,11 @@ innodb.innodb_bug56947 : Modified in 10.3.22 innodb.innodb_bug59641 : MDEV-13830 - Assertion failure innodb.innodb_bulk_create_index_replication : MDEV-15273 - Slave failed to start innodb.innodb_corrupt_bit : Modified in 10.3.22 +innodb.innodb_defrag_concurrent : Modified in 10.3.23 innodb.innodb_defrag_stats_many_tables : MDEV-14198 - Table is full innodb.innodb_information_schema : MDEV-8851 - Wrong result -innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed; modified in 10.3.21 -innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result; modified in 10.3.21 +innodb.innodb_max_recordsize_32k : MDEV-14801 - Operation failed +innodb.innodb_max_recordsize_64k : MDEV-15203 - Wrong result innodb.innodb_monitor : MDEV-10939 - Testcase timeout innodb.innodb_mysql : MDEV-19873 - Wrong result innodb.innodb_simulate_comp_failures_small : MDEV-20526 - ASAN use-after-poison @@ -389,19 +416,19 @@ innodb.innodb_stats : MDEV-10682 - wrong result innodb.innodb_stats_persistent : MDEV-17745 - Wrong result; MDEV-21567 - Wrong result in execution plan innodb.innodb_stats_persistent_debug : MDEV-14801 - Operation failed innodb.innodb_sys_semaphore_waits : MDEV-10331 - Semaphore wait; modified in 10.3.22 +innodb.innodb_sys_var_valgrind : Added in 10.3.23 innodb.innodb_wl6326 : Added in 10.3.22 innodb.innodb_wl6326_big : Added in 10.3.22 innodb.innodb_zip_innochecksum2 : MDEV-13882 - Warning: difficult to find free blocks -innodb.instant_alter : Modified in 10.3.21 -innodb.instant_alter_debug : Modified in 10.3.21 -innodb.leaf_page_corrupted_during_recovery : MDEV-21572 - Server crash +innodb.instant_alter : Modified in 10.3.23 +innodb.instant_alter_bugs : Modified in 10.3.23 innodb.log_corruption : MDEV-13251 - Wrong result innodb.log_data_file_size : MDEV-14204 - Server failed to start innodb.log_file_name : MDEV-14193 - Exception +innodb.log_file_name_debug : Modified in 10.3.23 innodb.log_file_size : MDEV-15668 - Not found pattern innodb.monitor : MDEV-16179 - Wrong result innodb.purge_secondary : MDEV-15681 - Wrong result -innodb.purge_secondary_mdev-16222 : MDEV-20528 - Debug sync point wait timed out innodb.purge_thread_shutdown : MDEV-13792 - Wrong result innodb.read_only_recovery : MDEV-13886 - Server crash innodb.recovery_shutdown : MDEV-15671 - Checksum mismatch in datafile @@ -412,47 +439,57 @@ innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start innodb.temporary_table : MDEV-13265 - Wrong result innodb.truncate_inject : Modified in 10.2.31 -innodb.undo_log : Modified in 10.3.21 innodb.undo_truncate : MDEV-17340 - Server hung; MDEV-20840 - Sporadic timeout innodb.undo_truncate_recover : MDEV-17679 - Server has gone away innodb.update_time : MDEV-14804 - Wrong result innodb.xa_recovery : MDEV-15279 - mysqld got exception +innodb.xa_recovery_debug : Added in 10.3.23 #----------------------------------------------------------------------- innodb_fts.concurrent_insert : Modified in 10.3.22 -innodb_fts.innodb_fts_misc : Modified in 10.3.21 +innodb_fts.innodb_fts_misc : Modified in 10.3.23 innodb_fts.innodb_fts_misc_debug : MDEV-14156 - Unexpected warning innodb_fts.innodb_fts_plugin : MDEV-13888 - Errors in server log innodb_fts.innodb_fts_stopword_charset : MDEV-13259 - Table crashed -innodb_fts.sync : MDEV-14808 - Wrong result +innodb_fts.misc_debug : Modified in 10.3.23 +innodb_fts.misc_debug2 : Added in 10.3.23 +innodb_fts.stopword : Added in 10.3.23 +innodb_fts.sync : Modified in 10.3.23 innodb_fts.sync_block : Modified in 10.3.22 -innodb_fts.sync_ddl : MDEV-18654 - Assertion failure +innodb_fts.sync_ddl : MDEV-21568 - Errno: 2000; MDEV-18654 - Assertion failure #----------------------------------------------------------------------- innodb_gis.alter_spatial_index : MDEV-13745 - Server crash +innodb_gis.bug16236208 : Re-enabled in 10.3.23; modified in 10.3.23 +innodb_gis.bug16266012 : Re-enabled in 10.3.23; modified in 10.3.23 +innodb_gis.geometry : Re-enabled in 10.3.23; modified in 10.3.23 +innodb_gis.gis_split_inf : Re-enabled in 10.3.23; modified in 10.3.23 +innodb_gis.gis_split_nan : MDEV-21678 - Cannot get geometry object +innodb_gis.point_big : Re-enabled in 10.3.23 innodb_gis.rtree_compress2 : MDEV-16269 - Wrong result innodb_gis.rtree_concurrent_srch : MDEV-15284 - Wrong result with embedded innodb_gis.rtree_debug : Modified in 10.3.22 +innodb_gis.rtree_multi_pk : Re-enabled in 10.3.23; modified in 10.3.23 innodb_gis.rtree_purge : MDEV-15275 - Timeout innodb_gis.rtree_recovery : MDEV-15274 - Error on check innodb_gis.rtree_rollback1 : Modified in 10.3.22 innodb_gis.rtree_rollback2 : Modified in 10.3.22 -innodb_gis.rtree_split : MDEV-14208 - Too many arguments +innodb_gis.rtree_split : MDEV-14208 - Too many arguments; modified in 10.3.23 innodb_gis.rtree_undo : MDEV-14456 - Timeout in include file innodb_gis.types : MDEV-15679 - Table is marked as crashed #----------------------------------------------------------------------- -innodb_zip.bug53591 : Modified in 10.3.21 -innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed; modified in 10.3.22 -innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings -innodb_zip.prefix_index_liftedlimit : Modified in 10.3.21 -innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2 -innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure -innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket -innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 +innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed; modified in 10.3.22 +innodb_zip.index_large_prefix_4k : MDEV-21679 - Row size too large +innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings +innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.3.23 +innodb_zip.wl5522_zip : Modified in 10.3.23 +innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure +innodb_zip.wl6501_1 : MDEV-10891 - Can't create UNIX socket +innodb_zip.wl6501_scale_1 : MDEV-13254 - Timeout, MDEV-14104 - Error 192 #----------------------------------------------------------------------- @@ -466,16 +503,18 @@ maria.maria-no-logging : MDEV-20196 - Crash on shutdown or server can't start mariabackup.absolute_ibdata_paths : MDEV-16571 - Wrong result mariabackup.apply-log-only : MDEV-20135 - Timeout +mariabackup.backup_lock_wait_timeout : Added in 10.3.23 mariabackup.data_directory : MDEV-15270 - Error on exec mariabackup.full_backup : MDEV-16571 - Wrong result mariabackup.huge_lsn : MDEV-15662 - Sequence number is in the future; MDEV-18569 - Table doesn't exist -mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure; modified in 10.3.21 +mariabackup.incremental_backup : MDEV-21222 - Memory allocation failure mariabackup.incremental_encrypted : MDEV-15667 - timeout mariabackup.incremental_rocksdb : MDEV-20954 - Cannot access the file mariabackup.innodb_redo_log_overwrite : Added in 10.3.22 +mariabackup.innodb_xa_rollback : MDEV-22398 - Log sequence number is in the future; added in 10.3.23 mariabackup.log_checksum_mismatch : MDEV-16571 - Wrong result mariabackup.mdev-14447 : MDEV-15201 - Timeout -mariabackup.partial_exclude : MDEV-15270 - Error on exec +mariabackup.partial_exclude : MDEV-15270 - Error on exec; modified in 10.3.23 mariabackup.unencrypted_page_compressed : MDEV-18653 - Wrong error mariabackup.xb_compressed_encrypted : MDEV-14812 - Segmentation fault mariabackup.xb_file_key_management : MDEV-16571 - Wrong result @@ -541,6 +580,7 @@ percona.* : MDEV-10997 - Not maintained #----------------------------------------------------------------------- +perfschema.bad_option_1 : MDEV-21571 - Crash on bootstrap perfschema.connect_attrs : MDEV-17283 - Wrong result perfschema.dml_file_instances : MDEV-15179 - Wrong result perfschema.dml_threads : MDEV-17746 - Wrong errno @@ -582,7 +622,6 @@ perfschema.hostcache_ipv6_nameinfo_noname_deny : Modified in 10.3.22 perfschema.hostcache_ipv6_passwd : Modified in 10.3.22 perfschema.hostcache_ipv6_ssl : MDEV-10696 - Crash; modified in 10.3.22 perfschema.hostcache_peer_addr : MDEV-21462 - Test condition timeout; modified in 10.3.22 -perfschema.misc : Modified in 10.3.21 perfschema.privilege_table_io : MDEV-13184 - Extra lines perfschema.relaylog : MDEV-18134 - Wrong result perfschema.rpl_gtid_func : MDEV-16897 - Wrong result @@ -603,7 +642,7 @@ perfschema_stress.* : MDEV-10996 - Not maintained plugins.feedback_plugin_send : MDEV-7932, MDEV-11118 - Connection problems and such plugins.processlist : MDEV-16574 - Wrong result -plugins.server_audit : MDEV-14295 - Wrong result; modified in 10.3.21 +plugins.server_audit : MDEV-14295 - Wrong result; modified in 10.3.23 plugins.thread_pool_server_audit : MDEV-14295 - Wrong result #----------------------------------------------------------------------- @@ -647,7 +686,7 @@ roles.create_and_grant_role : MDEV-11772 - wrong result #----------------------------------------------------------------------- -rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free; modified in 10.3.22 +rpl.circular_serverid0 : MDEV-19372 - ASAN heap-use-after-free; modified in 10.3.23 rpl.create_or_replace2 : MDEV-19412 - Lost connection to MySQL server rpl.create_or_replace_mix : MDEV-20523 - Wrong result rpl.create_or_replace_statement : MDEV-20523 - Wrong result @@ -657,25 +696,27 @@ rpl.last_insert_id : MDEV-10625 - warnings in error log 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_errors : MDEV-12742 - Crash +rpl.rpl_binlog_errors : MDEV-12742 - Crash; include file modified in 10.2.32 rpl.rpl_binlog_index : MDEV-9501 - Failed registering on master rpl.rpl_binlog_rollback_cleanup : Added in 10.3.22 rpl.rpl_bug33931 : Modified in 10.3.22 -rpl.rpl_bug41902 : Modified in 10.3.22 +rpl.rpl_bug41902 : Configuration deleted in 10.3.23 rpl.rpl_checksum : Include file modified in 10.2.31 rpl.rpl_colSize : MDEV-16112 - Server crash -rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code +rpl.rpl_conditional_comments : Modified in 10.3.23 +rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code; include file modified in 10.2.32 rpl.rpl_ctype_latin1 : MDEV-14813 - Wrong result on Mac rpl.rpl_ddl : MDEV-10417 - Fails on Mips -rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash; modified in 10.3.22 +rpl.rpl_domain_id_filter_io_crash : MDEV-12729 - Timeout in include file, MDEV-13677 - Server crash; modified in 10.3.23 rpl.rpl_domain_id_filter_master_crash : MDEV-19043 - Table marked as crashed; modified in 10.3.22 rpl.rpl_domain_id_filter_restart : MDEV-10684 - Wrong result; MDEV-19043 - Table marked as crashed rpl.rpl_drop_db_fail : MDEV-16898 - Slave fails to start rpl.rpl_extra_col_master_innodb : MDEV-16570 - Extra warning rpl.rpl_extra_col_master_myisam : MDEV-14203 - Extra warning +rpl.rpl_fail_register : MDEV-22472 - Wrong result; added in 10.3.23 rpl.rpl_flushlog_loop : MDEV-21570 - Server crash rpl.rpl_get_lock : MDEV-19368 - mysqltest failed but provided no output -rpl.rpl_get_master_version_and_clock : Modified in 10.3.22 +rpl.rpl_get_master_version_and_clock : Re-enabled in 10.3.23; include file modified in 10.3.23 rpl.rpl_gtid_basic : MDEV-10681 - server startup problem rpl.rpl_gtid_crash : MDEV-9501 - Failed registering on master, MDEV-13643 - Lost connection rpl.rpl_gtid_delete_domain : MDEV-14463 - Timeout @@ -684,6 +725,7 @@ rpl.rpl_gtid_mdev9033 : MDEV-10680 - warnings rpl.rpl_gtid_reconnect : MDEV-14497 - Crash; modified in 10.3.22 rpl.rpl_gtid_startpos : MDEV-20141 - mysqltest failed but provided no output rpl.rpl_gtid_stop_start : MDEV-10629 - Crash on shutdown, MDEV-12629 - Valgrind warnings +rpl.rpl_gtid_strict : Modified in 10.3.23 rpl.rpl_gtid_until : MDEV-10625 - warnings in error log rpl.rpl_heartbeat_debug : Modified in 10.3.22 rpl.rpl_incident : Include file modified in 10.2.31 @@ -716,7 +758,7 @@ rpl.rpl_row_001 : MDEV-16653 - MTR's internal check fails 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_big_table_id : Modified in 10.3.22 -rpl.rpl_row_corruption : MDEV-21569 - mutex: LOCK_global_system_variables unlocking +rpl.rpl_row_corruption : MDEV-21569 - mutex: LOCK_global_system_variables unlocking; modified in 10.3.23 rpl.rpl_row_drop_create_temp_table : MDEV-14487 - Wrong result rpl.rpl_row_end_of_statement_loss : MDEV-21237 - Server crash rpl.rpl_row_find_row_debug : Modified in 10.3.22 @@ -730,7 +772,6 @@ 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-21031 - Wrong result; MDEV-14366 - Wrong result rpl.rpl_semi_sync_event_after_sync : MDEV-11806 - warnings -rpl.rpl_semi_sync_gtid_reconnect : Added in 10.3.21 rpl.rpl_semi_sync_skip_repl : Modified in 10.3.22 rpl.rpl_semi_sync_uninstall_plugin : MDEV-7140 - Assorted failures rpl.rpl_semi_sync_wait_point : MDEV-11807 - timeout in wait condition @@ -748,7 +789,7 @@ rpl.rpl_start_stop_slave : MDEV-13567 - Sync slave timeout rpl.rpl_stm_lcase_tblnames : Modified in 10.3.22 rpl.rpl_stm_multi_query : MDEV-9501 - Failed registering on master rpl.rpl_stm_relay_ign_space : MDEV-14360 - Test assertion -rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash; include file modified in 10.3.22 +rpl.rpl_stm_stop_middle_group : MDEV-13791 - Server crash; include file modified in 10.3.23 rpl.rpl_stop_slave : Modified in 10.3.22 rpl.rpl_sync : MDEV-13830 - Assertion failure rpl.rpl_temporal_mysql56_to_mariadb53 : MDEV-9501 - Failed registering on master @@ -780,9 +821,8 @@ sphinx.union-5539 : MDEV-10986 - Sporadic failures #----------------------------------------------------------------------- -spider.* : MDEV-9329, MDEV-18737 - tests are too memory-consuming -spider.basic_sql : MDEV-11186 - Internal check fails -spider.pushdown_not_like : Added in 10.3.21 +spider.* : MDEV-9329, MDEV-18737 - tests are too memory-consuming +spider.basic_sql : MDEV-11186 - Internal check fails #----------------------------------------------------------------------- @@ -798,13 +838,16 @@ spider/bg.vp_fixes : MDEV-9329 - Fails on Ubuntu/s390x #----------------------------------------------------------------------- +spider/bugfix.mdev_21884 : Added in 10.3.23 + +#----------------------------------------------------------------------- + spider/handler.* : MDEV-10987, MDEV-10990 - Tests have not been maintained #----------------------------------------------------------------------- sql_sequence.concurrent_create : MDEV-16635 - Server crash -sql_sequence.rebuild : Added in 10.3.21 -sql_sequence.view : Modified in 10.3.21 +sql_sequence.rebuild : Modified in 10.3.23 #----------------------------------------------------------------------- @@ -816,11 +859,13 @@ stress.ddl_innodb : MDEV-10635 - Testcase timeout #----------------------------------------------------------------------- +sys_vars.alter_algorithm_basic : Added in 10.3.23 sys_vars.autocommit_func2 : MDEV-9329 - Fails on Ubuntu/s390x sys_vars.debug_dbug_func : Modified in 10.3.22 sys_vars.innodb_buffer_pool_dump_at_shutdown_basic : MDEV-14280 - Unexpected error sys_vars.innodb_buffer_pool_size_basic : Modified in 10.3.22 sys_vars.innodb_checksum_algorithm_basic : MDEV-21568 - Errno: 2000 +sys_vars.innodb_instant_alter_column_allowed_basic : Added in 10.3.23 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 - Test assertion @@ -901,12 +946,10 @@ vcol.vcol_misc : MDEV-16651 - Wrong error message #----------------------------------------------------------------------- -versioning.delete : Modified in 10.3.21 -versioning.partition : Modified in 10.3.21 -versioning.select : Modified in 10.3.21 -versioning.trx_id : Modified in 10.3.22 -versioning.update : MDEV-20955 - Wrong result code; modified in 10.3.21 -versioning.view : Modified in 10.3.21 +versioning.alter : Modified in 10.3.23 +versioning.partition : Modified in 10.3.23 +versioning.sysvars : Modified in 10.3.23 +versioning.update : MDEV-22475 - Wrong result code; modified in 10.3.23 #----------------------------------------------------------------------- @@ -919,8 +962,10 @@ wsrep.mdev_6832 : MDEV-14195 - Check testcase failed wsrep.mysql_tzinfo_to_sql_symlink : Modified in 10.3.22 wsrep.mysql_tzinfo_to_sql_symlink_skip : Modified in 10.3.22 wsrep.pool_of_threads : MDEV-17345 - WSREP has not yet prepared node for application use; re-enabled in 10.3.22; configuration modified in 10.3.22 +wsrep.trans : Modified in 10.3.23 wsrep.variables : MDEV-17585 - Deadlock; modified in 10.3.22 #----------------------------------------------------------------------- -wsrep_info.* : Config file changed in 10.2.31; Config file changed in 10.3.22 +wsrep_info.* : Config file changed in 10.2.31; Config file changed in 10.3.22 +wsrep_info.plugin : MDEV-22470 - WSREP: no nodes coming from prim view, prim not possible From 1a9c593db8046a48b47db045915c6cce7f11e9ec Mon Sep 17 00:00:00 2001 From: Elena Stepanova Date: Sat, 9 May 2020 20:53:39 +0300 Subject: [PATCH 18/18] List of unstable tests for 10.3.23 release (updated) --- mysql-test/unstable-tests | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/mysql-test/unstable-tests b/mysql-test/unstable-tests index c66ac9c625e..9e57c22fbd2 100644 --- a/mysql-test/unstable-tests +++ b/mysql-test/unstable-tests @@ -23,7 +23,8 @@ # ############################################################################## # -# Based on bb-10.3-release 8648b9bed86e9f52c027daec760d6ab5ce52e889 +# Based on bb-10.3-release 6c0f9db59b2539ba6c011947d0567d58d4e879cd +# Fri May 8 14:33:44 2020 +0200 : Merge branch '10.2' into 10.3 main.alter_table_trans : MDEV-12084 - timeout main.alter_user : Modified in 10.3.23 @@ -109,6 +110,7 @@ main.mysqldump : MDEV-22147 - Wrong result; MDEV-14800 main.mysqlhotcopy_myisam : MDEV-10995 - Hang on debug main.mysqlslap : MDEV-11801 - timeout main.mysqltest : MDEV-13887 - Wrong result +main.mysqltest_tracking_info : Modified in 10.3.23 main.old-mode : MDEV-19373 - Wrong result main.openssl_6975 : MDEV-17184 - Failures with OpenSSL 1.1.1 main.opt_tvc : Modified in 10.3.22 @@ -123,6 +125,7 @@ main.partition_mrr_innodb : Include file modified in 10.3.23 main.partition_mrr_myisam : Modified in 10.3.23 main.partition_range : Modified in 10.3.23 main.pool_of_threads : MDEV-18135 - SSL error: key too small +main.processlist_notembedded : MDEV-22513 - Timeout in wait_until_count_sessions; modified in 10.3.23 main.ps : MDEV-11017 - Sporadic wrong Prepared_stmt_count main.query_cache : MDEV-16180 - Wrong result main.query_cache_debug : MDEV-15281 - Query cache is disabled @@ -364,6 +367,7 @@ innodb.buf_pool_resize_oom : Added in 10.3.23 innodb.corrupted_during_recovery : Modified in 10.3.23 innodb.doublewrite : MDEV-12905 - Server crash innodb.foreign_key : Modified in 10.3.23 +innodb.foreign_key_debug : Added in 10.3.23 innodb.group_commit_crash : MDEV-14191 - InnoDB registration failed innodb.group_commit_crash_no_optimize_thread : MDEV-13830 - Assertion failure innodb.ibuf_not_empty : MDEV-19021 - Wrong result @@ -438,6 +442,7 @@ innodb.row_size_error_log_warnings_3 : Modified in 10.3.22 innodb.table_definition_cache_debug : MDEV-14206 - Extra warning innodb.table_flags : MDEV-13572 - Wrong result; MDEV-19374 - Server failed to start innodb.temporary_table : MDEV-13265 - Wrong result +innodb.truncate_foreign : MDEV-22511 - Wrong error code innodb.truncate_inject : Modified in 10.2.31 innodb.undo_truncate : MDEV-17340 - Server hung; MDEV-20840 - Sporadic timeout innodb.undo_truncate_recover : MDEV-17679 - Server has gone away @@ -485,6 +490,7 @@ innodb_gis.types : MDEV-15679 - Table is marked as crashed innodb_zip.cmp_per_index : MDEV-14490 - Table is marked as crashed; modified in 10.3.22 innodb_zip.index_large_prefix_4k : MDEV-21679 - Row size too large innodb_zip.innochecksum_3 : MDEV-13279 - Extra warnings +innodb_zip.recover : MDEV-22512 - Server failed to restart innodb_zip.wl5522_debug_zip : MDEV-11600 - Operating system error number 2; modified in 10.3.23 innodb_zip.wl5522_zip : Modified in 10.3.23 innodb_zip.wl6470_1 : MDEV-14240 - Assertion failure @@ -702,6 +708,7 @@ rpl.rpl_binlog_rollback_cleanup : Added in 10.3.22 rpl.rpl_bug33931 : Modified in 10.3.22 rpl.rpl_bug41902 : Configuration deleted in 10.3.23 rpl.rpl_checksum : Include file modified in 10.2.31 +rpl.rpl_checksum_cache : MDEV-22510 - Server crash rpl.rpl_colSize : MDEV-16112 - Server crash rpl.rpl_conditional_comments : Modified in 10.3.23 rpl.rpl_corruption : MDEV-20527 - Slave stopped with wrong error code; include file modified in 10.2.32 @@ -913,6 +920,7 @@ tokudb_bugs.frm_store : MDEV-12823 - Valgrind tokudb_bugs.frm_store2 : MDEV-12823 - Valgrind tokudb_bugs.frm_store3 : MDEV-12823 - Valgrind tokudb_bugs.xa : MDEV-11804 - Lock wait timeout +tokudb_bugs.xa-3 : MDEV-22512 - Server failed to restart #-----------------------------------------------------------------------