You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. Also, fix a few tests
that expect certain local accounts to have a certain host name.
Copy file name to clipboardExpand all lines: scripts/mysql_system_tables_data.sql
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -21,9 +21,9 @@ DROP TABLE tmp_db;
21
21
-- from local machine if "users" table didn't exist before
22
22
CREATE TEMPORARY TABLE tmp_user LIKE user;
23
23
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);
24
-
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);
24
+
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,0FROM dual WHERELOWER( @current_hostname) !='localhost';
25
25
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);
26
26
INSERT INTO tmp_user (host,user) VALUES ('localhost','');
27
-
INSERT INTO tmp_user (host,user) VALUES (@current_hostname,'');
27
+
INSERT INTO tmp_user (host,user) SELECT@current_hostname,''FROM dual WHERELOWER(@current_hostname ) !='localhost';
28
28
INSERT INTO user SELECT*FROM tmp_user WHERE @had_user_table=0;
0 commit comments