diff options
24 files changed, 42 insertions, 40 deletions
@@ -1,3 +1,4 @@ MYSQL_VERSION_MAJOR=10 MYSQL_VERSION_MINOR=3 MYSQL_VERSION_PATCH=3 +SERVER_MATURITY=beta diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index 02579c9534e..0694246af18 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -48,6 +48,7 @@ MACRO(GET_MYSQL_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_MINOR" MINOR_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_PATCH" PATCH_VERSION) MYSQL_GET_CONFIG_VALUE("MYSQL_VERSION_EXTRA" EXTRA_VERSION) + MYSQL_GET_CONFIG_VALUE("SERVER_MATURITY" SERVER_MATURITY) IF(NOT "${MAJOR_VERSION}" MATCHES "[0-9]+" OR NOT "${MINOR_VERSION}" MATCHES "[0-9]+" OR @@ -69,6 +70,10 @@ ENDMACRO() # Get mysql version and other interesting variables GET_MYSQL_VERSION() +# Maturity level +string(TOUPPER ${SERVER_MATURITY} SERVER_MATURITY) +SET(SERVER_MATURITY_LEVEL MariaDB_PLUGIN_MATURITY_${SERVER_MATURITY}) + SET(MYSQL_TCP_PORT_DEFAULT 0) IF(NOT MYSQL_TCP_PORT) SET(MYSQL_TCP_PORT 3306) diff --git a/extra/mariabackup/encryption_plugin.cc b/extra/mariabackup/encryption_plugin.cc index b88c149673b..7f230256e7a 100644 --- a/extra/mariabackup/encryption_plugin.cc +++ b/extra/mariabackup/encryption_plugin.cc @@ -165,6 +165,7 @@ static void encryption_plugin_init(int argc, char **argv) { /* Patch optional and mandatory plugins, we only need to load the one in xb_plugin_load. */ mysql_optional_plugins[0] = mysql_mandatory_plugins[0] = 0; + plugin_maturity = MariaDB_PLUGIN_MATURITY_UNKNOWN; /* mariabackup accepts all plugins */ msg("Loading encryption plugin\n"); for (int i= 1; i < argc; i++) msg("\t Encryption plugin parameter : '%s'\n", argv[i]); diff --git a/include/mysql_version.h.in b/include/mysql_version.h.in index f22e00dabb9..59df2b7c086 100644 --- a/include/mysql_version.h.in +++ b/include/mysql_version.h.in @@ -22,6 +22,7 @@ #define MYSQL_UNIX_ADDR "@MYSQL_UNIX_ADDR@" #define MYSQL_CONFIG_NAME "my" #define MYSQL_COMPILATION_COMMENT "@COMPILATION_COMMENT@" +#define SERVER_MATURITY_LEVEL @SERVER_MATURITY_LEVEL@ #ifdef WITH_WSREP #define WSREP_PATCH_VERSION "@WSREP_PATCH_VERSION@" diff --git a/mysql-test/include/default_mysqld.cnf b/mysql-test/include/default_mysqld.cnf index 44a7fd12d27..69a2b58288b 100644 --- a/mysql-test/include/default_mysqld.cnf +++ b/mysql-test/include/default_mysqld.cnf @@ -17,7 +17,7 @@ # Default values that applies to all MySQL Servers [mysqld] disable-getopt-prefix-matching - +plugin-maturity=unknown open-files-limit= 1024 local-infile character-set-server= latin1 diff --git a/mysql-test/include/mtr_warnings.sql b/mysql-test/include/mtr_warnings.sql index 71c693961c1..b7b2a316dfb 100644 --- a/mysql-test/include/mtr_warnings.sql +++ b/mysql-test/include/mtr_warnings.sql @@ -224,6 +224,12 @@ INSERT INTO global_suppressions VALUES ("Slave I/O: Setting @slave_gtid_ignore_duplicates failed with error.*"), ("Slave I/O: Setting @slave_until_gtid failed with error.*"), ("Slave I/O: Get master GTID position failed with error.*"), + + /* + MDEV-12501 -- set --maturity-level by default + */ + ("Plugin .* is of maturity level .* while the server is .*"), + ("THE_LAST_SUPPRESSION")|| diff --git a/mysql-test/r/mysqld--help.result b/mysql-test/r/mysqld--help.result index 0992276227f..f76957fdcba 100644 --- a/mysql-test/r/mysqld--help.result +++ b/mysql-test/r/mysqld--help.result @@ -1535,7 +1535,6 @@ performance-schema-session-connect-attrs-size -1 performance-schema-setup-actors-size 100 performance-schema-setup-objects-size 100 performance-schema-users-size -1 -plugin-maturity unknown port 3306 port-open-timeout 0 preload-buffer-size 32768 diff --git a/mysql-test/suite/galera/galera_2nodes.cnf b/mysql-test/suite/galera/galera_2nodes.cnf index b24f3603894..8de704dbec8 100644 --- a/mysql-test/suite/galera/galera_2nodes.cnf +++ b/mysql-test/suite/galera/galera_2nodes.cnf @@ -4,6 +4,7 @@ [mysqld] wsrep-on=1 binlog-format=row +plugin-maturity=unknown innodb-autoinc-lock-mode=2 default-storage-engine=innodb wsrep-provider=@ENV.WSREP_PROVIDER diff --git a/mysql-test/suite/galera/suite.opt b/mysql-test/suite/galera/suite.opt new file mode 100644 index 00000000000..8374626febe --- /dev/null +++ b/mysql-test/suite/galera/suite.opt @@ -0,0 +1 @@ +--plugin-maturity=unknown diff --git a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf index 91aa53ad7b1..48b3c002c04 100644 --- a/mysql-test/suite/galera_3nodes/galera_3nodes.cnf +++ b/mysql-test/suite/galera_3nodes/galera_3nodes.cnf @@ -3,6 +3,7 @@ [mysqld] binlog-format=row +plugin-maturity=unknown innodb-autoinc-lock-mode=2 default-storage-engine=innodb diff --git a/mysql-test/suite/rpl/suite.opt b/mysql-test/suite/rpl/suite.opt new file mode 100644 index 00000000000..8374626febe --- /dev/null +++ b/mysql-test/suite/rpl/suite.opt @@ -0,0 +1 @@ +--plugin-maturity=unknown diff --git a/mysql-test/suite/sys_vars/inc/sysvars_server.inc b/mysql-test/suite/sys_vars/inc/sysvars_server.inc index b5c800e858a..37491315c3e 100644 --- a/mysql-test/suite/sys_vars/inc/sysvars_server.inc +++ b/mysql-test/suite/sys_vars/inc/sysvars_server.inc @@ -26,6 +26,7 @@ select * from information_schema.system_variables 'lower_case_file_system', 'lower_case_table_names', 'open_files_limit', + 'plugin_maturity', 'rand_seed1', 'rand_seed2', 'system_time_zone', diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result index 6fb52700556..41dec216ddb 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_embedded.result @@ -15,6 +15,7 @@ variable_name not in ( 'lower_case_file_system', 'lower_case_table_names', 'open_files_limit', +'plugin_maturity', 'rand_seed1', 'rand_seed2', 'system_time_zone', @@ -3188,20 +3189,6 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED -VARIABLE_NAME PLUGIN_MATURITY -SESSION_VALUE NULL -GLOBAL_VALUE unknown -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE unknown -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE ENUM -VARIABLE_COMMENT The lowest desirable plugin maturity. Plugins less mature than that will not be installed or loaded -NUMERIC_MIN_VALUE NULL -NUMERIC_MAX_VALUE NULL -NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST unknown,experimental,alpha,beta,gamma,stable -READ_ONLY YES -COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PORT SESSION_VALUE NULL GLOBAL_VALUE MASTER_MYPORT diff --git a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result index 1b26180b710..8591f4b0c28 100644 --- a/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result +++ b/mysql-test/suite/sys_vars/r/sysvars_server_notembedded.result @@ -15,6 +15,7 @@ variable_name not in ( 'lower_case_file_system', 'lower_case_table_names', 'open_files_limit', +'plugin_maturity', 'rand_seed1', 'rand_seed2', 'system_time_zone', @@ -3398,20 +3399,6 @@ NUMERIC_BLOCK_SIZE NULL ENUM_VALUE_LIST NULL READ_ONLY YES COMMAND_LINE_ARGUMENT REQUIRED -VARIABLE_NAME PLUGIN_MATURITY -SESSION_VALUE NULL -GLOBAL_VALUE unknown -GLOBAL_VALUE_ORIGIN COMPILE-TIME -DEFAULT_VALUE unknown -VARIABLE_SCOPE GLOBAL -VARIABLE_TYPE ENUM -VARIABLE_COMMENT The lowest desirable plugin maturity. Plugins less mature than that will not be installed or loaded -NUMERIC_MIN_VALUE NULL -NUMERIC_MAX_VALUE NULL -NUMERIC_BLOCK_SIZE NULL -ENUM_VALUE_LIST unknown,experimental,alpha,beta,gamma,stable -READ_ONLY YES -COMMAND_LINE_ARGUMENT REQUIRED VARIABLE_NAME PORT SESSION_VALUE NULL GLOBAL_VALUE MASTER_MYPORT diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test index e8589fa9242..1ae9b13e050 100644 --- a/mysql-test/t/bootstrap.test +++ b/mysql-test/t/bootstrap.test @@ -7,7 +7,7 @@ drop table if exists t1; # Add the datadir to the bootstrap command let $MYSQLD_DATADIR= `select @@datadir`; -let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --default-storage-engine=MyISAM --loose-skip-innodb; +let $MYSQLD_BOOTSTRAP_CMD= $MYSQLD_BOOTSTRAP_CMD --datadir=$MYSQLD_DATADIR --default-storage-engine=MyISAM --loose-skip-innodb --plugin-maturity=unknown; # # Check that --bootstrap reads from stdin # diff --git a/mysql-test/t/mysqld--help.test b/mysql-test/t/mysqld--help.test index 1613f8e7a4f..f859d7dd9d6 100644 --- a/mysql-test/t/mysqld--help.test +++ b/mysql-test/t/mysqld--help.test @@ -19,7 +19,7 @@ exec $MYSQLD_BOOTSTRAP_CMD --symbolic-links=0 --lower-case-table-names=1 --help perl; # Variables which we don't want to display in the result file since # their paths may vary: - @skipvars=qw/basedir open-files-limit general-log-file log plugin-dir + @skipvars=qw/basedir open-files-limit general-log-file log plugin-dir plugin-maturity log-slow-queries pid-file slow-query-log-file log-basename datadir slave-load-tmpdir tmpdir socket thread-pool-size large-files-support lower-case-file-system system-time-zone diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 9478db8e6d5..462829a255b 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1155,6 +1155,7 @@ static bool plugin_add(MEM_ROOT *tmp_root, report_error(report, ER_CANT_OPEN_LIBRARY, dl->str, ENOEXEC, buf); goto err; } + if (plugin_maturity_map[plugin->maturity] < plugin_maturity) { char buf[256]; @@ -1167,6 +1168,14 @@ static bool plugin_add(MEM_ROOT *tmp_root, report_error(report, ER_CANT_OPEN_LIBRARY, dl->str, EPERM, buf); goto err; } + else if (plugin_maturity_map[plugin->maturity] < SERVER_MATURITY_LEVEL) + { + sql_print_warning("Plugin '%s' is of maturity level %s while the server is %s", + tmp.name.str, + plugin_maturity_names[plugin->maturity], + plugin_maturity_names[SERVER_MATURITY_LEVEL]); + } + tmp.plugin= plugin; tmp.ref_count= 0; tmp.state= PLUGIN_IS_UNINITIALIZED; diff --git a/sql/sys_vars.cc b/sql/sys_vars.cc index 4b8a712675b..c67be1dbaf8 100644 --- a/sql/sys_vars.cc +++ b/sql/sys_vars.cc @@ -5382,7 +5382,9 @@ static Sys_var_enum Sys_plugin_maturity( "The lowest desirable plugin maturity. " "Plugins less mature than that will not be installed or loaded", READ_ONLY GLOBAL_VAR(plugin_maturity), CMD_LINE(REQUIRED_ARG), - plugin_maturity_names, DEFAULT(MariaDB_PLUGIN_MATURITY_UNKNOWN)); + plugin_maturity_names, + DEFAULT(SERVER_MATURITY_LEVEL > 0 ? + SERVER_MATURITY_LEVEL - 1 : SERVER_MATURITY_LEVEL)); static Sys_var_ulong Sys_deadlock_search_depth_short( "deadlock_search_depth_short", diff --git a/storage/rocksdb/mysql-test/rocksdb/suite.opt b/storage/rocksdb/mysql-test/rocksdb/suite.opt index f5dc0ce891c..47efa90a739 100644 --- a/storage/rocksdb/mysql-test/rocksdb/suite.opt +++ b/storage/rocksdb/mysql-test/rocksdb/suite.opt @@ -1,2 +1 @@ ---ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --default-storage-engine=rocksdb - +--ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --default-storage-engine=rocksdb --plugin-maturity=unknown diff --git a/storage/rocksdb/mysql-test/rocksdb_hotbackup/suite.opt b/storage/rocksdb/mysql-test/rocksdb_hotbackup/suite.opt new file mode 100644 index 00000000000..8374626febe --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb_hotbackup/suite.opt @@ -0,0 +1 @@ +--plugin-maturity=unknown diff --git a/storage/rocksdb/mysql-test/rocksdb_rpl/suite.opt b/storage/rocksdb/mysql-test/rocksdb_rpl/suite.opt index f5dc0ce891c..47efa90a739 100644 --- a/storage/rocksdb/mysql-test/rocksdb_rpl/suite.opt +++ b/storage/rocksdb/mysql-test/rocksdb_rpl/suite.opt @@ -1,2 +1 @@ ---ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --default-storage-engine=rocksdb - +--ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --default-storage-engine=rocksdb --plugin-maturity=unknown diff --git a/storage/rocksdb/mysql-test/rocksdb_stress/suite.opt b/storage/rocksdb/mysql-test/rocksdb_stress/suite.opt new file mode 100644 index 00000000000..8374626febe --- /dev/null +++ b/storage/rocksdb/mysql-test/rocksdb_stress/suite.opt @@ -0,0 +1 @@ +--plugin-maturity=unknown diff --git a/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.opt b/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.opt index 431fc331458..5ce5cf3e713 100644 --- a/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.opt +++ b/storage/rocksdb/mysql-test/rocksdb_sys_vars/suite.opt @@ -1,2 +1 @@ ---ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO - +--ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --plugin-maturity=unknown diff --git a/storage/rocksdb/mysql-test/storage_engine/suite.opt b/storage/rocksdb/mysql-test/storage_engine/suite.opt index 8eb0e87db98..5095f18b098 100644 --- a/storage/rocksdb/mysql-test/storage_engine/suite.opt +++ b/storage/rocksdb/mysql-test/storage_engine/suite.opt @@ -1 +1 @@ ---ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --binlog_format=ROW --collation-server=latin1_bin --loose-rocksdb_flush_log_at_trx_commit=0 +--ignore-db-dirs=.rocksdb --plugin-load=$HA_ROCKSDB_SO --binlog_format=ROW --collation-server=latin1_bin --loose-rocksdb_flush_log_at_trx_commit=0 --plugin-maturity=unknown |