Fix is to remove any references to the current hostname when running
mysql_install_db --cross-bootstrap. (The dist-hook make target makes
this call, and the resulting data directory is included in the source
distribution as win/data/*.)
Also, a few other clean-ups to mysql_install_db while there.
to install system tables directly from the source tree (useful for
testing purposes). This helps clean the script up a lot and clarify
the three possible ways the script can be called (using compiled-in
paths, passing --basedir pointing to alternative install location,
or --srcdir). Include further tidying as well.
This fixes bug#30759.
were accidentally removed during a previous rototill of this
code. Fixes bug#27692.
While it can be argued we should strive to provide a 'secure by
default' installation, this happens to be the setup currently
documented in the manual as the default, so defer changes that
improve security out of the box to a co-ordinated effort later
on.
For now, make a note about the test databases and anonymous user
in mysql_install_db and recommend that mysql_secure_installation
be ran for users wishing to remove these defaults.
[..re-commit of previously lost change..]
Faster thr_alarm()
Added 'Opened_files' status variable to track calls to my_open()
Don't give warnings when running mysql_install_db
Added option --source-install to mysql_install_db
I had to do the following renames() as used polymorphism didn't work with Forte compiler on 64 bit systems
index_read() -> index_read_map()
index_read_idx() -> index_read_idx_map()
index_read_last() -> index_read_last_map()
- make the 'dist-hook' from top-level Makefile work again.
- we can find my_print_defaults from --basedir by parsing command
line arguments prior to running my_print_defaults.
- take advantage of additional command line parsing and allow the
--no-defaults etc arguments to work anywhere rather than having
to be the first argument.
- find SQL files either from binary archive or source install.
- consolidate and tidy code and error messages.
available and reduce the chance of failure. This should fix bug#28585
which is caused by the script being quite random in how it finds files it
requires and not giving very good feedback to the user about what went
wrong.
Also update make_binary_distribution so that it provides the correct path
to the required SQL scripts when generating mysql_install_db. The script
only previously worked because of the permissive behaviour which looked
around the current working directory before the "correct" location. This
could lead to severe problems if the user happened to run the script from
a location which contained older or even broken copies of the SQL scripts.
We now require either a complete binary release (and the mysql_install_db
script ran from inside the extracted archive), or an installed compiled
tree, as this is the only way we can be sure everything that we need is
available and ready to run.
While working on this fix, also clean up the mysql_install_db script a lot
to make it simpler, easier to read, and hopefully less prone to bugs in
the future.
- Use mysql_system_tables.sql to create MySQL system tables in
all places where we create them(mysql_install_db, mysql-test-run-pl
and mysql_fix_privilege_tables.sql)
- 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
Corrected spelling in copyright text
Makefile.am:
Don't update the files from BitKeeper
Many files:
Removed "MySQL Finland AB & TCX DataKonsult AB" from copyright header
Adjusted year(s) in copyright header
Many files:
Added GPL copyright text
Removed files:
Docs/Support/colspec-fix.pl
Docs/Support/docbook-fixup.pl
Docs/Support/docbook-prefix.pl
Docs/Support/docbook-split
Docs/Support/make-docbook
Docs/Support/make-makefile
Docs/Support/test-make-manual
Docs/Support/test-make-manual-de
Docs/Support/xwf
If --srcdir and --windows is given, check if error message file
is in source or build tree (bug#24557)
Makefile.am:
Cleaned up "ali_check" target, to satisfy "distcleancheck" (bug#24557)
mysql_install_db.sh:
Added --srcdir=DIR option, used from top Makefile.am in dist-hook
target, to find "fill_help_tables.sql" in VPATH build (bug#24557)
Makefile.am:
Work around problem with "distcleancheck", "sql_yacc.cc" might be in both
the source and build tree.
Call "mysql_install_db" with new option --srcdir, to enable the script
to find all that is needed, if source and build directory is not the same
(bug#24557)
in a distinct mysql-bench repository. Also add a new --benchdir option
to mysql-test-run.pl so the location of the mysql-bench repository can
be specified. The default location is adjacent to the source tree.