Annotation of embedaddon/php/ext/mysql/tests/mysql_list_processes.phpt, revision 1.1.1.1

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

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>