From e56fe393104960eb62043c3777ce7d21de9362f4 Mon Sep 17 00:00:00 2001 From: Julius Goryavsky Date: Tue, 6 Jul 2021 03:00:27 +0200 Subject: MDEV-25978: minor post-merge fix for .result file --- mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result | 1 - 1 file changed, 1 deletion(-) diff --git a/mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result b/mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result index dabbaeaab4f..9b56a09d369 100644 --- a/mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result +++ b/mysql-test/suite/galera/r/galera_sst_rsync_logbasename.result @@ -172,4 +172,3 @@ COUNT(*) = 0 1 DROP TABLE t1; COMMIT; -SET AUTOCOMMIT=ON; -- cgit v1.2.1 From 78735dcaf757cd71c8f0ff3d21071b0f89018150 Mon Sep 17 00:00:00 2001 From: Igor Babaev Date: Thu, 8 Jul 2021 17:47:17 -0700 Subject: MDEV-26108 Crash with query referencing twice CTE that uses embedded recursive CTE This bug could affect queries that had at least two references to a CTE that used an embedded recursive CTE. Starting from version 10.4 some code in With_element::clone_parsed_spec() that assumed a certain order of selects after parsing the specification of a CTE became not valid anymore. It could lead to global select lists where some selects were missing. If a missing CTE happened to belong to the recursive part of a recursive CTE some recursive table references were not set as references to materialized derived tables and this caused a crash of the server. Approved by Oleksandr Byelkin --- mysql-test/main/cte_nonrecursive.result | 2 +- mysql-test/main/cte_recursive.result | 19 +++++++++++++++++++ mysql-test/main/cte_recursive.test | 17 +++++++++++++++++ sql/sql_cte.cc | 10 +++++++--- 4 files changed, 44 insertions(+), 4 deletions(-) diff --git a/mysql-test/main/cte_nonrecursive.result b/mysql-test/main/cte_nonrecursive.result index 040afdf7ff4..4cd466ac350 100644 --- a/mysql-test/main/cte_nonrecursive.result +++ b/mysql-test/main/cte_nonrecursive.result @@ -1126,7 +1126,7 @@ NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL NULL UNION RESULT ALL NULL NULL NULL NULL NULL NULL Warnings: -Note 1003 with cte_e as (with cte_o as (with cte_i as (select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 7)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1)select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1 union select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1)select `cte_e1`.`a` AS `a` from `cte_e` `cte_e1` where `cte_e1`.`a` > 1 union select `cte_e2`.`a` AS `a` from `cte_e` `cte_e2` +Note 1003 with cte_e as (with cte_o as (with cte_i as (/* select#2 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 7)/* select#3 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 1)/* select#4 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` < 3 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1 union /* select#5 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where `test`.`t1`.`a` > 4 and `test`.`t1`.`a` > 1 and `test`.`t1`.`a` < 7 and `test`.`t1`.`a` > 1)/* select#1 */ select `cte_e1`.`a` AS `a` from `cte_e` `cte_e1` where `cte_e1`.`a` > 1 union /* select#6 */ select `cte_e2`.`a` AS `a` from `cte_e` `cte_e2` drop table t1; # # MDEV-13753: embedded CTE in a VIEW created in prepared statement diff --git a/mysql-test/main/cte_recursive.result b/mysql-test/main/cte_recursive.result index 6f30de39b46..74b450ff890 100644 --- a/mysql-test/main/cte_recursive.result +++ b/mysql-test/main/cte_recursive.result @@ -4791,3 +4791,22 @@ a NULL DROP TABLE t1; # End of 10.3 tests +# +# MDEV-26108: Recursive CTE embedded into another CTE which is used twice +# +create table t1 (a int); +insert into t1 values (5), (7); +with cte_e as ( +with recursive cte_r as ( +select a from t1 union select a+1 as a from cte_r r where a < 10 +) select * from cte_r +) select * from cte_e s1, cte_e s2 where s1.a=s2.a; +a a +5 5 +7 7 +6 6 +8 8 +9 9 +10 10 +drop table t1; +# End of 10.4 tests diff --git a/mysql-test/main/cte_recursive.test b/mysql-test/main/cte_recursive.test index c3537e5bd0c..3b140b3cc6c 100644 --- a/mysql-test/main/cte_recursive.test +++ b/mysql-test/main/cte_recursive.test @@ -3087,3 +3087,20 @@ SELECT * FROM cte; DROP TABLE t1; --echo # End of 10.3 tests + +--echo # +--echo # MDEV-26108: Recursive CTE embedded into another CTE which is used twice +--echo # + +create table t1 (a int); +insert into t1 values (5), (7); + +with cte_e as ( + with recursive cte_r as ( + select a from t1 union select a+1 as a from cte_r r where a < 10 + ) select * from cte_r +) select * from cte_e s1, cte_e s2 where s1.a=s2.a; + +drop table t1; + +--echo # End of 10.4 tests diff --git a/sql/sql_cte.cc b/sql/sql_cte.cc index dfcb4e18772..c5dcc15f018 100644 --- a/sql/sql_cte.cc +++ b/sql/sql_cte.cc @@ -1038,6 +1038,7 @@ st_select_lex_unit *With_element::clone_parsed_spec(LEX *old_lex, bool parse_status= false; st_select_lex *with_select; + st_select_lex *last_clone_select; char save_end= unparsed_spec.str[unparsed_spec.length]; ((char*) &unparsed_spec.str[unparsed_spec.length])[0]= '\0'; @@ -1124,11 +1125,14 @@ st_select_lex_unit *With_element::clone_parsed_spec(LEX *old_lex, lex->unit.include_down(with_table->select_lex); lex->unit.set_slave(with_select); lex->unit.cloned_from= spec; + last_clone_select= lex->all_selects_list; + while (last_clone_select->next_select_in_list()) + last_clone_select= last_clone_select->next_select_in_list(); old_lex->all_selects_list= (st_select_lex*) (lex->all_selects_list-> - insert_chain_before( - (st_select_lex_node **) &(old_lex->all_selects_list), - with_select)); + insert_chain_before( + (st_select_lex_node **) &(old_lex->all_selects_list), + last_clone_select)); /* Now all references to the CTE defined outside of the cloned specification -- cgit v1.2.1 From e3814a74eee4f47b5d58997f90c8ee9742452681 Mon Sep 17 00:00:00 2001 From: Nayuta Yanagisawa Date: Wed, 14 Jul 2021 10:17:54 +0000 Subject: MDEV-26139 Spider crashes with segmentation fault (signal 11) on CREATE TABLE when COMMENT does not contain embedded double quotes The root cause of the bug MDEV-26139 is the lack of NULL checking on the variable `dq`. Comments on if (dq && (!sq || sq > dq)) {...} else {...}: * The if block corresponds to the case where parameters are quoted by double quotes. In that case, a single quote doesn't appear at all or only appears in the middle of double quotes. * The else block corresponds to the case where parameters are quoted by single quotes. In that case, a double quote doesn't appear at all or only appears in the middle of single quotes. * If the program reaches the if-else statement, `sq || dq` holds. Thus, the negation of `dq && (!sq || sq > dq)` is equivalent to `sq && (!dq || sq <= dq)`. --- storage/spider/mysql-test/spider/r/basic_sql.result | 6 ++++++ storage/spider/mysql-test/spider/t/basic_sql.test | 7 +++++++ storage/spider/spd_table.h | 5 +++-- 3 files changed, 16 insertions(+), 2 deletions(-) diff --git a/storage/spider/mysql-test/spider/r/basic_sql.result b/storage/spider/mysql-test/spider/r/basic_sql.result index ba904b5f577..2443f3488bd 100644 --- a/storage/spider/mysql-test/spider/r/basic_sql.result +++ b/storage/spider/mysql-test/spider/r/basic_sql.result @@ -721,6 +721,12 @@ connection master_1; create table t2345678911234567892123456789312345678941234567895123234234(id int) ENGINE=SPIDER COMMENT='host "192.168.21.1", user "spider", password "password", database "test32738123123123"'; drop table t2345678911234567892123456789312345678941234567895123234234; +# +# MDEV-26139 Spider crashes with segmentation fault (signal 11) on CREATE TABLE when COMMENT does not contain embedded double quotes +# +create table mdev_26139 (id int) ENGINE=SPIDER +COMMENT="host '192.168.21.1', user 'spider', password 'password', database 'test'"; +drop table mdev_26139; deinit connection master_1; diff --git a/storage/spider/mysql-test/spider/t/basic_sql.test b/storage/spider/mysql-test/spider/t/basic_sql.test index a3184a14beb..1298b10f19a 100644 --- a/storage/spider/mysql-test/spider/t/basic_sql.test +++ b/storage/spider/mysql-test/spider/t/basic_sql.test @@ -2682,6 +2682,13 @@ create table t2345678911234567892123456789312345678941234567895123234234(id int) COMMENT='host "192.168.21.1", user "spider", password "password", database "test32738123123123"'; drop table t2345678911234567892123456789312345678941234567895123234234; +--echo # +--echo # MDEV-26139 Spider crashes with segmentation fault (signal 11) on CREATE TABLE when COMMENT does not contain embedded double quotes +--echo # +create table mdev_26139 (id int) ENGINE=SPIDER + COMMENT="host '192.168.21.1', user 'spider', password 'password', database 'test'"; +drop table mdev_26139; + --echo --echo deinit --disable_warnings diff --git a/storage/spider/spd_table.h b/storage/spider/spd_table.h index 6aaac2046e4..063f459ae8d 100644 --- a/storage/spider/spd_table.h +++ b/storage/spider/spd_table.h @@ -189,7 +189,8 @@ typedef struct st_spider_param_string_parse { DBUG_RETURN(print_param_error()); } - else if (!sq || sq > dq) + + if (dq && (!sq || sq > dq)) { while (1) { @@ -227,7 +228,7 @@ typedef struct st_spider_param_string_parse } } } - else + else /* sq && (!dq || sq <= dq) */ { while (1) { -- cgit v1.2.1 From bd3ac6758a9615e9a5d7d45a87dde8b448cb4a86 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Sat, 10 Jul 2021 12:42:53 +0200 Subject: fix perfschema.sizing_* tests to run still cannot be enabled permanently, but at least they could be run manually, if needed --- .../perfschema/include/default_mysqld_autosize.cnf | 53 ++++++++++++++++++++++ .../perfschema/include/have_aligned_memory.inc | 5 +- .../suite/perfschema/include/sizing_auto.inc | 4 +- .../suite/perfschema/r/sizing_default.result | 41 +++++++++-------- mysql-test/suite/perfschema/r/sizing_high.result | 39 ++++++++-------- mysql-test/suite/perfschema/r/sizing_low.result | 43 ++++++++++-------- mysql-test/suite/perfschema/r/sizing_med.result | 25 +++++----- mysql-test/suite/perfschema/r/sizing_off.result | 4 +- mysql-test/suite/perfschema/t/sizing_default.cnf | 4 +- mysql-test/suite/perfschema/t/sizing_default.test | 22 ++++----- mysql-test/suite/perfschema/t/sizing_high.cnf | 3 +- mysql-test/suite/perfschema/t/sizing_low.cnf | 3 +- mysql-test/suite/perfschema/t/sizing_med.cnf | 3 +- mysql-test/suite/perfschema/t/sizing_off.cnf | 2 +- 14 files changed, 158 insertions(+), 93 deletions(-) create mode 100644 mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf diff --git a/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf b/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf new file mode 100644 index 00000000000..eee52ede869 --- /dev/null +++ b/mysql-test/suite/perfschema/include/default_mysqld_autosize.cnf @@ -0,0 +1,53 @@ + +# Default values that applies to all MySQL Servers +[mysqld] +local-infile +character-set-server= latin1 +default-storage-engine=myisam + +# Increase default connect_timeout to avoid intermittent +# disconnects when test servers are put under load see BUG#28359 +connect-timeout= 60 + +log-bin-trust-function-creators=1 +key_buffer_size= 1M +sort_buffer_size= 256K +max_heap_table_size= 1M + +loose-innodb_data_file_path= ibdata1:10M:autoextend +loose-innodb_buffer_pool_size= 8M +loose-innodb_lru_scan_depth= 100 +loose-innodb_write_io_threads= 2 +loose-innodb_read_io_threads= 2 +loose-innodb_log_buffer_size= 1M +loose-innodb_log_file_size= 5M +loose-innodb_log_files_in_group= 2 + +slave-net-timeout=120 + +log-bin=mysqld-bin + +# No performance schema sizing provided + +# Disable everything, we only need the sizing data, +# and also need a stable output for show engine performance_schema status +loose-performance-schema-consumer-global-instrumentation=OFF + +loose-performance-schema-instrument='%=ON' + +loose-performance-schema-consumer-events-stages-current=ON +loose-performance-schema-consumer-events-stages-history=ON +loose-performance-schema-consumer-events-stages-history-long=ON +loose-performance-schema-consumer-events-statements-current=ON +loose-performance-schema-consumer-events-statements-history=ON +loose-performance-schema-consumer-events-statements-history-long=ON +loose-performance-schema-consumer-events-transactions-current=ON +loose-performance-schema-consumer-events-transactions-history=ON +loose-performance-schema-consumer-events-transactions-history-long=ON +loose-performance-schema-consumer-events-waits-current=ON +loose-performance-schema-consumer-events-waits-history=ON +loose-performance-schema-consumer-events-waits-history-long=ON +loose-performance-schema-consumer-thread-instrumentation=ON + +binlog-direct-non-transactional-updates + diff --git a/mysql-test/suite/perfschema/include/have_aligned_memory.inc b/mysql-test/suite/perfschema/include/have_aligned_memory.inc index 9638cbe1da4..d420f0e055a 100644 --- a/mysql-test/suite/perfschema/include/have_aligned_memory.inc +++ b/mysql-test/suite/perfschema/include/have_aligned_memory.inc @@ -4,10 +4,7 @@ # For tests sensitive to the internal sizes (show engine performance_schema # status), make sure we use a platform with aligned memory. ---disable_query_log -let $aligned = `SELECT count(*) from performance_schema.session_connect_attrs where PROCESSLIST_ID = connection_id() and ATTR_NAME = '_os' and ATTR_VALUE in ('Linux', 'Windows')`; -if (!$aligned) +if (`SELECT count(*)=0 from performance_schema.session_connect_attrs where PROCESSLIST_ID = connection_id() and ATTR_NAME = '_os' and ATTR_VALUE in ('Linux', 'Windows')`) { skip Need a platform with aligned memory; } ---enable_query_log diff --git a/mysql-test/suite/perfschema/include/sizing_auto.inc b/mysql-test/suite/perfschema/include/sizing_auto.inc index 3bb4db2276f..6cb077e3cf7 100644 --- a/mysql-test/suite/perfschema/include/sizing_auto.inc +++ b/mysql-test/suite/perfschema/include/sizing_auto.inc @@ -3,7 +3,7 @@ show variables like "table_definition_cache"; show variables like "table_open_cache"; show variables like "max_connections"; # open_files_limit depends on OS configuration (ulimit -n) -#show variables like "open_files_limit"; +show variables like "open_files_limit"; show variables where `Variable_name` != "performance_schema_max_statement_classes" and `Variable_name` like "performance_schema%"; @@ -17,7 +17,7 @@ show status like "%performance_schema%"; # is very dependent on the platform, # so it is not printed here to ensure stability of the .results files. # To troubleshoot the performance schema memory consumption at different -# configuration settings, comment the following line. +# configuration settings, uncomment the following line. # Debug only: # show engine performance_schema status; diff --git a/mysql-test/suite/perfschema/r/sizing_default.result b/mysql-test/suite/perfschema/r/sizing_default.result index 07fbf35619b..ea611315be3 100644 --- a/mysql-test/suite/perfschema/r/sizing_default.result +++ b/mysql-test/suite/perfschema/r/sizing_default.result @@ -1,43 +1,46 @@ show variables like "table_definition_cache"; Variable_name Value -table_definition_cache 1400 +table_definition_cache 400 show variables like "table_open_cache"; Variable_name Value -table_open_cache 2000 +table_open_cache 421 show variables like "max_connections"; Variable_name Value max_connections 151 +show variables like "open_files_limit"; +Variable_name Value +open_files_limit 1024 show variables where `Variable_name` != "performance_schema_max_statement_classes" and `Variable_name` like "performance_schema%"; Variable_name Value performance_schema ON performance_schema_accounts_size 100 -performance_schema_digests_size 10000 -performance_schema_events_stages_history_long_size 10000 -performance_schema_events_stages_history_size 10 -performance_schema_events_statements_history_long_size 10000 -performance_schema_events_statements_history_size 10 -performance_schema_events_waits_history_long_size 10000 -performance_schema_events_waits_history_size 10 +performance_schema_digests_size 5000 +performance_schema_events_stages_history_long_size 1000 +performance_schema_events_stages_history_size 20 +performance_schema_events_statements_history_long_size 1000 +performance_schema_events_statements_history_size 20 +performance_schema_events_waits_history_long_size 1000 +performance_schema_events_waits_history_size 20 performance_schema_hosts_size 100 -performance_schema_max_cond_classes 80 -performance_schema_max_cond_instances 3504 +performance_schema_max_cond_classes 90 +performance_schema_max_cond_instances 1360 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 -performance_schema_max_file_instances 7693 +performance_schema_max_file_instances 2500 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 15906 +performance_schema_max_mutex_instances 5648 performance_schema_max_rwlock_classes 40 -performance_schema_max_rwlock_instances 9102 +performance_schema_max_rwlock_instances 3073 performance_schema_max_socket_classes 10 -performance_schema_max_socket_instances 322 -performance_schema_max_stage_classes\t160 -performance_schema_max_table_handles 4000 -performance_schema_max_table_instances 12500 +performance_schema_max_socket_instances 230 +performance_schema_max_stage_classes 160 +performance_schema_max_table_handles 2858 +performance_schema_max_table_instances 667 performance_schema_max_thread_classes 50 -performance_schema_max_thread_instances 402 +performance_schema_max_thread_instances 288 performance_schema_session_connect_attrs_size 512 performance_schema_setup_actors_size 100 performance_schema_setup_objects_size 100 diff --git a/mysql-test/suite/perfschema/r/sizing_high.result b/mysql-test/suite/perfschema/r/sizing_high.result index 1cf84a14d22..1f63ac6015a 100644 --- a/mysql-test/suite/perfschema/r/sizing_high.result +++ b/mysql-test/suite/perfschema/r/sizing_high.result @@ -3,41 +3,44 @@ Variable_name Value table_definition_cache 5000 show variables like "table_open_cache"; Variable_name Value -table_open_cache 400 +table_open_cache 397 show variables like "max_connections"; Variable_name Value max_connections 200 +show variables like "open_files_limit"; +Variable_name Value +open_files_limit 1024 show variables where `Variable_name` != "performance_schema_max_statement_classes" and `Variable_name` like "performance_schema%"; Variable_name Value performance_schema ON performance_schema_accounts_size 100 -performance_schema_digests_size 10000 -performance_schema_events_stages_history_long_size 10000 -performance_schema_events_stages_history_size 10 -performance_schema_events_statements_history_long_size 10000 -performance_schema_events_statements_history_size 10 -performance_schema_events_waits_history_long_size 10000 -performance_schema_events_waits_history_size 10 +performance_schema_digests_size 5000 +performance_schema_events_stages_history_long_size 1000 +performance_schema_events_stages_history_size 20 +performance_schema_events_statements_history_long_size 1000 +performance_schema_events_statements_history_size 20 +performance_schema_events_waits_history_long_size 1000 +performance_schema_events_waits_history_size 20 performance_schema_hosts_size 100 -performance_schema_max_cond_classes 80 -performance_schema_max_cond_instances 10900 +performance_schema_max_cond_classes 90 +performance_schema_max_cond_instances 1500 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 -performance_schema_max_file_instances 23385 +performance_schema_max_file_instances 2500 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 52200 +performance_schema_max_mutex_instances 5858 performance_schema_max_rwlock_classes 40 -performance_schema_max_rwlock_instances 30800 +performance_schema_max_rwlock_instances 3143 performance_schema_max_socket_classes 10 -performance_schema_max_socket_instances 420 -performance_schema_max_stage_classes\t160 -performance_schema_max_table_handles 800 -performance_schema_max_table_instances 12500 +performance_schema_max_socket_instances 300 +performance_schema_max_stage_classes 160 +performance_schema_max_table_handles 2858 +performance_schema_max_table_instances 667 performance_schema_max_thread_classes 50 -performance_schema_max_thread_instances 500 +performance_schema_max_thread_instances 358 performance_schema_session_connect_attrs_size 512 performance_schema_setup_actors_size 100 performance_schema_setup_objects_size 100 diff --git a/mysql-test/suite/perfschema/r/sizing_low.result b/mysql-test/suite/perfschema/r/sizing_low.result index 4569ebd7a5e..d6d6baeca9a 100644 --- a/mysql-test/suite/perfschema/r/sizing_low.result +++ b/mysql-test/suite/perfschema/r/sizing_low.result @@ -7,41 +7,44 @@ table_open_cache 100 show variables like "max_connections"; Variable_name Value max_connections 50 +show variables like "open_files_limit"; +Variable_name Value +open_files_limit 1024 show variables where `Variable_name` != "performance_schema_max_statement_classes" and `Variable_name` like "performance_schema%"; Variable_name Value performance_schema ON -performance_schema_accounts_size 10 -performance_schema_digests_size 1000 -performance_schema_events_stages_history_long_size 100 -performance_schema_events_stages_history_size 5 -performance_schema_events_statements_history_long_size 100 -performance_schema_events_statements_history_size 5 -performance_schema_events_waits_history_long_size 100 -performance_schema_events_waits_history_size 5 -performance_schema_hosts_size 20 -performance_schema_max_cond_classes 80 -performance_schema_max_cond_instances 612 +performance_schema_accounts_size 100 +performance_schema_digests_size 5000 +performance_schema_events_stages_history_long_size 1000 +performance_schema_events_stages_history_size 20 +performance_schema_events_statements_history_long_size 1000 +performance_schema_events_statements_history_size 20 +performance_schema_events_waits_history_long_size 1000 +performance_schema_events_waits_history_size 20 +performance_schema_hosts_size 100 +performance_schema_max_cond_classes 90 +performance_schema_max_cond_instances 1072 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 -performance_schema_max_file_instances 1556 +performance_schema_max_file_instances 2500 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 2945 +performance_schema_max_mutex_instances 5215 performance_schema_max_rwlock_classes 40 -performance_schema_max_rwlock_instances 1612 +performance_schema_max_rwlock_instances 2929 performance_schema_max_socket_classes 10 -performance_schema_max_socket_instances 67 -performance_schema_max_stage_classes\t160 -performance_schema_max_table_handles 112 -performance_schema_max_table_instances 445 +performance_schema_max_socket_instances 86 +performance_schema_max_stage_classes 160 +performance_schema_max_table_handles 2858 +performance_schema_max_table_instances 667 performance_schema_max_thread_classes 50 -performance_schema_max_thread_instances 112 +performance_schema_max_thread_instances 143 performance_schema_session_connect_attrs_size 512 performance_schema_setup_actors_size 100 performance_schema_setup_objects_size 100 -performance_schema_users_size 5 +performance_schema_users_size 100 show status like "%performance_schema%"; Variable_name Value Performance_schema_accounts_lost 0 diff --git a/mysql-test/suite/perfschema/r/sizing_med.result b/mysql-test/suite/perfschema/r/sizing_med.result index 24fba02d16b..f662809b5cd 100644 --- a/mysql-test/suite/perfschema/r/sizing_med.result +++ b/mysql-test/suite/perfschema/r/sizing_med.result @@ -7,6 +7,9 @@ table_open_cache 401 show variables like "max_connections"; Variable_name Value max_connections 152 +show variables like "open_files_limit"; +Variable_name Value +open_files_limit 1024 show variables where `Variable_name` != "performance_schema_max_statement_classes" and `Variable_name` like "performance_schema%"; @@ -15,27 +18,27 @@ performance_schema ON performance_schema_accounts_size 100 performance_schema_digests_size 5000 performance_schema_events_stages_history_long_size 1000 -performance_schema_events_stages_history_size 10 +performance_schema_events_stages_history_size 20 performance_schema_events_statements_history_long_size 1000 -performance_schema_events_statements_history_size 10 +performance_schema_events_statements_history_size 20 performance_schema_events_waits_history_long_size 1000 -performance_schema_events_waits_history_size 10 +performance_schema_events_waits_history_size 20 performance_schema_hosts_size 100 -performance_schema_max_cond_classes 80 -performance_schema_max_cond_instances 1079 +performance_schema_max_cond_classes 90 +performance_schema_max_cond_instances 1363 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 50 performance_schema_max_file_handles 32768 -performance_schema_max_file_instances 1754 +performance_schema_max_file_instances 2500 performance_schema_max_mutex_classes 200 -performance_schema_max_mutex_instances 4230 +performance_schema_max_mutex_instances 5652 performance_schema_max_rwlock_classes 40 -performance_schema_max_rwlock_instances 2222 +performance_schema_max_rwlock_instances 3075 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances 232 -performance_schema_max_stage_classes\t160 -performance_schema_max_table_handles 573 -performance_schema_max_table_instances 556 +performance_schema_max_stage_classes 160 +performance_schema_max_table_handles 2858 +performance_schema_max_table_instances 667 performance_schema_max_thread_classes 50 performance_schema_max_thread_instances 289 performance_schema_session_connect_attrs_size 512 diff --git a/mysql-test/suite/perfschema/r/sizing_off.result b/mysql-test/suite/perfschema/r/sizing_off.result index e49a9824f42..d3c0a0de0a1 100644 --- a/mysql-test/suite/perfschema/r/sizing_off.result +++ b/mysql-test/suite/perfschema/r/sizing_off.result @@ -12,7 +12,7 @@ performance_schema_events_statements_history_size -1 performance_schema_events_waits_history_long_size -1 performance_schema_events_waits_history_size -1 performance_schema_hosts_size -1 -performance_schema_max_cond_classes 80 +performance_schema_max_cond_classes 90 performance_schema_max_cond_instances -1 performance_schema_max_digest_length 1024 performance_schema_max_file_classes 50 @@ -24,7 +24,7 @@ performance_schema_max_rwlock_classes 40 performance_schema_max_rwlock_instances -1 performance_schema_max_socket_classes 10 performance_schema_max_socket_instances -1 -performance_schema_max_stage_classes\t160 +performance_schema_max_stage_classes 160 performance_schema_max_table_handles -1 performance_schema_max_table_instances -1 performance_schema_max_thread_classes 50 diff --git a/mysql-test/suite/perfschema/t/sizing_default.cnf b/mysql-test/suite/perfschema/t/sizing_default.cnf index 6a929998329..0515832d41c 100644 --- a/mysql-test/suite/perfschema/t/sizing_default.cnf +++ b/mysql-test/suite/perfschema/t/sizing_default.cnf @@ -1,5 +1,5 @@ -!include include/default_mysqld_autosize.cnf +!include suite/perfschema/include/default_mysqld_autosize.cnf [mysqld.1] @@ -14,6 +14,8 @@ # Automated sizing for everything +loose-enable-performance-schema + loose-performance-schema-accounts-size=-1 loose-performance-schema-digests-size=-1 loose-performance-schema-hosts-size=-1 diff --git a/mysql-test/suite/perfschema/t/sizing_default.test b/mysql-test/suite/perfschema/t/sizing_default.test index d5fb8be9f77..f8086cc7afd 100644 --- a/mysql-test/suite/perfschema/t/sizing_default.test +++ b/mysql-test/suite/perfschema/t/sizing_default.test @@ -5,27 +5,25 @@ --source include/not_valgrind.inc --source ../include/have_aligned_memory.inc +#SELECT @@open_files_limit, @@table_open_cache, @@table_definition_cache, @@max_connections; +#exit; + # Skip test if not defaults is used. -let $max_open_files_limit= `SELECT @@open_files_limit < 5000`; -if ($max_open_files_limit) +if (`SELECT @@open_files_limit < 1024`) { - skip Need open_files_limit to be at least 5000; + skip Need open_files_limit to be at least 1024; } -let $max_table_open_cache= `SELECT @@table_open_cache != 2000`; -if ($max_table_open_cache) +if (`SELECT @@table_open_cache != 421`) { - skip Need table_open_cache to be exactly 2000; + skip Need table_open_cache to be exactly 421; } -let $max_table_definition_cache= `SELECT @@table_definition_cache != 1400`; -if ($max_table_definition_cache) +if (`SELECT @@table_definition_cache != 400`) { - skip Need table_definition_cache to be exactly 1400; + skip Need table_definition_cache to be exactly 400; } -let $max_connections= `SELECT @@max_connections != 151`; -if ($max_connections) +if (`SELECT @@max_connections != 151`) { skip Need max_connections to be exactly 151; } --source ../include/sizing_auto.inc - diff --git a/mysql-test/suite/perfschema/t/sizing_high.cnf b/mysql-test/suite/perfschema/t/sizing_high.cnf index 8445ff60928..519ad79f3ad 100644 --- a/mysql-test/suite/perfschema/t/sizing_high.cnf +++ b/mysql-test/suite/perfschema/t/sizing_high.cnf @@ -1,5 +1,5 @@ -!include include/default_mysqld_autosize.cnf +!include suite/perfschema/include/default_mysqld_autosize.cnf [mysqld.1] @@ -32,6 +32,7 @@ open_files_limit=1024 # max_connections*5 = 200*5 = 1000 # Automated sizing for everything +loose-enable-performance-schema loose-performance-schema-accounts-size=-1 loose-performance-schema-digests-size=-1 diff --git a/mysql-test/suite/perfschema/t/sizing_low.cnf b/mysql-test/suite/perfschema/t/sizing_low.cnf index 54c881830cf..79e891bda60 100644 --- a/mysql-test/suite/perfschema/t/sizing_low.cnf +++ b/mysql-test/suite/perfschema/t/sizing_low.cnf @@ -1,5 +1,5 @@ -!include include/default_mysqld_autosize.cnf +!include suite/perfschema/include/default_mysqld_autosize.cnf [mysqld.1] @@ -9,6 +9,7 @@ max_connections=50 open_files_limit=1024 # Automated sizing for everything +loose-enable-performance-schema loose-performance-schema-accounts-size=-1 loose-performance-schema-digests-size=-1 diff --git a/mysql-test/suite/perfschema/t/sizing_med.cnf b/mysql-test/suite/perfschema/t/sizing_med.cnf index 8aff531ea69..4a113272e38 100644 --- a/mysql-test/suite/perfschema/t/sizing_med.cnf +++ b/mysql-test/suite/perfschema/t/sizing_med.cnf @@ -1,5 +1,5 @@ -!include include/default_mysqld_autosize.cnf +!include suite/perfschema/include/default_mysqld_autosize.cnf [mysqld.1] @@ -9,6 +9,7 @@ max_connections=152 open_files_limit=1024 # Automated sizing for everything +loose-enable-performance-schema loose-performance-schema-accounts-size=-1 loose-performance-schema-digests-size=-1 diff --git a/mysql-test/suite/perfschema/t/sizing_off.cnf b/mysql-test/suite/perfschema/t/sizing_off.cnf index 24ca58bbb0b..80c00494791 100644 --- a/mysql-test/suite/perfschema/t/sizing_off.cnf +++ b/mysql-test/suite/perfschema/t/sizing_off.cnf @@ -1,5 +1,5 @@ -!include include/default_mysqld_autosize.cnf +!include suite/perfschema/include/default_mysqld_autosize.cnf [mysqld.1] -- cgit v1.2.1 From 7af5d96f002fedf873c6274b0a919e7fee2af805 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Fri, 16 Jul 2021 19:28:29 +0200 Subject: MDEV-22221: MariaDB with WolfSSL doesn't support AES-GCM cipher for SSL commit the forgotten result file followup for b81803f0657 --- mysql-test/main/wolfssl.result | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 mysql-test/main/wolfssl.result diff --git a/mysql-test/main/wolfssl.result b/mysql-test/main/wolfssl.result new file mode 100644 index 00000000000..88df540ca95 --- /dev/null +++ b/mysql-test/main/wolfssl.result @@ -0,0 +1,3 @@ +SELECT @@ssl_cipher; +@@ssl_cipher +ECDHE-RSA-AES256-GCM-SHA384 -- cgit v1.2.1 From 3e5a11e4889c97b781bb5828c8eed62251948a9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Tue, 20 Jul 2021 09:29:45 +0300 Subject: MDEV-25236 fixup: instant_alter_debug,dynamic result We only support the instantaneous removal of the NOT NULL attribute for ROW_FORMAT=REDUNDANT tables. --- mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff diff --git a/mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff b/mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff new file mode 100644 index 00000000000..379514edad9 --- /dev/null +++ b/mysql-test/suite/innodb/r/instant_alter_debug,dynamic.rdiff @@ -0,0 +1,6 @@ +@@ -470,4 +470,4 @@ + FROM information_schema.global_status + WHERE variable_name = 'innodb_instant_alter_column'; + instants +-33 ++32 -- cgit v1.2.1