mirror of
https://github.com/php/php-src.git
synced 2025-08-19 08:49:28 +02:00
Fix for mysqli_stmt_execute.phpt, should be ran only against
4.1+ servers. MySQL's SLEEP function is available since 5.0.12, thus the tests that use this function should be ran only if the server is at least 5.0.12.
This commit is contained in:
parent
fd6f3961f8
commit
ab232ebb09
3 changed files with 26 additions and 4 deletions
|
@ -6,8 +6,16 @@ require_once('skipif.inc');
|
||||||
require_once('skipifemb.inc');
|
require_once('skipifemb.inc');
|
||||||
require_once('skipifconnectfailure.inc');
|
require_once('skipifconnectfailure.inc');
|
||||||
|
|
||||||
if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
|
if (!stristr(mysqli_get_client_info(), 'mysqlnd')) {
|
||||||
die("skip: test applies only to mysqlnd");
|
die("skip: test applies only to mysqlnd");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||||
|
die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
|
||||||
|
}
|
||||||
|
if (mysqli_get_server_version($link) <= 50011) {
|
||||||
|
die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link)));
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
--INI--
|
--INI--
|
||||||
default_socket_timeout=1
|
default_socket_timeout=1
|
||||||
|
|
|
@ -6,8 +6,16 @@ require_once('skipif.inc');
|
||||||
require_once('skipifemb.inc');
|
require_once('skipifemb.inc');
|
||||||
require_once('skipifconnectfailure.inc');
|
require_once('skipifconnectfailure.inc');
|
||||||
|
|
||||||
if (!stristr(mysqli_get_client_info(), 'mysqlnd'))
|
if (!stristr(mysqli_get_client_info(), 'mysqlnd')) {
|
||||||
die("skip: test applies only to mysqlnd");
|
die("skip: test applies only to mysqlnd");
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||||
|
die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
|
||||||
|
}
|
||||||
|
if (mysqli_get_server_version($link) <= 50011) {
|
||||||
|
die(sprintf('skip Needs MySQL 5.0.12+, found version %d.', mysqli_get_server_version($link)));
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
--INI--
|
--INI--
|
||||||
default_socket_timeout=10
|
default_socket_timeout=10
|
||||||
|
|
|
@ -5,6 +5,12 @@ mysqli_stmt_execute()
|
||||||
require_once('skipif.inc');
|
require_once('skipif.inc');
|
||||||
require_once('skipifemb.inc');
|
require_once('skipifemb.inc');
|
||||||
require_once('skipifconnectfailure.inc');
|
require_once('skipifconnectfailure.inc');
|
||||||
|
if (!$link = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
|
||||||
|
die(sprintf('skip Cannot connect to MySQL, [%d] %s.', mysqli_connect_errno(), mysqli_connect_error()));
|
||||||
|
}
|
||||||
|
if (mysqli_get_server_version($link) <= 40100) {
|
||||||
|
die(sprintf('skip Needs MySQL 4.1+, found version %d.', mysqli_get_server_version($link)));
|
||||||
|
}
|
||||||
?>
|
?>
|
||||||
--FILE--
|
--FILE--
|
||||||
<?php
|
<?php
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue