diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-07-14 00:51:23 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-07-19 11:35:38 +0200 |
commit | 40f29ecbf1c8bf36be443c40382fe8cdc8a7f413 (patch) | |
tree | 495bdf7d4a2ba3787bdd0999a07f93a02126c56c | |
parent | 33eccb577657a127a877cea53ee4dc41cb4604c2 (diff) | |
download | mariadb-git-40f29ecbf1c8bf36be443c40382fe8cdc8a7f413.tar.gz |
MDEV-13397 MariaDB upgrade fail when using default_time_zone
don't try to set default time zone in --bootstrap,
this generally cannot be done, as timezone tables aren't loaded.
and bootstrap scripts don't need it anyway.
-rw-r--r-- | mysql-test/t/bootstrap.test | 9 | ||||
-rw-r--r-- | sql/tztime.cc | 2 |
2 files changed, 10 insertions, 1 deletions
diff --git a/mysql-test/t/bootstrap.test b/mysql-test/t/bootstrap.test index 5ab736cee15..3df3919220e 100644 --- a/mysql-test/t/bootstrap.test +++ b/mysql-test/t/bootstrap.test @@ -105,3 +105,12 @@ use test; EOF --exec $MYSQLD_BOOTSTRAP_CMD --ignore-db-dirs='some_dir' --ignore-db-dirs='some_dir' < $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 --remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql + +# +# MDEV-13397 MariaDB upgrade fail when using default_time_zone +# +--write_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql +use test; +EOF +--exec $MYSQLD_BOOTSTRAP_CMD --default-time-zone=Europe/Moscow < $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1 +--remove_file $MYSQLTEST_VARDIR/tmp/bootstrap_9969.sql diff --git a/sql/tztime.cc b/sql/tztime.cc index 75b732f4436..9933c1e6364 100644 --- a/sql/tztime.cc +++ b/sql/tztime.cc @@ -1663,7 +1663,7 @@ my_tz_init(THD *org_thd, const char *default_tzname, my_bool bootstrap) { /* If we are in bootstrap mode we should not load time zone tables */ return_val= time_zone_tables_exist= 0; - goto end_with_setting_default_tz; + goto end_with_cleanup; } /* |