Skip to content

Commit e068e99

Browse files
author
msvensson@pilot.(none)
committed
Bug#31167 Introduction of @@hostname breaks replication in a ring
- Use a local uservariable to avoid @@hostname in binlog
1 parent 0ccf350 commit e068e99

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

scripts/mysql_system_tables_data.sql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@ DROP TABLE tmp_db;
1515
-- from local machine if "users" table didn't exist before
1616
CREATE TEMPORARY TABLE tmp_user LIKE user;
1717
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);
18-
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','','','','',0,0,0,0);
18+
set @hostname= @@hostname;
19+
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','','','','',0,0,0,0);
1920
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);
2021
INSERT INTO user SELECT * FROM tmp_user WHERE @had_user_table=0;
2122
DROP TABLE tmp_user;

0 commit comments

Comments
 (0)