MySQL Lists are EOL. Please join:

List:Commits« Previous MessageNext Message »
From:Chad MILLER Date:September 23 2008 8:29am
Subject:bzr commit into mysql-5.0-bugteam branch (chad:2684) Bug#35754
View as plain text  
#At file:///Users/cmiller/work/mysqlbzr/5.0-bugteam--bug31167/

 2684 Chad MILLER	2008-09-23
      Bug#35754: mysql_install_db does not work if no hostname is set
      
      Machines with hostname set to "localhost" cause uniqueness errors in 
      the SQL bootstrap data.
      
      Now, insert zero lines for cases where the (lowercased) hostname is 
      the same as an already-inserted 'localhost' name.
modified:
  scripts/mysql_system_tables_data.sql

=== modified file 'scripts/mysql_system_tables_data.sql'
--- a/scripts/mysql_system_tables_data.sql	2007-11-30 05:14:43 +0000
+++ b/scripts/mysql_system_tables_data.sql	2008-09-23 08:28:29 +0000
@@ -21,9 +21,9 @@ DROP TABLE tmp_db;
 -- from local machine if "users" table didn't exist before
 CREATE TEMPORARY TABLE tmp_user LIKE user;
 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','','','','',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','','','','',0,0,0,0);
+REPLACE INTO tmp_user SELECT @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','','','','',0,0,0,0 WHERE LOWER(@current_hostname) != 'localhost';
 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','','','','',0,0,0,0);
 INSERT INTO tmp_user (host,user) VALUES ('localhost','');
-INSERT INTO tmp_user (host,user) VALUES (@current_hostname,'');
+INSERT INTO tmp_user (host,user) SELECT @current_hostname,'' WHERE LOWER(@current_hostname) != 'localhost';
 INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
 DROP TABLE tmp_user;

Thread
bzr commit into mysql-5.0-bugteam branch (chad:2684) Bug#35754Chad MILLER23 Sep