diff options
author | unknown <tsmith@siva.hindu.god> | 2007-01-09 19:22:01 -0700 |
---|---|---|
committer | unknown <tsmith@siva.hindu.god> | 2007-01-09 19:22:01 -0700 |
commit | c2e9a4af2dcebee419398a17530ef5c28d7962a9 (patch) | |
tree | 66654967ac4cd7bca3c3211426681a8f9ce3879d /mysql-test/mysql-test-run.pl | |
parent | a1ecbab689ed475ce61c05c7b02609b1efe5e660 (diff) | |
download | mariadb-git-c2e9a4af2dcebee419398a17530ef5c28d7962a9.tar.gz |
WL #3670: Compile-time option to remove GRANT-related startup options
- configure --disable-grant-options defines DISABLE_GRANT_OPTIONS
- configure.js/cmake also updated
- if DISABLE_GRANT_OPTIONS is defined, mysqld no longer recognizes:
--bootstrap
--init-file
--skip-grant-tables
Scripts which rely on those three options are modified to check the environment for MYSQLD_BOOTSTRAP; it should be set to the full path of a mysqld which does handle those options.
For example:
$ export MYSQLD_BOOTSTRAP
$ MYSQLD_BOOTSTRAP=/path/to/full/MySQL/bin/mysqld
$ mysql_install_db
$ make test
configure.in:
WL#3670
Add --disable-grant-options
mysql-test/install_test_db.sh:
Add MYSQLD_BOOTSTRAP env variable, to enable test suite to work even if mysqld does not accept --bootstrap or --skip-grant-tables.
mysql-test/mysql-test-run.pl:
Add MYSQLD_BOOTSTRAP env variable, to enable test suite to work even if mysqld does not accept --bootstrap or --skip-grant-tables.
mysql-test/mysql_test_run_new.c:
Mention need for MYSQLD_BOOTSTRAP in a comment, in case this needs to be used with a mysqld which does not accept the --bootstrap option.
scripts/mysql_install_db.sh:
Add MYSQLD_BOOTSTRAP env variable, to enable mysqld_install_db to work even if mysqld does not accept --bootstrap or --skip-grant-tables.
sql/CMakeLists.txt:
Add DISABLE_GRANT_OPTIONS define
sql/mysqld.cc:
Add DISABLE_GRANT_OPTIONS define, which removes the --bootstrap, --init-file, and --skip-grant-tables options
win/README:
Document the DISABLE_GRANT_OPTIONS define
win/configure.js:
Handle DISABLE_GRANT_OPTIONS
Diffstat (limited to 'mysql-test/mysql-test-run.pl')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 36f5b0a776f..b56b385a2bf 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -2873,12 +2873,19 @@ sub install_db ($$) { mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir); } + # If DISABLE_GRANT_OPTIONS is defined when the server is compiled (e.g., + # configure --disable-grant-options), mysqld will not recognize the + # --bootstrap or --skip-grant-tables options. The user can set + # MYSQLD_BOOTSTRAP to the full path to a mysqld which does accept + # --bootstrap, to accommodate this. + my $exe_mysqld_bootstrap = $ENV{'MYSQLD_BOOTSTRAP'} || $exe_mysqld; + # Log bootstrap command my $path_bootstrap_log= "$opt_vardir/log/bootstrap.log"; mtr_tofile($path_bootstrap_log, - "$exe_mysqld " . join(" ", @$args) . "\n"); + "$exe_mysqld_bootstrap " . join(" ", @$args) . "\n"); - if ( mtr_run($exe_mysqld, $args, $init_db_sql_tmp, + if ( mtr_run($exe_mysqld_bootstrap, $args, $init_db_sql_tmp, $path_bootstrap_log, $path_bootstrap_log, "", { append_log_file => 1 }) != 0 ) |