summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorunknown <msvensson@pilot.(none)>2007-09-26 17:04:41 +0200
committerunknown <msvensson@pilot.(none)>2007-09-26 17:04:41 +0200
commitf700bf2d0d6280b6b598d11fcf558849ef30a17c (patch)
tree1a7ab5e58775fbe922e35ed57cfdfe754021b648 /scripts
parent5ece0c9b445033c1e362e42a82ba97ea1da378ef (diff)
downloadmariadb-git-f700bf2d0d6280b6b598d11fcf558849ef30a17c.tar.gz
Bug#31167 Introduction of @@hostname breaks replication in a ring
- Use a local uservariable to avoid @@hostname in binlog scripts/mysql_system_tables_data.sql: Load @@hostname into a local user variable to avoid writing @@hostname to the binary log that potentially would be replicated to a slave server that not yet was upgraded to have @@hostname.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/mysql_system_tables_data.sql3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/mysql_system_tables_data.sql b/scripts/mysql_system_tables_data.sql
index 5f0289ab197..8399ae796ef 100644
--- a/scripts/mysql_system_tables_data.sql
+++ b/scripts/mysql_system_tables_data.sql
@@ -15,7 +15,8 @@ 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 (@@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);
+set @hostname= @@hostname;
+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);
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 user SELECT * FROM tmp_user WHERE @had_user_table=0;
DROP TABLE tmp_user;