Skip to content

Commit 83738fc

Browse files
committed
Remove MySQL 4.1 checks
1 parent 5f6bf3e commit 83738fc

6 files changed

+2
-78
lines changed

ext/mysqli/tests/mysqli_change_user_set_names.phpt

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,7 @@ mysqli_change_user() - SET NAMES
44
mysqli
55
--SKIPIF--
66
<?php
7-
require_once 'connect.inc';
8-
9-
if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
10-
die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
11-
12-
if (!$res = mysqli_query($link, 'SELECT version() AS server_version'))
13-
die(sprintf("skip [%d] %s\n", mysqli_errno($link), mysqli_error($link)));
14-
15-
$tmp = mysqli_fetch_assoc($res);
16-
mysqli_free_result($res);
17-
$version = explode('.', $tmp['server_version']);
18-
if (empty($version))
19-
die(sprintf("skip Cannot determine server version, we need MySQL Server 4.1+ for the test!"));
20-
21-
if ($version[0] <= 4 && $version[1] < 1)
22-
die(sprintf("skip We need MySQL Server 4.1+ for the test!"));
7+
require_once 'skipifconnectfailure.inc';
238
?>
249
--FILE--
2510
<?php

ext/mysqli/tests/mysqli_character_set.phpt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,17 +16,6 @@ require_once 'skipifconnectfailure.inc';
1616
printf("[001] Cannot connect to the server using host=%s, user=%s, passwd=***, dbname=%s, port=%s, socket=%s\n",
1717
$host, $user, $db, $port, $socket);
1818

19-
if (!$res = mysqli_query($link, 'SELECT version() AS server_version'))
20-
printf("[002] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
21-
$tmp = mysqli_fetch_assoc($res);
22-
mysqli_free_result($res);
23-
$version = explode('.', $tmp['server_version']);
24-
if (empty($version))
25-
printf("[003] Cannot determine server version, need MySQL Server 4.1+ for the test!\n");
26-
27-
if ($version[0] <= 4 && $version[1] < 1)
28-
printf("[004] Need MySQL Server 4.1+ for the test!\n");
29-
3019
if (!$res = mysqli_query($link, "SHOW CHARACTER SET"))
3120
printf("[005] Cannot get list of available character sets, [%d] %s\n",
3221
mysqli_errno($link), mysqli_error($link));

ext/mysqli/tests/mysqli_get_charset.phpt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,6 @@ require_once 'skipifconnectfailure.inc';
1515
exit(1);
1616
}
1717

18-
if (!$res = mysqli_query($link, 'SELECT version() AS server_version'))
19-
printf("[004] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
20-
$tmp = mysqli_fetch_assoc($res);
21-
mysqli_free_result($res);
22-
$version = explode('.', $tmp['server_version']);
23-
if (empty($version))
24-
printf("[005] Cannot determine server version, need MySQL Server 4.1+ for the test!\n");
25-
26-
if ($version[0] <= 4 && $version[1] < 1)
27-
printf("[006] Need MySQL Server 4.1+ for the test!\n");
28-
2918
if (!$res = mysqli_query($link, 'SELECT @@character_set_connection AS charset, @@collation_connection AS collation'))
3019
printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link));
3120
$tmp = mysqli_fetch_assoc($res);

ext/mysqli/tests/mysqli_options.phpt

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,20 +29,6 @@ if (!$link2 = my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
2929
$host, $user, $db, $port, $socket);
3030
}
3131

32-
if (!$res = mysqli_query($link2, 'SELECT version() AS server_version')) {
33-
printf("[007] [%d] %s\n", mysqli_errno($link2), mysqli_error($link2));
34-
}
35-
$tmp = mysqli_fetch_assoc($res);
36-
mysqli_free_result($res);
37-
$version = explode('.', $tmp['server_version']);
38-
if (empty($version)) {
39-
printf("[008] Cannot determine server version, need MySQL Server 4.1+ for the test!\n");
40-
}
41-
42-
if ($version[0] <= 4 && $version[1] < 1) {
43-
printf("[009] Need MySQL Server 4.1+ for the test!\n");
44-
}
45-
4632
if (!$res = mysqli_query($link2, "SHOW CHARACTER SET")) {
4733
printf("[010] Cannot get list of available character sets, [%d] %s\n",
4834
mysqli_errno($link2), mysqli_error($link2));

ext/mysqli/tests/mysqli_set_charset.phpt

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,6 @@ require_once 'connect.inc';
88
if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket))
99
die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
1010

11-
if (!($res = mysqli_query($link, 'SELECT version() AS server_version')) ||
12-
!($tmp = mysqli_fetch_assoc($res))) {
13-
mysqli_close($link);
14-
die(sprintf("skip Cannot check server version, [%d] %s\n",
15-
mysqli_errno($link), mysqli_error($link)));
16-
}
17-
mysqli_free_result($res);
18-
$version = explode('.', $tmp['server_version']);
19-
if (empty($version)) {
20-
mysqli_close($link);
21-
die(sprintf("skip Cannot check server version, based on '%s'",
22-
$tmp['server_version']));
23-
}
24-
25-
if ($version[0] <= 4 && $version[1] < 1) {
26-
mysqli_close($link);
27-
die(sprintf("skip Requires MySQL Server 4.1+\n"));
28-
}
29-
3011
if ((($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin1"', MYSQLI_STORE_RESULT)) &&
3112
(mysqli_num_rows($res) == 1)) ||
3213
(($res = mysqli_query($link, 'SHOW CHARACTER SET LIKE "latin2"', MYSQLI_STORE_RESULT)) &&

ext/mysqli/tests/mysqli_stmt_execute.phpt

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,7 @@ mysqli_stmt_execute()
44
mysqli
55
--SKIPIF--
66
<?php
7-
require_once 'connect.inc';
8-
if (!$link = @my_mysqli_connect($host, $user, $passwd, $db, $port, $socket)) {
9-
die(sprintf("skip Can't connect to MySQL Server - [%d] %s", mysqli_connect_errno(), mysqli_connect_error()));
10-
}
11-
if (mysqli_get_server_version($link) <= 40100) {
12-
die(sprintf('skip Needs MySQL 4.1+, found version %d.', mysqli_get_server_version($link)));
13-
}
7+
require_once 'skipifconnectfailure.inc';
148
?>
159
--FILE--
1610
<?php

0 commit comments

Comments
 (0)