Skip to content

Commit

Permalink
MDEV-30818 invalid ssl prevents bootstrap
Browse files Browse the repository at this point in the history
in bootstrap the server reads stdin and does not listen to network.
it won't use ssl anyway
  • Loading branch information
vuvova committed Mar 9, 2023
1 parent fb7d588 commit 4c4939b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
3 changes: 3 additions & 0 deletions mysql-test/main/bootstrap.result
Expand Up @@ -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
#
5 changes: 5 additions & 0 deletions mysql-test/main/bootstrap.test
Expand Up @@ -119,6 +119,11 @@ truncate table mysql.plugin;
--echo #
--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 #
Expand Down
5 changes: 4 additions & 1 deletion sql/mysqld.cc
Expand Up @@ -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)
{
Expand Down

0 comments on commit 4c4939b

Please sign in to comment.