Skip to content

Commit 990283b

Browse files
committed
Fix perfschema.hostcache_ipv4_max_con
Also fix perfschema.hostcache_ipv6_max_con. The test case makes use of a debug switch to execute some special code. The code does hostname replacement. Every hostname sent during connect phase becomes santa.claus.ipv4.example.com (or ipv6). This causes a connection from root@localhost to fail, as root is not registered as santa claus user. The failure is only apparent on Windows as Unix systems make use of sockets, which bypass the name resolution check entirely.
1 parent 4c7a1a1 commit 990283b

File tree

4 files changed

+28
-28
lines changed

4 files changed

+28
-28
lines changed

mysql-test/suite/perfschema/r/hostcache_ipv4_max_con.result

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -563,13 +563,13 @@ disconnect con4c;
563563
set global max_user_connections = 0;
564564
set global max_connections = 10;
565565
flush user_resources;
566-
connect tmp_con1,localhost,root,,;
567-
connect tmp_con2,localhost,root,,;
568-
connect tmp_con3,localhost,root,,;
569-
connect tmp_con4,localhost,root,,;
570-
connect tmp_con5,localhost,root,,;
571-
connect tmp_con6,localhost,root,,;
572-
connect tmp_con7,localhost,root,,;
566+
connect tmp_con1,localhost,quota,,test,$MASTER_MYPORT,;
567+
connect tmp_con2,localhost,quota,,test,$MASTER_MYPORT,;
568+
connect tmp_con3,localhost,quota,,test,$MASTER_MYPORT,;
569+
connect tmp_con4,localhost,quota,,test,$MASTER_MYPORT,;
570+
connect tmp_con5,localhost,quota,,test,$MASTER_MYPORT,;
571+
connect tmp_con6,localhost,quota,,test,$MASTER_MYPORT,;
572+
connect tmp_con7,localhost,quota,,test,$MASTER_MYPORT,;
573573
connect con5a,"127.0.0.1",quota,,test,$MASTER_MYPORT,;
574574
select "Con4a is alive";
575575
Con4a is alive

mysql-test/suite/perfschema/r/hostcache_ipv6_max_con.result

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -563,13 +563,13 @@ disconnect con4c;
563563
set global max_user_connections = 0;
564564
set global max_connections = 10;
565565
flush user_resources;
566-
connect tmp_con1,localhost,root,,;
567-
connect tmp_con2,localhost,root,,;
568-
connect tmp_con3,localhost,root,,;
569-
connect tmp_con4,localhost,root,,;
570-
connect tmp_con5,localhost,root,,;
571-
connect tmp_con6,localhost,root,,;
572-
connect tmp_con7,localhost,root,,;
566+
connect tmp_con1,localhost,quota,,test,$MASTER_MYPORT,;
567+
connect tmp_con2,localhost,quota,,test,$MASTER_MYPORT,;
568+
connect tmp_con3,localhost,quota,,test,$MASTER_MYPORT,;
569+
connect tmp_con4,localhost,quota,,test,$MASTER_MYPORT,;
570+
connect tmp_con5,localhost,quota,,test,$MASTER_MYPORT,;
571+
connect tmp_con6,localhost,quota,,test,$MASTER_MYPORT,;
572+
connect tmp_con7,localhost,quota,,test,$MASTER_MYPORT,;
573573
connect con5a,"::1",quota,,test,$MASTER_MYPORT,;
574574
select "Con4a is alive";
575575
Con4a is alive

mysql-test/suite/perfschema/t/hostcache_ipv4_max_con.test

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -179,13 +179,13 @@ set global max_user_connections = 0;
179179
set global max_connections = 10;
180180
flush user_resources;
181181

182-
connect (tmp_con1,localhost,root,,);
183-
connect (tmp_con2,localhost,root,,);
184-
connect (tmp_con3,localhost,root,,);
185-
connect (tmp_con4,localhost,root,,);
186-
connect (tmp_con5,localhost,root,,);
187-
connect (tmp_con6,localhost,root,,);
188-
connect (tmp_con7,localhost,root,,);
182+
connect (tmp_con1,localhost,quota,,test,$MASTER_MYPORT,);
183+
connect (tmp_con2,localhost,quota,,test,$MASTER_MYPORT,);
184+
connect (tmp_con3,localhost,quota,,test,$MASTER_MYPORT,);
185+
connect (tmp_con4,localhost,quota,,test,$MASTER_MYPORT,);
186+
connect (tmp_con5,localhost,quota,,test,$MASTER_MYPORT,);
187+
connect (tmp_con6,localhost,quota,,test,$MASTER_MYPORT,);
188+
connect (tmp_con7,localhost,quota,,test,$MASTER_MYPORT,);
189189

190190
connect (con5a,"127.0.0.1",quota,,test,$MASTER_MYPORT,);
191191
select "Con4a is alive";

mysql-test/suite/perfschema/t/hostcache_ipv6_max_con.test

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ set global max_user_connections = 0;
180180
set global max_connections = 10;
181181
flush user_resources;
182182

183-
connect (tmp_con1,localhost,root,,);
184-
connect (tmp_con2,localhost,root,,);
185-
connect (tmp_con3,localhost,root,,);
186-
connect (tmp_con4,localhost,root,,);
187-
connect (tmp_con5,localhost,root,,);
188-
connect (tmp_con6,localhost,root,,);
189-
connect (tmp_con7,localhost,root,,);
183+
connect (tmp_con1,localhost,quota,,test,$MASTER_MYPORT,);
184+
connect (tmp_con2,localhost,quota,,test,$MASTER_MYPORT,);
185+
connect (tmp_con3,localhost,quota,,test,$MASTER_MYPORT,);
186+
connect (tmp_con4,localhost,quota,,test,$MASTER_MYPORT,);
187+
connect (tmp_con5,localhost,quota,,test,$MASTER_MYPORT,);
188+
connect (tmp_con6,localhost,quota,,test,$MASTER_MYPORT,);
189+
connect (tmp_con7,localhost,quota,,test,$MASTER_MYPORT,);
190190

191191
connect (con5a,"::1",quota,,test,$MASTER_MYPORT,);
192192
select "Con4a is alive";

0 commit comments

Comments
 (0)