diff options
author | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2012-08-24 15:01:31 +0300 |
---|---|---|
committer | Georgi Kodinov <Georgi.Kodinov@Oracle.com> | 2012-08-24 15:01:31 +0300 |
commit | 9c227f4f920b41fb820f5e309551f0faaad7f284 (patch) | |
tree | 4896f59dcf3a203c8d6fc552ee47ab380e9cb7b1 /scripts | |
parent | 3bcbacd8e66d690143ff86af2232cc8ae1789a1a (diff) | |
download | mariadb-git-9c227f4f920b41fb820f5e309551f0faaad7f284.tar.gz |
Bug #14181049: MYSQL_INSTALL_DB.PL CREATES EMPTY SYSTEM TABLES FOR MYSQL
The script is different from what's used on unixes.
It was not playing the table insertion script (mysql_system_tables_data.sql),
although it was checking for the presence of this script.
Fixed by re-enabling the lookup for this file and replaying it at bootstrap
time. Note that on the Unixes "SELECT @@hostname" does return a fully qualified
name, whereas on Windows it returns only a hostname.
So by default we're filtering records in the mysql.user table until we ensure
this is fixed.
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/mysql_install_db.pl.in | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/scripts/mysql_install_db.pl.in b/scripts/mysql_install_db.pl.in index c63da6df537..12cd6a21ad1 100644 --- a/scripts/mysql_install_db.pl.in +++ b/scripts/mysql_install_db.pl.in @@ -423,10 +423,11 @@ my $mysqld_install_cmd_line = quote_options($mysqld_bootstrap, "--bootstrap", "--basedir=$opt->{basedir}", "--datadir=$opt->{ldata}", - "--skip-innodb", - "--skip-bdb", - "--skip-ndbcluster", + "--log-warnings=0", + "--loose-skip-innodb", + "--loose-skip-ndbcluster", "--max_allowed_packet=8M", + "--default-storage-engine=MyISAM", "--net_buffer_length=16K", @args, ); @@ -439,6 +440,8 @@ report_verbose_wait($opt,"Installing MySQL system tables..."); open(SQL, $create_system_tables) or error($opt,"can't open $create_system_tables for reading: $!"); +open(SQL2, $fill_system_tables) + or error($opt,"can't open $fill_system_tables for reading: $!"); # FIXME > /dev/null ? if ( open(PIPE, "| $mysqld_install_cmd_line") ) { @@ -452,8 +455,20 @@ if ( open(PIPE, "| $mysqld_install_cmd_line") ) print PIPE $_; } + while ( <SQL2> ) + { + # TODO: make it similar to the above condition when we're sure + # @@hostname returns a fqdn + # When doing a "cross bootstrap" install, no reference to the current + # host should be added to the system tables. So we filter out any + # lines which contain the current host name. + next if /\@current_hostname/; + + print PIPE $_; + } close PIPE; close SQL; + close SQL2; report_verbose($opt,"OK"); |