1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Bug#20166 mysql-test-run.pl does not test system privilege tables creation

- Split out initial data in mysql_system_tables.sql to  it's own file
 - Use file from mysql_install_db and mysql-test-run


scripts/mysql_system_tables_fix.sql:
  Rename: scripts/mysql_fix_privilege_tables.sql.in -> scripts/mysql_system_tables_fix.sql
mysql-test/mysql-test-run.pl:
  - Add mysql_system_tables_data.sql as part of the bootstrap
  - Remove the addition of pid to end of bootstrap.sql, now
    to file used for bootstrap will be $opt_vardir/tmp/bootstrap.sql
  - Improve error message descibing how to find cause of a
    failed bootstrap
scripts/Makefile.am:
  - Rename mysql_fix_privileg_tables.sql.in to mysql_system_tables_fix.sql
  - Build mysql_fix_privilege_tables from mysql_system_tables.sql and
    mysql_system_tables_fix.sql
  - Add mysql_system_tables_fix.sql to EXTRA_DIST
scripts/mysql_install_db.sh:
  - Use mysql_system_tables_data.sql file when bootstrapping
    mysql, it will contain initial data for MysQL system tables
scripts/mysql_system_tables.sql:
  Move initial data for system tables to it's own file
scripts/mysql_system_tables_data.sql:
  Move initial data for system tables to it's own file
This commit is contained in:
unknown
2007-02-28 14:26:58 +01:00
parent dda46f74f0
commit 838e89dea6
6 changed files with 43 additions and 22 deletions

View File

@@ -138,10 +138,12 @@ fi
# Find SQL scripts needed for bootstrap
fill_help_tables="fill_help_tables.sql"
create_system_tables="mysql_system_tables.sql"
fill_system_tables="mysql_system_tables_data.sql"
if test -n "$srcdir"
then
fill_help_tables=$srcdir/scripts/$fill_help_tables
create_system_tables=$srcdir/scripts/$create_system_tables
fill_system_tables=$srcdir/scripts/$fill_system_tables
else
for i in $basedir/support-files $basedir/share $basedir/share/mysql \
$basedir/scripts `pwd` `pwd`/scripts @pkgdatadir@
@@ -154,6 +156,7 @@ else
fill_help_tables=$pkgdatadir/$fill_help_tables
create_system_tables=$pkgdatadir/$create_system_tables
fill_system_tables=$pkgdatadir/$fill_system_tables
fi
if test ! -f $create_system_tables
@@ -170,6 +173,13 @@ then
exit 1;
fi
if test ! -f $fill_system_tables
then
echo "FATAL ERROR: Could not find help file '$fill_system_tables' in"
echo "@pkgdatadir@ or inside $basedir"
exit 1;
fi
# Find executables and paths
mdata=$ldata/mysql
mysqld=$execdir/mysqld
@@ -273,7 +283,7 @@ mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
# Pipe mysql_system_tables.sql to "mysqld --bootstrap"
s_echo "Installing MySQL system tables..."
if `(echo "use mysql;"; cat $create_system_tables) | $mysqld_install_cmd_line`
if `(echo "use mysql;"; cat $create_system_tables $fill_system_tables) | $mysqld_install_cmd_line`
then
s_echo "OK"