diff options
author | Sergei Golubchik <serg@mariadb.org> | 2023-03-09 11:22:41 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2023-03-09 15:32:32 +0100 |
commit | 4c4939bbf619d7e516131c0b3e5691b1c2d2ff8f (patch) | |
tree | ea59ca44aa754836260d5306830317f4a780aa70 | |
parent | fb7d5881535574c0e33fa8338eaed9ecc7bc65c6 (diff) | |
download | mariadb-git-4c4939bbf619d7e516131c0b3e5691b1c2d2ff8f.tar.gz |
MDEV-30818 invalid ssl prevents bootstrap
in bootstrap the server reads stdin and does not listen to network.
it won't use ssl anyway
-rw-r--r-- | mysql-test/main/bootstrap.result | 3 | ||||
-rw-r--r-- | mysql-test/main/bootstrap.test | 5 | ||||
-rw-r--r-- | sql/mysqld.cc | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/mysql-test/main/bootstrap.result b/mysql-test/main/bootstrap.result index 7ea00923823..0b256263a29 100644 --- a/mysql-test/main/bootstrap.result +++ b/mysql-test/main/bootstrap.result @@ -61,5 +61,8 @@ truncate table mysql.plugin; # MDEV-13397 MariaDB upgrade fail when using default_time_zone # # +# MDEV-30818 invalid ssl prevents bootstrap +# +# # End of 10.3 tests # diff --git a/mysql-test/main/bootstrap.test b/mysql-test/main/bootstrap.test index 318842b550b..e3c121f201f 100644 --- a/mysql-test/main/bootstrap.test +++ b/mysql-test/main/bootstrap.test @@ -120,6 +120,11 @@ truncate table mysql.plugin; --exec $MYSQLD_BOOTSTRAP_CMD --default-time-zone=Europe/Moscow < $test_bootstrap >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 --echo # +--echo # MDEV-30818 invalid ssl prevents bootstrap +--echo # +--exec $MYSQLD_BOOTSTRAP_CMD --ssl-ca=/dev/nonexistent < $test_bootstrap >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 + +--echo # --echo # End of 10.3 tests --echo # --remove_file $test_bootstrap diff --git a/sql/mysqld.cc b/sql/mysqld.cc index ea3849ed9f9..68f66c37b6c 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -5026,7 +5026,10 @@ static void init_ssl() { sql_print_error("Failed to setup SSL"); sql_print_error("SSL error: %s", sslGetErrString(error)); - unireg_abort(1); + if (!opt_bootstrap) + unireg_abort(1); + opt_use_ssl = 0; + have_ssl= SHOW_OPTION_DISABLED; } if (global_system_variables.log_warnings > 0) { |