WL#3607: Unify system-table creation among 1)normal, 2)test, 3)windows installers
Affects: WorkLog-3.4 — Status: Un-Assigned — Priority: Medium
(Paired with BUG#20166, "mysql-test-run.pl does not test system privilege tables creation") To make sure the bootstrap procedure can be performed on all platforms we will put the system table definitions in .sql file(s) and modify mysqld so it will take the bootstrap file name(s) as arguments and read directly from them not requiring the bootstrap commands to be piped from stdin, but of course being backward compaitble if only --bootstrap is used. This will give all our installers a common way to boostrap the mysqld from a common set of sql files. Since we want the ability to insert records in the user tables that contain the hostname we need to extend the mysqld to have a system variable that reads from the already existing global variable "glob_hostname", thus making it accessible from the .sql scripts. When boostrapping the mysqld there is a small difference between the default users that we create when running on windows. This can be solved in the same way as we create the log tables in 5.1, ie. by creating a stored procedure which have the ability to check the system variable @@version_compile_os to see if the hist is running on windows. I will also check why we are actually creating a different set of default user on windows - maybe that part of the script is obsolete and handled by the windows installer. Windows currently uses a Unix box to create the SQL data (in win/data/ , Makefile rule "dist-hook") that the installer later loads into the server. Changing the installer should be trivial, and we should be able to remove the make rule also.
Copyright (c) 2000, 2016, Oracle Corporation and/or its affiliates. All rights reserved.