Annotation of embedaddon/php/ext/mysqli/tests/bug51605.phpt, revision 1.1
1.1 ! misho 1: --TEST--
! 2: Bug #51605 Mysqli - zombie links
! 3: --SKIPIF--
! 4: <?php
! 5: require_once('skipif.inc');
! 6: require_once('skipifconnectfailure.inc');
! 7: ?>
! 8: --INI--
! 9: mysqli.max_links = 1
! 10: mysqli.allow_persistent = Off
! 11: mysqli.max_persistent = 0
! 12: mysqli.reconnect = Off
! 13: --FILE--
! 14: <?php
! 15: include ("connect.inc");
! 16:
! 17: $link = mysqli_init();
! 18: if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
! 19: printf("[002] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
! 20: }
! 21: mysqli_close($link);
! 22: echo "closed once\n";
! 23:
! 24: $link = mysqli_init();
! 25: if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
! 26: printf("[002] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
! 27: }
! 28: mysqli_close($link);
! 29: echo "closed twice\n";
! 30:
! 31: $link = mysqli_init();
! 32: if (!my_mysqli_real_connect($link, $host, $user, $passwd, $db, $port, $socket)) {
! 33: printf("[003] Connect failed, [%d] %s\n", mysqli_connect_errno(), mysqli_connect_error());
! 34: }
! 35: mysqli_close($link);
! 36: echo "closed for third time\n";
! 37:
! 38: print "done!";
! 39: ?>
! 40: --EXPECTF--
! 41: closed once
! 42: closed twice
! 43: closed for third time
! 44: done!
FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>