summaryrefslogtreecommitdiff
path: root/mysql-test/suite
diff options
context:
space:
mode:
authorMarc Alff <marc.alff@sun.com>2009-12-03 02:57:30 -0700
committerMarc Alff <marc.alff@sun.com>2009-12-03 02:57:30 -0700
commit560e76c567c3551f5a4320acfc954200e8330ad8 (patch)
treed9212d30101024f8dae4a6dd59a6405151ed831c /mysql-test/suite
parent203d9f1eabf9a324d8f98cf3d9897efb89fe92dd (diff)
parent20b95d0831182601e2f92c71a5319f919ca4eb8c (diff)
downloadmariadb-git-560e76c567c3551f5a4320acfc954200e8330ad8.tar.gz
Merge mysql-next-mr (revno 2937) --> mysql-next-mr-marc
Diffstat (limited to 'mysql-test/suite')
-rw-r--r--mysql-test/suite/rpl/r/rpl_ip_mix.result164
-rw-r--r--mysql-test/suite/rpl/r/rpl_ip_mix2.result180
-rw-r--r--mysql-test/suite/rpl/r/rpl_ip_mix2_win.result84
-rw-r--r--mysql-test/suite/rpl/r/rpl_ip_mix_win.result84
-rw-r--r--mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result110
-rw-r--r--mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6_win.result35
-rw-r--r--mysql-test/suite/rpl/r/rpl_ipv6.result155
-rw-r--r--mysql-test/suite/rpl/r/rpl_ipv6_win.result80
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix.cnf56
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix.test93
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix2.cnf56
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix2.test109
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix2_win.cnf56
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix2_win.test78
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix_win.cnf56
-rw-r--r--mysql-test/suite/rpl/t/rpl_ip_mix_win.test65
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf56
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test90
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6_win.cnf56
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6_win.test63
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv6.cnf56
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv6.test93
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv6_win.cnf56
-rw-r--r--mysql-test/suite/rpl/t/rpl_ipv6_win.test65
24 files changed, 1996 insertions, 0 deletions
diff --git a/mysql-test/suite/rpl/r/rpl_ip_mix.result b/mysql-test/suite/rpl/r/rpl_ip_mix.result
new file mode 100644
index 00000000000..11aa5a46cfa
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_ip_mix.result
@@ -0,0 +1,164 @@
+#################### IP: ::1 ###########################
+connect (master,::1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: No such row
+change master to master_host='::1';
+Master-Host: ::1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
+connect (master,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::1
+change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:0:0:1 ###########################
+connect (master,0:0:0:0:0:0:0:1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0:0:0:0:0:0:0:1
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:FFFF:127.0.0.1 ###########################
+connect (master,0:0:0:0:0:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 127.0.0.1
+change master to master_host='0:0:0:0:0:FFFF:127.0.0.1';
+Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:FFFF:127.0.0.1 ###########################
+connect (master,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
+change master to master_host='0000:0000:0000:0000:0000:FFFF:127.0.0.1';
+Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0000:0000:0:0000:FFFF:127.0.0.1 ###########################
+connect (master,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
+change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
+Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0::0000:FFFF:127.0.0.1 ###########################
+connect (master,0::0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
+change master to master_host='0::0000:FFFF:127.0.0.1';
+Master-Host: 0::0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::FFFF:127.0.0.1 ###########################
+connect (master,::FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0::0000:FFFF:127.0.0.1
+change master to master_host='::FFFF:127.0.0.1';
+Master-Host: ::FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 mix #######################
+connect (master,::1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::FFFF:127.0.0.1
+change master to master_host='::1';
+Master-Host: ::1
+change master to master_host='::FFFF:127.0.0.1';
+Master-Host: ::FFFF:127.0.0.1
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
diff --git a/mysql-test/suite/rpl/r/rpl_ip_mix2.result b/mysql-test/suite/rpl/r/rpl_ip_mix2.result
new file mode 100644
index 00000000000..e5cc3e1621d
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_ip_mix2.result
@@ -0,0 +1,180 @@
+#################### IP: ::1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,::1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: No such row
+change master to master_host='::1';
+Master-Host: ::1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,::1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::1
+change master to master_host='::1';
+Master-Host: ::1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::1
+change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:0:0:1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0:0:0:0:0:0:0:1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0:0:0:0:0:0:0:1
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:FFFF:127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0:0:0:0:0:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 127.0.0.1
+change master to master_host='0:0:0:0:0:FFFF:127.0.0.1';
+Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:FFFF:127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
+change master to master_host='0000:0000:0000:0000:0000:FFFF:127.0.0.1';
+Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0000:0000:0:0000:FFFF:127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
+change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
+Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0::0000:FFFF:127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0::0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
+change master to master_host='0::0000:FFFF:127.0.0.1';
+Master-Host: 0::0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::FFFF:127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,::FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0::0000:FFFF:127.0.0.1
+change master to master_host='::FFFF:127.0.0.1';
+Master-Host: ::FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 mix #######################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,::1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::FFFF:127.0.0.1
+change master to master_host='::1';
+Master-Host: ::1
+change master to master_host='::FFFF:127.0.0.1';
+Master-Host: ::FFFF:127.0.0.1
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
diff --git a/mysql-test/suite/rpl/r/rpl_ip_mix2_win.result b/mysql-test/suite/rpl/r/rpl_ip_mix2_win.result
new file mode 100644
index 00000000000..c7cec70ed6c
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_ip_mix2_win.result
@@ -0,0 +1,84 @@
+#################### IP: ::1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,::1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: No such row
+change master to master_host='::1';
+Master-Host: ::1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::1
+change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:0:0:1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0:0:0:0:0:0:0:1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0:0:0:0:0:0:0:1
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 mix #######################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,::1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 127.0.0.1
+change master to master_host='::1';
+Master-Host: ::1
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
diff --git a/mysql-test/suite/rpl/r/rpl_ip_mix_win.result b/mysql-test/suite/rpl/r/rpl_ip_mix_win.result
new file mode 100644
index 00000000000..a1d11e109e5
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_ip_mix_win.result
@@ -0,0 +1,84 @@
+#################### IP: ::1 ###########################
+connect (master,::1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: No such row
+change master to master_host='::1';
+Master-Host: ::1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
+connect (master,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::1
+change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:0:0:1 ###########################
+connect (master,0:0:0:0:0:0:0:1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 0:0:0:0:0:0:0:1
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 mix #######################
+connect (master,::1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 127.0.0.1
+change master to master_host='::1';
+Master-Host: ::1
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
diff --git a/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result b/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result
new file mode 100644
index 00000000000..4168cff1e97
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6.result
@@ -0,0 +1,110 @@
+#################### IP: 127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:FFFF:127.0.0.1 ###########################
+connect (master,0:0:0:0:0:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0:0:0:0:0:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0:0:0:0:0:FFFF:127.0.0.1';
+Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:FFFF:127.0.0.1 ###########################
+connect (master,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0000:0000:0000:0000:0000:FFFF:127.0.0.1';
+Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0000:0000:0:0000:FFFF:127.0.0.1 ###########################
+connect (master,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
+Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0::0000:FFFF:127.0.0.1 ###########################
+connect (master,0::0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0::0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0::0000:FFFF:127.0.0.1';
+Master-Host: 0::0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::FFFF:127.0.0.1 ###########################
+connect (master,::FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,::FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='::FFFF:127.0.0.1';
+Master-Host: ::FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::FFFF:127.0.0.1
+change master to master_host='::1';
+Master-Host: ::1
+change master to master_host='::FFFF:127.0.0.1';
+Master-Host: ::FFFF:127.0.0.1
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
diff --git a/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6_win.result b/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6_win.result
new file mode 100644
index 00000000000..a1e48ea6610
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_ipv4_as_ipv6_win.result
@@ -0,0 +1,35 @@
+#################### IP: 127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 127.0.0.1
+change master to master_host='::1';
+Master-Host: ::1
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
diff --git a/mysql-test/suite/rpl/r/rpl_ipv6.result b/mysql-test/suite/rpl/r/rpl_ipv6.result
new file mode 100644
index 00000000000..f46e60548a6
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_ipv6.result
@@ -0,0 +1,155 @@
+#################### IP: ::1 ###########################
+connect (master,::1,root,,test,MASTER_MYPORT);
+connect (slave,::1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='::1';
+Master-Host: ::1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
+connect (master,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,MASTER_MYPORT);
+connect (slave,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:0:0:1 ###########################
+connect (master,0:0:0:0:0:0:0:1,root,,test,MASTER_MYPORT);
+connect (slave,0:0:0:0:0:0:0:1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:FFFF:127.0.0.1 ###########################
+connect (master,0:0:0:0:0:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0:0:0:0:0:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0:0:0:0:0:FFFF:127.0.0.1';
+Master-Host: 0:0:0:0:0:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:FFFF:127.0.0.1 ###########################
+connect (master,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0000:0000:0000:0000:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0000:0000:0000:0000:0000:FFFF:127.0.0.1';
+Master-Host: 0000:0000:0000:0000:0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0000:0000:0:0000:FFFF:127.0.0.1 ###########################
+connect (master,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0:0000:0000:0:0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0:0000:0000:0:0000:FFFF:127.0.0.1';
+Master-Host: 0:0000:0000:0:0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0::0000:FFFF:127.0.0.1 ###########################
+connect (master,0::0000:FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,0::0000:FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0::0000:FFFF:127.0.0.1';
+Master-Host: 0::0000:FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::FFFF:127.0.0.1 ###########################
+connect (master,::FFFF:127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,::FFFF:127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='::FFFF:127.0.0.1';
+Master-Host: ::FFFF:127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 mix #######################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: ::FFFF:127.0.0.1
+change master to master_host='::1';
+Master-Host: ::1
+change master to master_host='::FFFF:127.0.0.1';
+Master-Host: ::FFFF:127.0.0.1
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
diff --git a/mysql-test/suite/rpl/r/rpl_ipv6_win.result b/mysql-test/suite/rpl/r/rpl_ipv6_win.result
new file mode 100644
index 00000000000..79dc8422161
--- /dev/null
+++ b/mysql-test/suite/rpl/r/rpl_ipv6_win.result
@@ -0,0 +1,80 @@
+#################### IP: ::1 ###########################
+connect (master,::1,root,,test,MASTER_MYPORT);
+connect (slave,::1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='::1';
+Master-Host: ::1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0000:0000:0000:0000:0000:0000:0000:0001 ###########################
+connect (master,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,MASTER_MYPORT);
+connect (slave,0000:0000:0000:0000:0000:0000:0000:0001,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0000:0000:0000:0000:0000:0000:0000:0001';
+Master-Host: 0000:0000:0000:0000:0000:0000:0000:0001
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 0:0:0:0:0:0:0:1 ###########################
+connect (master,0:0:0:0:0:0:0:1,root,,test,MASTER_MYPORT);
+connect (slave,0:0:0:0:0:0:0:1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: 127.0.0.1 ###########################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+disconnect slave;
+disconnect master;
+connection default;
+#################### IP: ::1 mix #######################
+connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connection master;
+reset master;
+show master status;
+File Position Binlog_Do_DB Binlog_Ignore_DB
+master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
+connection slave;
+reset slave;
+Master-Host: 127.0.0.1
+change master to master_host='::1';
+Master-Host: ::1
+change master to master_host='127.0.0.1';
+Master-Host: 127.0.0.1
+change master to master_host='0:0:0:0:0:0:0:1';
+Master-Host: 0:0:0:0:0:0:0:1
+disconnect slave;
+disconnect master;
+connection default;
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix.cnf b/mysql-test/suite/rpl/t/rpl_ip_mix.cnf
new file mode 100644
index 00000000000..00e2637d822
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix.cnf
@@ -0,0 +1,56 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+
+# Run the master.sh script before starting this process
+#!run-master-sh
+
+log-bin= master-bin
+
+loose-innodb
+
+skip-name-resolve
+bind-address= ::
+
+
+[mysqld.2]
+# Run the slave.sh script before starting this process
+#!run-slave-sh
+
+# Append <testname>-slave.opt file to the list of argument used when
+# starting the mysqld
+#!use-slave-opt
+
+log-bin= slave-bin
+relay-log= slave-relay-bin
+
+init-rpl-role= slave
+log-slave-updates
+master-retry-count= 10
+
+# Values reported by slave when it connect to master
+# and shows up in SHOW SLAVE STATUS;
+report-host= localhost
+report-port= @mysqld.2.port
+report-user= root
+
+skip-slave-start
+skip-name-resolve
+bind-address= 0.0.0.0
+
+# Directory where slaves find the dumps generated by "load data"
+# on the server. The path need to have constant length otherwise
+# test results will vary, thus a relative path is used.
+slave-load-tmpdir= ../../tmp
+
+loose-innodb
+
+[ENV]
+MASTER_MYPORT= @mysqld.1.port
+MASTER_MYSOCK= @mysqld.1.socket
+
+SLAVE_MYPORT= @mysqld.2.port
+SLAVE_MYSOCK= @mysqld.2.socket
+
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix.test b/mysql-test/suite/rpl/t/rpl_ip_mix.test
new file mode 100644
index 00000000000..68aa2fc87a9
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix.test
@@ -0,0 +1,93 @@
+# Copyright (C) 2009 SUN Microsystems
+# All rights reserved. Use is subject to license terms.
+# Author: Horst Hunger
+# Nov. 19, 2009
+# Test of ipv6 format, especially "change master host=..."
+# Options: --skip-name-resolve, master: --bind-address=::, slave: --bind-address=0.0.0.0
+# (see corresponding cnf file)
+#
+--source include/check_ipv6.inc
+# Can't be tested with windows due to mixed format like 0::0000:FFFF:127.0.0.1
+--source include/not_windows.inc
+--source include/have_log_bin.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= ::1/128;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ip_mix.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= 0:0:0:0:0:0:0:1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= 127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= 0:0000:0000:0:0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= 0::0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+#let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1/96;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ip_mix.inc
+
+let $IPv6= ::FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+#let $IPv6= ::FFFF:127.0.0.1/96;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ip_mix.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 mix #######################
+--echo connect (master,$IPv6,root,,test,MASTER_MYPORT);
+connect (master,$IPv6,root,,test,$MASTER_MYPORT);
+--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
+--echo connection master;
+connection master;
+reset master;
+source include/show_master_status.inc;
+save_master_pos;
+--echo connection slave;
+connection slave;
+reset slave;
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='$IPv6';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='::FFFF:127.0.0.1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='0:0:0:0:0:0:0:1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+--echo disconnect slave;
+disconnect slave;
+--echo disconnect master;
+disconnect master;
+--echo connection default;
+connection default;
+
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2.cnf b/mysql-test/suite/rpl/t/rpl_ip_mix2.cnf
new file mode 100644
index 00000000000..306df437bcc
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix2.cnf
@@ -0,0 +1,56 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+
+# Run the master.sh script before starting this process
+#!run-master-sh
+
+log-bin= master-bin
+
+loose-innodb
+
+skip-name-resolve
+bind-address= 0.0.0.0
+
+
+[mysqld.2]
+# Run the slave.sh script before starting this process
+#!run-slave-sh
+
+# Append <testname>-slave.opt file to the list of argument used when
+# starting the mysqld
+#!use-slave-opt
+
+log-bin= slave-bin
+relay-log= slave-relay-bin
+
+init-rpl-role= slave
+log-slave-updates
+master-retry-count= 10
+
+# Values reported by slave when it connect to master
+# and shows up in SHOW SLAVE STATUS;
+report-host= localhost
+report-port= @mysqld.2.port
+report-user= root
+
+skip-slave-start
+skip-name-resolve
+bind-address= ::
+
+# Directory where slaves find the dumps generated by "load data"
+# on the server. The path need to have constant length otherwise
+# test results will vary, thus a relative path is used.
+slave-load-tmpdir= ../../tmp
+
+loose-innodb
+
+[ENV]
+MASTER_MYPORT= @mysqld.1.port
+MASTER_MYSOCK= @mysqld.1.socket
+
+SLAVE_MYPORT= @mysqld.2.port
+SLAVE_MYSOCK= @mysqld.2.socket
+
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2.test b/mysql-test/suite/rpl/t/rpl_ip_mix2.test
new file mode 100644
index 00000000000..d6435d710c1
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix2.test
@@ -0,0 +1,109 @@
+# Copyright (C) 2009 SUN Microsystems
+# All rights reserved. Use is subject to license terms.
+# Author: Horst Hunger
+# Nov. 19, 2009
+# Test of ipv6 format, especially "change master host=..."
+# Options: --skip-name-resolve, master: --bind-address=0.0.0.0, slave: --bind-address=::
+# (see corresponding cnf file)
+#
+# Check if ipv6 is available. If not, server is crashing (see BUG#48915).
+--disable_query_log
+--disable_abort_on_error
+connect (checkcon123456789,::1,root,,test,$SLAVE_MYPORT);
+if($mysql_errno)
+{
+skip wrong IP for slave;
+}
+connection default;
+disconnect checkcon123456789;
+--enable_abort_on_error
+--enable_query_log
+# end check
+
+# Can't be tested with windows due to mixed format like 0::0000:FFFF:127.0.0.1
+--source include/not_windows.inc
+--source include/have_log_bin.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= ::1/128;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ip_mix2.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= 0:0:0:0:0:0:0:1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= 127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= 0:0000:0000:0:0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= 0::0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+#let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1/96;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ip_mix2.inc
+
+let $IPv6= ::FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+#let $IPv6= ::FFFF:127.0.0.1/96;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ip_mix2.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 mix #######################
+--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
+--echo connect (slave,$IPv6,root,,test,SLAVE_MYPORT);
+connect (slave,$IPv6,root,,test,$SLAVE_MYPORT);
+--echo connection master;
+connection master;
+reset master;
+source include/show_master_status.inc;
+save_master_pos;
+--echo connection slave;
+connection slave;
+reset slave;
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='$IPv6';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='::FFFF:127.0.0.1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='0:0:0:0:0:0:0:1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+--echo disconnect slave;
+disconnect slave;
+--echo disconnect master;
+disconnect master;
+--echo connection default;
+connection default;
+
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2_win.cnf b/mysql-test/suite/rpl/t/rpl_ip_mix2_win.cnf
new file mode 100644
index 00000000000..306df437bcc
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix2_win.cnf
@@ -0,0 +1,56 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+
+# Run the master.sh script before starting this process
+#!run-master-sh
+
+log-bin= master-bin
+
+loose-innodb
+
+skip-name-resolve
+bind-address= 0.0.0.0
+
+
+[mysqld.2]
+# Run the slave.sh script before starting this process
+#!run-slave-sh
+
+# Append <testname>-slave.opt file to the list of argument used when
+# starting the mysqld
+#!use-slave-opt
+
+log-bin= slave-bin
+relay-log= slave-relay-bin
+
+init-rpl-role= slave
+log-slave-updates
+master-retry-count= 10
+
+# Values reported by slave when it connect to master
+# and shows up in SHOW SLAVE STATUS;
+report-host= localhost
+report-port= @mysqld.2.port
+report-user= root
+
+skip-slave-start
+skip-name-resolve
+bind-address= ::
+
+# Directory where slaves find the dumps generated by "load data"
+# on the server. The path need to have constant length otherwise
+# test results will vary, thus a relative path is used.
+slave-load-tmpdir= ../../tmp
+
+loose-innodb
+
+[ENV]
+MASTER_MYPORT= @mysqld.1.port
+MASTER_MYSOCK= @mysqld.1.socket
+
+SLAVE_MYPORT= @mysqld.2.port
+SLAVE_MYSOCK= @mysqld.2.socket
+
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix2_win.test b/mysql-test/suite/rpl/t/rpl_ip_mix2_win.test
new file mode 100644
index 00000000000..f9a2022ddd4
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix2_win.test
@@ -0,0 +1,78 @@
+# Copyright (C) 2009 SUN Microsystems
+# All rights reserved. Use is subject to license terms.
+# Author: Horst Hunger
+# Nov. 19, 2009
+# Test of ipv6 format, especially "change master host=..."
+# Options: --skip-name-resolve, master: --bind-address=0.0.0.0, slave: --bind-address=::
+# (see corresponding cnf file)
+#
+# Check if ipv6 is available. If not, server is crashing (see BUG#48915).
+--disable_query_log
+--disable_abort_on_error
+connect (checkcon123456789,::1,root,,test,$SLAVE_MYPORT);
+if($mysql_errno)
+{
+skip wrong IP for slave;
+}
+connection default;
+disconnect checkcon123456789;
+--enable_abort_on_error
+--enable_query_log
+# end check
+
+# For windows due to missing the mixed format like 0::0000:FFFF:127.0.0.1
+--source include/windows.inc
+--source include/have_log_bin.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= ::1/128;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ip_mix2.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= 0:0:0:0:0:0:0:1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= 127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix2.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 mix #######################
+--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
+--echo connect (slave,$IPv6,root,,test,SLAVE_MYPORT);
+connect (slave,$IPv6,root,,test,$SLAVE_MYPORT);
+--echo connection master;
+connection master;
+reset master;
+source include/show_master_status.inc;
+save_master_pos;
+--echo connection slave;
+connection slave;
+reset slave;
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='$IPv6';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='127.0.0.1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='0:0:0:0:0:0:0:1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+--echo disconnect slave;
+disconnect slave;
+--echo disconnect master;
+disconnect master;
+--echo connection default;
+connection default;
+--exit
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix_win.cnf b/mysql-test/suite/rpl/t/rpl_ip_mix_win.cnf
new file mode 100644
index 00000000000..00e2637d822
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix_win.cnf
@@ -0,0 +1,56 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+
+# Run the master.sh script before starting this process
+#!run-master-sh
+
+log-bin= master-bin
+
+loose-innodb
+
+skip-name-resolve
+bind-address= ::
+
+
+[mysqld.2]
+# Run the slave.sh script before starting this process
+#!run-slave-sh
+
+# Append <testname>-slave.opt file to the list of argument used when
+# starting the mysqld
+#!use-slave-opt
+
+log-bin= slave-bin
+relay-log= slave-relay-bin
+
+init-rpl-role= slave
+log-slave-updates
+master-retry-count= 10
+
+# Values reported by slave when it connect to master
+# and shows up in SHOW SLAVE STATUS;
+report-host= localhost
+report-port= @mysqld.2.port
+report-user= root
+
+skip-slave-start
+skip-name-resolve
+bind-address= 0.0.0.0
+
+# Directory where slaves find the dumps generated by "load data"
+# on the server. The path need to have constant length otherwise
+# test results will vary, thus a relative path is used.
+slave-load-tmpdir= ../../tmp
+
+loose-innodb
+
+[ENV]
+MASTER_MYPORT= @mysqld.1.port
+MASTER_MYSOCK= @mysqld.1.socket
+
+SLAVE_MYPORT= @mysqld.2.port
+SLAVE_MYSOCK= @mysqld.2.socket
+
diff --git a/mysql-test/suite/rpl/t/rpl_ip_mix_win.test b/mysql-test/suite/rpl/t/rpl_ip_mix_win.test
new file mode 100644
index 00000000000..7d78f71bd1b
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ip_mix_win.test
@@ -0,0 +1,65 @@
+# Copyright (C) 2009 SUN Microsystems
+# All rights reserved. Use is subject to license terms.
+# Author: Horst Hunger
+# Nov. 19, 2009
+# Test of ipv6 format, especially "change master host=..."
+# Options: --skip-name-resolve, master: --bind-address=::, slave: --bind-address=0.0.0.0
+# (see corresponding cnf file)
+#
+--source include/check_ipv6.inc
+# For windows due to missing the mixed format like 0::0000:FFFF:127.0.0.1
+--source include/windows.inc
+--source include/have_log_bin.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= ::1/128;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ip_mix.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= 0:0:0:0:0:0:0:1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= 127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ip_mix.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 mix #######################
+--echo connect (master,$IPv6,root,,test,MASTER_MYPORT);
+connect (master,$IPv6,root,,test,$MASTER_MYPORT);
+--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
+--echo connection master;
+connection master;
+reset master;
+source include/show_master_status.inc;
+save_master_pos;
+--echo connection slave;
+connection slave;
+reset slave;
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='$IPv6';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='127.0.0.1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='0:0:0:0:0:0:0:1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+--echo disconnect slave;
+disconnect slave;
+--echo disconnect master;
+disconnect master;
+--echo connection default;
+connection default;
+--exit
diff --git a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf
new file mode 100644
index 00000000000..b646a4088ff
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.cnf
@@ -0,0 +1,56 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+
+# Run the master.sh script before starting this process
+#!run-master-sh
+
+log-bin= master-bin
+
+loose-innodb
+
+skip-name-resolve
+bind-address= 0.0.0.0
+
+
+[mysqld.2]
+# Run the slave.sh script before starting this process
+#!run-slave-sh
+
+# Append <testname>-slave.opt file to the list of argument used when
+# starting the mysqld
+#!use-slave-opt
+
+log-bin= slave-bin
+relay-log= slave-relay-bin
+
+init-rpl-role= slave
+log-slave-updates
+master-retry-count= 10
+
+# Values reported by slave when it connect to master
+# and shows up in SHOW SLAVE STATUS;
+report-host= localhost
+report-port= @mysqld.2.port
+report-user= root
+
+skip-slave-start
+skip-name-resolve
+bind-address= 0.0.0.0
+
+# Directory where slaves find the dumps generated by "load data"
+# on the server. The path need to have constant length otherwise
+# test results will vary, thus a relative path is used.
+slave-load-tmpdir= ../../tmp
+
+loose-innodb
+
+[ENV]
+MASTER_MYPORT= @mysqld.1.port
+MASTER_MYSOCK= @mysqld.1.socket
+
+SLAVE_MYPORT= @mysqld.2.port
+SLAVE_MYSOCK= @mysqld.2.socket
+
diff --git a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test
new file mode 100644
index 00000000000..f4e5ad6af7b
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6.test
@@ -0,0 +1,90 @@
+# Copyright (C) 2009 SUN Microsystems
+# All rights reserved. Use is subject to license terms.
+# Author: Horst Hunger
+# Nov. 19, 2009
+# Test of ipv4 (127.0.0.1) in ipv6 format, especially "change master host=..."
+# Options: --skip-name-resolve, --bind-address=0.0.0.0 (see corresponding cnf file)
+# for master and slave
+#
+# Check if ipv4 is available.
+--disable_query_log
+--disable_abort_on_error
+connect (checkcon123456789,127.0.0.1,root,,test);
+if($mysql_errno)
+{
+skip wrong IP;
+}
+connection default;
+disconnect checkcon123456789;
+--enable_abort_on_error
+--enable_query_log
+# end check
+
+# Can't be tested with windows due to mixed format like 0::0000:FFFF:127.0.0.1
+--source include/not_windows.inc
+--source include/have_log_bin.inc
+
+let $IPv6= 127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0:0000:0000:0:0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0::0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+#let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1/96;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ipv6.inc
+
+let $IPv6= ::FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+#let $IPv6= ::FFFF:127.0.0.1/96;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ipv6.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
+--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
+--echo connection master;
+connection master;
+reset master;
+source include/show_master_status.inc;
+save_master_pos;
+--echo connection slave;
+connection slave;
+reset slave;
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='$IPv6';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='::FFFF:127.0.0.1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='0:0:0:0:0:0:0:1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+--echo disconnect slave;
+disconnect slave;
+--echo disconnect master;
+disconnect master;
+--echo connection default;
+connection default;
+
diff --git a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6_win.cnf b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6_win.cnf
new file mode 100644
index 00000000000..b646a4088ff
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6_win.cnf
@@ -0,0 +1,56 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+
+# Run the master.sh script before starting this process
+#!run-master-sh
+
+log-bin= master-bin
+
+loose-innodb
+
+skip-name-resolve
+bind-address= 0.0.0.0
+
+
+[mysqld.2]
+# Run the slave.sh script before starting this process
+#!run-slave-sh
+
+# Append <testname>-slave.opt file to the list of argument used when
+# starting the mysqld
+#!use-slave-opt
+
+log-bin= slave-bin
+relay-log= slave-relay-bin
+
+init-rpl-role= slave
+log-slave-updates
+master-retry-count= 10
+
+# Values reported by slave when it connect to master
+# and shows up in SHOW SLAVE STATUS;
+report-host= localhost
+report-port= @mysqld.2.port
+report-user= root
+
+skip-slave-start
+skip-name-resolve
+bind-address= 0.0.0.0
+
+# Directory where slaves find the dumps generated by "load data"
+# on the server. The path need to have constant length otherwise
+# test results will vary, thus a relative path is used.
+slave-load-tmpdir= ../../tmp
+
+loose-innodb
+
+[ENV]
+MASTER_MYPORT= @mysqld.1.port
+MASTER_MYSOCK= @mysqld.1.socket
+
+SLAVE_MYPORT= @mysqld.2.port
+SLAVE_MYSOCK= @mysqld.2.socket
+
diff --git a/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6_win.test b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6_win.test
new file mode 100644
index 00000000000..db786536c2d
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ipv4_as_ipv6_win.test
@@ -0,0 +1,63 @@
+# Copyright (C) 2009 SUN Microsystems
+# All rights reserved. Use is subject to license terms.
+# Author: Horst Hunger
+# Nov. 19, 2009
+# Test of ipv4 (127.0.0.1) in ipv6 format, especially "change master host=..."
+# Options: --skip-name-resolve, --bind-address=0.0.0.0 (see corresponding cnf file)
+# for master and slave
+#
+# Check if ipv4 is available.
+--disable_query_log
+--disable_abort_on_error
+connect (checkcon123456789,127.0.0.1,root,,test);
+if($mysql_errno)
+{
+skip wrong IP;
+}
+connection default;
+disconnect checkcon123456789;
+--enable_abort_on_error
+--enable_query_log
+# end check
+
+# For windows due to missing the mixed format like 0::0000:FFFF:127.0.0.1
+--source include/windows.inc
+--source include/have_log_bin.inc
+
+let $IPv6= 127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
+--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
+--echo connection master;
+connection master;
+reset master;
+source include/show_master_status.inc;
+save_master_pos;
+--echo connection slave;
+connection slave;
+reset slave;
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='$IPv6';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='127.0.0.1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='0:0:0:0:0:0:0:1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+--echo disconnect slave;
+disconnect slave;
+--echo disconnect master;
+disconnect master;
+--echo connection default;
+connection default;
+--exit
+
diff --git a/mysql-test/suite/rpl/t/rpl_ipv6.cnf b/mysql-test/suite/rpl/t/rpl_ipv6.cnf
new file mode 100644
index 00000000000..c657e7c5115
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ipv6.cnf
@@ -0,0 +1,56 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+
+# Run the master.sh script before starting this process
+#!run-master-sh
+
+log-bin= master-bin
+
+loose-innodb
+
+skip-name-resolve
+bind-address= ::
+
+
+[mysqld.2]
+# Run the slave.sh script before starting this process
+#!run-slave-sh
+
+# Append <testname>-slave.opt file to the list of argument used when
+# starting the mysqld
+#!use-slave-opt
+
+log-bin= slave-bin
+relay-log= slave-relay-bin
+
+init-rpl-role= slave
+log-slave-updates
+master-retry-count= 10
+
+# Values reported by slave when it connect to master
+# and shows up in SHOW SLAVE STATUS;
+report-host= localhost
+report-port= @mysqld.2.port
+report-user= root
+
+skip-slave-start
+skip-name-resolve
+bind-address= ::
+
+# Directory where slaves find the dumps generated by "load data"
+# on the server. The path need to have constant length otherwise
+# test results will vary, thus a relative path is used.
+slave-load-tmpdir= ../../tmp
+
+loose-innodb
+
+[ENV]
+MASTER_MYPORT= @mysqld.1.port
+MASTER_MYSOCK= @mysqld.1.socket
+
+SLAVE_MYPORT= @mysqld.2.port
+SLAVE_MYSOCK= @mysqld.2.socket
+
diff --git a/mysql-test/suite/rpl/t/rpl_ipv6.test b/mysql-test/suite/rpl/t/rpl_ipv6.test
new file mode 100644
index 00000000000..71fedcb4208
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ipv6.test
@@ -0,0 +1,93 @@
+# Copyright (C) 2009 SUN Microsystems
+# All rights reserved. Use is subject to license terms.
+# Author: Horst Hunger
+# Nov. 19, 2009
+# Test of ipv6 format, especially "change master host=..."
+# Options: --skip-name-resolve, --bind-address=:: (see corresponding cnf file)
+# for master and slave.
+#
+--source include/check_ipv6.inc
+# Can't be tested with windows due to mixed format like 0::0000:FFFF:127.0.0.1
+--source include/not_windows.inc
+--source include/have_log_bin.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= ::1/128;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ipv6.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0:0:0:0:0:0:0:1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0:0000:0000:0:0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0::0000:FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+#let $IPv6= 0:0:0:0:0:FFFF:127.0.0.1/96;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ipv6.inc
+
+let $IPv6= ::FFFF:127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+#let $IPv6= ::FFFF:127.0.0.1/96;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ipv6.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 mix #######################
+--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
+--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
+--echo connection master;
+connection master;
+reset master;
+source include/show_master_status.inc;
+save_master_pos;
+--echo connection slave;
+connection slave;
+reset slave;
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='$IPv6';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='::FFFF:127.0.0.1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='0:0:0:0:0:0:0:1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+--echo disconnect slave;
+disconnect slave;
+--echo disconnect master;
+disconnect master;
+--echo connection default;
+connection default;
+
diff --git a/mysql-test/suite/rpl/t/rpl_ipv6_win.cnf b/mysql-test/suite/rpl/t/rpl_ipv6_win.cnf
new file mode 100644
index 00000000000..c657e7c5115
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ipv6_win.cnf
@@ -0,0 +1,56 @@
+# Use default setting for mysqld processes
+!include include/default_mysqld.cnf
+!include include/default_client.cnf
+
+[mysqld.1]
+
+# Run the master.sh script before starting this process
+#!run-master-sh
+
+log-bin= master-bin
+
+loose-innodb
+
+skip-name-resolve
+bind-address= ::
+
+
+[mysqld.2]
+# Run the slave.sh script before starting this process
+#!run-slave-sh
+
+# Append <testname>-slave.opt file to the list of argument used when
+# starting the mysqld
+#!use-slave-opt
+
+log-bin= slave-bin
+relay-log= slave-relay-bin
+
+init-rpl-role= slave
+log-slave-updates
+master-retry-count= 10
+
+# Values reported by slave when it connect to master
+# and shows up in SHOW SLAVE STATUS;
+report-host= localhost
+report-port= @mysqld.2.port
+report-user= root
+
+skip-slave-start
+skip-name-resolve
+bind-address= ::
+
+# Directory where slaves find the dumps generated by "load data"
+# on the server. The path need to have constant length otherwise
+# test results will vary, thus a relative path is used.
+slave-load-tmpdir= ../../tmp
+
+loose-innodb
+
+[ENV]
+MASTER_MYPORT= @mysqld.1.port
+MASTER_MYSOCK= @mysqld.1.socket
+
+SLAVE_MYPORT= @mysqld.2.port
+SLAVE_MYSOCK= @mysqld.2.socket
+
diff --git a/mysql-test/suite/rpl/t/rpl_ipv6_win.test b/mysql-test/suite/rpl/t/rpl_ipv6_win.test
new file mode 100644
index 00000000000..7c9d437541a
--- /dev/null
+++ b/mysql-test/suite/rpl/t/rpl_ipv6_win.test
@@ -0,0 +1,65 @@
+# Copyright (C) 2009 SUN Microsystems
+# All rights reserved. Use is subject to license terms.
+# Author: Horst Hunger
+# Nov. 19, 2009
+# Test of ipv6 format, especially "change master host=..."
+# Options: --skip-name-resolve, --bind-address=:: (see corresponding cnf file)
+# for master and slave.
+#
+--source include/check_ipv6.inc
+# For windows due to missing the mixed format like 0::0000:FFFF:127.0.0.1
+--source include/windows.inc
+--source include/have_log_bin.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= ::1/128;
+#--echo #################### IP: $IPv6 ###########################
+#--source include/rpl_ipv6.inc
+
+let $IPv6= 0000:0000:0000:0000:0000:0000:0000:0001;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 0:0:0:0:0:0:0:1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= 127.0.0.1;
+--echo #################### IP: $IPv6 ###########################
+--source include/rpl_ipv6.inc
+
+let $IPv6= ::1;
+--echo #################### IP: $IPv6 mix #######################
+--echo connect (master,127.0.0.1,root,,test,MASTER_MYPORT);
+connect (master,127.0.0.1,root,,test,$MASTER_MYPORT);
+--echo connect (slave,127.0.0.1,root,,test,SLAVE_MYPORT);
+connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT);
+--echo connection master;
+connection master;
+reset master;
+source include/show_master_status.inc;
+save_master_pos;
+--echo connection slave;
+connection slave;
+reset slave;
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='$IPv6';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='127.0.0.1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+eval change master to master_host='0:0:0:0:0:0:0:1';
+let $master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);
+--echo Master-Host: $master_host
+--echo disconnect slave;
+disconnect slave;
+--echo disconnect master;
+disconnect master;
+--echo connection default;
+connection default;
+--exit