summaryrefslogtreecommitdiff
path: root/mysql-test/main/bootstrap.test
diff options
context:
space:
mode:
authorDaniel Black <daniel@mariadb.org>2022-06-09 18:27:59 +1000
committerDaniel Black <daniel@mariadb.org>2022-06-18 01:16:49 +0300
commit0e4cf497ca11a7298e2bd896cb594bd52085a1d4 (patch)
tree9d5220627a3d0029a7636ab299c514f1eedff243 /mysql-test/main/bootstrap.test
parent5bb90cb2ac7b93f40c8ca4672ec7e2c18f0ea238 (diff)
downloadmariadb-git-0e4cf497ca11a7298e2bd896cb594bd52085a1d4.tar.gz
MDEV-28782 mariadb-tzinfo-to-sql to work in bootstrap mode
Work around MDEV-28718 for now, but also optimize the interation of information_schema.SYSTEM_VARIABLES. Add test case to show that tzinfo data into bootstrap is desired functionality. Bug report thanks to Dan Lenski of AWS.
Diffstat (limited to 'mysql-test/main/bootstrap.test')
-rw-r--r--mysql-test/main/bootstrap.test26
1 files changed, 26 insertions, 0 deletions
diff --git a/mysql-test/main/bootstrap.test b/mysql-test/main/bootstrap.test
index d75d3154064..e2f882f1d19 100644
--- a/mysql-test/main/bootstrap.test
+++ b/mysql-test/main/bootstrap.test
@@ -133,4 +133,30 @@ 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
+--echo #
+--echo # MDEV-28782 mariadb-tzinfo-to-sql to work in bootstrap mode
+--echo #
+
+--write_file $MYSQLTEST_VARDIR/tmp/tz.sql
+use test;
+
+create table time_zone like mysql.time_zone;
+create table time_zone_leap_second like mysql.time_zone_leap_second;
+create table time_zone_name like mysql.time_zone_name;
+create table time_zone_transition like mysql.time_zone_transition;
+create table time_zone_transition_type like mysql.time_zone_transition_type;
+
+EOF
+--exec $MYSQL_TZINFO_TO_SQL --skip-write-binlog std_data/zoneinfo/GMT GMT 2>/dev/null >> $MYSQLTEST_VARDIR/tmp/tz.sql
+--append_file $MYSQLTEST_VARDIR/tmp/tz.sql
+DROP TABLE time_zone, time_zone_leap_second, time_zone_name, time_zone_transition, time_zone_transition_type;
+EOF
+--exec $MYSQLD_BOOTSTRAP_CMD < $MYSQLTEST_VARDIR/tmp/tz.sql >> $MYSQLTEST_VARDIR/tmp/bootstrap.log 2>&1
+--remove_file $MYSQLTEST_VARDIR/tmp/tz.sql
+
+--echo #
+--echo # End of 10.6 tests
+--echo #
+
+# restore
--source include/start_mysqld.inc