Commit 188af9a4 authored by unknown's avatar unknown

Add support for bootstrapping from init_db.sql, which is used in

early versions of 5.1 and 5.0
Fix usage instruction of defaults_extra_file
parent d5ad327b
......@@ -2020,6 +2020,9 @@ sub sql_to_bootstrap {
next;
}
# Replace @HOSTNAME with localhost
$line=~ s/\'\@HOSTNAME\@\'/localhost/;
# Default, just add the line without newline
# but with a space as separator
$result.= "$line ";
......@@ -2071,6 +2074,8 @@ sub mysql_install_db {
# ----------------------------------------------------------------------
my $bootstrap_sql_file= "$opt_vardir/tmp/bootstrap.sql";
if (-f "$path_sql_dir/mysql_system_tables.sql")
{
# Use the mysql database for system tables
mtr_tofile($bootstrap_sql_file, "use mysql\n");
......@@ -2090,6 +2095,20 @@ sub mysql_install_db {
mtr_appendfile_to_file("$path_sql_dir/mysql_test_data_timezone.sql",
$bootstrap_sql_file);
}
else
{
# Install db from init_db.sql that exist in early 5.1 and 5.0
# versions of MySQL
my $init_file= "$basedir/mysql-test/lib/init_db.sql";
mtr_report(" - from '$init_file'");
my $text= mtr_grab_file($init_file) or
mtr_error("Can't open '$init_file': $!");
mtr_tofile($bootstrap_sql_file,
sql_to_bootstrap($text));
}
# Fill help tables, just an empty file when running from bk repo
# but will be replaced by a real fill_help_tables.sql when
# building the source dist
......@@ -3741,7 +3760,7 @@ Options to control what engine/variation to run
config|defaults-file=<config template> Use fixed config template for all
tests
extra_defaults_file=<config template> Extra config template to add to
defaults_extra_file=<config template> Extra config template to add to
all generated configs
Options to control directories to use
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment