diff options
author | df@pippilotta.erinye.com <> | 2007-12-10 12:16:41 +0100 |
---|---|---|
committer | df@pippilotta.erinye.com <> | 2007-12-10 12:16:41 +0100 |
commit | 42945c77268e8d5d1d989737b341ed9c11f53a72 (patch) | |
tree | 076fd59c0509c986b983131b1f5a4b757a5c2b16 /scripts/mysql_system_tables_data.sql | |
parent | 9455fafe1b775cbde21022fe7ba8177e9fb1d3b6 (diff) | |
parent | a079cb9f494f8561088eacf7f1184558fd8644a0 (diff) | |
download | mariadb-git-42945c77268e8d5d1d989737b341ed9c11f53a72.tar.gz |
Merge pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.0-build
into pippilotta.erinye.com:/shared/home/df/mysql/build/mysql-5.1-build
Diffstat (limited to 'scripts/mysql_system_tables_data.sql')
-rw-r--r-- | scripts/mysql_system_tables_data.sql | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql index 89558f99603..6db9430b972 100644 --- a/scripts/mysql_system_tables_data.sql +++ b/scripts/mysql_system_tables_data.sql @@ -2,6 +2,12 @@ -- The inital data for system tables of MySQL Server -- +-- When setting up a "cross bootstrap" database (e.g., creating data on a Unix +-- host which will later be included in a Windows zip file), any lines +-- containing "@current_hostname" are filtered out by mysql_install_db. +set @current_hostname= @@hostname; + + -- Fill "db" table with default grants for anyone to -- access database 'test' and 'test_%' if "db" table didn't exist CREATE TEMPORARY TABLE tmp_db LIKE db; @@ -14,11 +20,11 @@ DROP TABLE tmp_db; -- Fill "users" table with default users allowing root access -- from local machine if "users" table didn't exist before CREATE TEMPORARY TABLE tmp_user LIKE user; -set @hostname= @@hostname; +set @current_hostname= @@hostname; INSERT INTO tmp_user VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); -REPLACE INTO tmp_user VALUES (@hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); +REPLACE INTO tmp_user VALUES (@current_hostname,'root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); REPLACE INTO tmp_user VALUES ('127.0.0.1','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0); INSERT INTO tmp_user (host,user) VALUES ('localhost',''); -INSERT INTO tmp_user (host,user) VALUES (@@hostname,''); +INSERT INTO tmp_user (host,user) VALUES (@current_hostname,''); INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0; DROP TABLE tmp_user; |