-
Notifications
You must be signed in to change notification settings - Fork 7.8k
/
Copy pathmysql_list_processes.phpt
52 lines (40 loc) · 1.25 KB
/
mysql_list_processes.phpt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
--TEST--
mysql_list_processes()
--SKIPIF--
<?php
require_once('skipif.inc');
require_once('skipifconnectfailure.inc');
?>
--FILE--
<?php
include "connect.inc";
$tmp = NULL;
$link = NULL;
if (NULL !== ($tmp = @mysql_list_processes($link, $link)))
printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp);
require('table.inc');
if (!$res = mysql_list_processes($link))
printf("[002] [%d] %s\n", mysql_errno($link), mysql_error($link));
if (!$num = mysql_num_rows($res))
printf("[003] Empty process list? [%d] %s\n", mysql_errno($link), mysql_error($link));
$row = mysql_fetch_array($res, MYSQL_NUM);
if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) {
printf("[004] Check for unicode support\n");
var_inspect($row);
}
mysql_free_result($res);
if (!$res = mysql_list_processes())
printf("[005] [%d] %s\n", mysql_errno(), mysql_error());
if (!$num = mysql_num_rows($res))
printf("[006] Empty process list? [%d] %s\n", mysql_errno(), mysql_error());
$row = mysql_fetch_array($res, MYSQL_NUM);
if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($row[0])) {
printf("[007] Check for unicode support\n");
var_inspect($row);
}
mysql_free_result($res);
mysql_close($link);
print "done!\n";
?>
--EXPECTF--
done!