Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-11-15 15:24:49+01:00, msvensson@neptunus.(none) +5 -0
Merge neptunus.(none):/home/msvensson/mysql/bug20166/my41-bug20166
into neptunus.(none):/home/msvensson/mysql/bug20166/my50-bug20166
MERGE: 1.1616.2144.204
BitKeeper/deleted/.del-init_db.sql@stripped, 2006-11-15 15:24:15+01:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.4.1.2
BitKeeper/deleted/.del-init_db.sql@stripped, 2006-11-15 15:24:15+01:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/lib/init_db.sql -> BitKeeper/deleted/.del-init_db.sql
BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7@stripped, 2006-11-15 15:24:15+01:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.2.1.1
BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7@stripped, 2006-11-15 15:24:15+01:00, msvensson@neptunus.(none) +0 -0
Merge rename: mysql-test/init_db.sql -> BitKeeper/deleted/.del-init_db.sql~af2dfeabaa348dd7
mysql-test/Makefile.am@stripped, 2006-11-15 15:24:47+01:00, msvensson@neptunus.(none) +0 -0
SCCS merged
MERGE: 1.39.1.17
mysql-test/mysql-test-run.pl@stripped, 2006-11-15 15:24:15+01:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.8.9.87
scripts/Makefile.am@stripped, 2006-11-15 15:24:15+01:00, msvensson@neptunus.(none) +0 -0
Auto merged
MERGE: 1.39.1.9
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/bug20166/my50-bug20166/RESYNC
--- 1.52/scripts/Makefile.am 2006-11-15 15:24:54 +01:00
+++ 1.53/scripts/Makefile.am 2006-11-15 15:24:54 +01:00
@@ -34,7 +34,8 @@ bin_SCRIPTS = @server_scripts@ \
mysql_tableinfo \
mysql_upgrade_shell \
mysqld_multi \
- mysql_create_system_tables
+ mysql_create_system_tables \
+ mysql_create_system_tables.sql
noinst_SCRIPTS = make_binary_distribution \
make_sharedlib_distribution \
@@ -69,7 +70,9 @@ EXTRA_DIST = $(EXTRA_SCRIPTS) \
mysqlbug \
make_win_bin_dist
-dist_pkgdata_DATA = fill_help_tables.sql mysql_fix_privilege_tables.sql
+dist_pkgdata_DATA = fill_help_tables.sql \
+ mysql_fix_privilege_tables.sql \
+ mysql_create_system_tables.sql
# mysqlbug should be distributed built so that people can report build
# failures with it.
@@ -93,7 +96,8 @@ CLEANFILES = @server_scripts@ \
mysql_upgrade_shell \
mysqld_multi \
make_win_src_distribution \
- mysql_create_system_tables
+ mysql_create_system_tables \
+ mysql_create_system_tables.sql
DISTCLEANFILES = mysqlbug
@@ -153,6 +157,12 @@ SUFFIXES = .sh
$< > $@-t
@CHMOD@ +x $@-t
@MV@ $@-t $@
+#
+# Build mysql_create_system_tables.sql by executing mysql_create_system_tables
+# the file will contain test data as well
+mysql_create_system_tables.sql: mysql_create_system_tables
+ $(top_builddir)/scripts/mysql_create_system_tables \
+ test . \@HOSTNAME\@ > $@
# Don't update the files from bitkeeper
%::SCCS/s.%
--- 1.149/mysql-test/mysql-test-run.pl 2006-11-15 15:24:54 +01:00
+++ 1.150/mysql-test/mysql-test-run.pl 2006-11-15 15:24:54 +01:00
@@ -2635,40 +2635,79 @@ sub copy_install_db ($$) {
}
-sub install_db ($$) {
- my $type= shift;
- my $data_dir= shift;
-
- my $init_db_sql= "lib/init_db.sql";
- my $init_db_sql_tmp= "/tmp/init_db.sql$$";
- my $args;
-
- mtr_report("Installing \u$type Database");
-
- open(IN, $init_db_sql)
- or mtr_error("Can't open $init_db_sql: $!");
- open(OUT, ">", $init_db_sql_tmp)
- or mtr_error("Can't write to $init_db_sql_tmp: $!");
+#
+# Append one file to the bootstrap file
+# - replace the hostname
+# - check that format is correct for bootstrapping
+#
+sub bootstrap_append($$)
+{
+ my ($from_file, $to_file)= @_;
+
+ open(IN, "<", $from_file)
+ or mtr_error("Can't read from to $from_file: $!");
+ open(OUT, ">>", $to_file)
+ or mtr_error("Can't write to $to_file: $!");
while (<IN>)
{
chomp;
s/\@HOSTNAME\@/$glob_hostname/;
if ( /^\s*$/ )
{
+ # Allow empty lines
print OUT "\n";
}
elsif (/;$/)
{
+ # Allow lines ending in ;
print OUT "$_\n";
}
else
{
- print OUT "$_ ";
+ # Everything else is an error
+ mtr_error("Wrong format of SQL statement for bootstrap " .
+ "detected in file: \"$from_file\" " .
+ "at line containing \"$_\"");
}
}
close OUT;
close IN;
+}
+#
+# Bootstrap mysqld with the contents of mysql_create_system_tables.sql
+# and some test data files depending on version
+#
+# In 4.1 mysql_create_system_tables.sql file is built from the output of
+# "mysql_create_system_tables.sh test" and will thus contain test data
+# for timezone related files as well, no additional files are needed
+#
+# In 5.0 and upwards, the mysql_create_system_tables.sql becomes the
+# original location of the SQL that creates the system tables and can
+# thus be sourced directly. It will however not contain any test data
+# and that has to be added to the bootstrap file
+#
+sub install_db ($$) {
+ my $type= shift;
+ my $data_dir= shift;
+
+ my $bootstrap_sql_file= "/tmp/bootstrap.sql$$";
+
+ mtr_report("Installing \u$type Database");
+
+ # Make sure to start from scratch
+ unlink($bootstrap_sql_file);
+
+ bootstrap_append("$glob_basedir/scripts/mysql_create_system_tables.sql",
+ $bootstrap_sql_file);
+
+ if ($mysql_version_id >= 50000)
+ {
+ bootstrap_append("$glob_basedir/scripts/mysql_test_data_timezone.sql",
+ $bootstrap_sql_file);
+ }
+
+ my $args;
mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults");
@@ -2699,16 +2738,16 @@ sub install_db ($$) {
mtr_tofile($path_bootstrap_log,
"$exe_mysqld " . join(" ", @$args) . "\n");
- if ( mtr_run($exe_mysqld, $args, $init_db_sql_tmp,
+ if ( mtr_run($exe_mysqld, $args, $bootstrap_sql_file,
$path_bootstrap_log, $path_bootstrap_log,
"", { append_log_file => 1 }) != 0 )
{
- unlink($init_db_sql_tmp);
+ unlink($bootstrap_sql_file);
mtr_error("Error executing mysqld --bootstrap\n" .
"Could not install $type test DBs");
}
- unlink($init_db_sql_tmp);
+ unlink($bootstrap_sql_file);
}
--- 1.73/mysql-test/Makefile.am 2006-11-15 15:24:54 +01:00
+++ 1.74/mysql-test/Makefile.am 2006-11-15 15:24:54 +01:00
@@ -65,7 +65,6 @@ dist-hook:
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(distdir)/std_data
- $(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(distdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(distdir)/lib
install-data-local:
@@ -95,7 +94,6 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/std_data/*.pem $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.frm $(DESTDIR)$(testdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.cnf $(DESTDIR)$(testdir)/std_data
- $(INSTALL_DATA) $(srcdir)/lib/init_db.sql $(DESTDIR)$(testdir)/lib
$(INSTALL_DATA) $(srcdir)/lib/*.pl $(DESTDIR)$(testdir)/lib
uninstall-local:
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2296) | msvensson | 15 Nov |