????JFIF??x?x????'
Server IP : 79.136.114.73 / Your IP : 18.224.33.235 Web Server : Apache/2.4.7 (Ubuntu) PHP/5.5.9-1ubuntu4.29 OpenSSL/1.0.1f System : Linux b8009 3.13.0-170-generic #220-Ubuntu SMP Thu May 9 12:40:49 UTC 2019 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/home/b8009/php-5.6.22/ext/mysqli/tests/ |
Upload File : |
--TEST-- mysqli_info() --SKIPIF-- <?php require_once('skipif.inc'); require_once('skipifemb.inc'); require_once('skipifconnectfailure.inc'); ?> --FILE-- <?php require_once("connect.inc"); if (!is_null($tmp = @mysqli_info())) printf("[001] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); if (!is_null($tmp = @mysqli_info(NULL))) printf("[002] Expecting NULL, got %s/%s\n", gettype($tmp), $tmp); require "table.inc"; if (!$res = mysqli_query($link, "INSERT INTO test(id, label) VALUES (100, 'a')")) printf("[003] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); // NOTE: empty string, no multiple insert syntax if (!is_null($tmp = mysqli_info($link)) || ('' != $tmp)) printf("[004] Expecting null, got %s/%s\n", gettype($tmp), $tmp); if (!$res = mysqli_query($link, "INSERT INTO test(id, label) VALUES (101, 'a'), (102, 'b')")) printf("[005] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!is_string($tmp = mysqli_info($link)) || ('' == $tmp)) printf("[006] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); if ((version_compare(PHP_VERSION, '5.9.9', '>') == 1) && !is_unicode($tmp)) printf("[007] Expecting unicode, because unicode mode it on. Got binary string\n"); if (!$res = mysqli_query($link, 'INSERT INTO test(id, label) SELECT id + 200, label FROM test')) printf("[007] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!is_string($tmp = mysqli_info($link)) || ('' == $tmp)) printf("[008] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); if (!$res = mysqli_query($link, 'ALTER TABLE test MODIFY label CHAR(2)')) printf("[009] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!is_string($tmp = mysqli_info($link)) || ('' == $tmp)) printf("[010] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); if (!$res = mysqli_query($link, "UPDATE test SET label = 'b' WHERE id >= 100")) printf("[011] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!is_string($tmp = mysqli_info($link)) || ('' == $tmp)) printf("[012] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); if (!$res = mysqli_query($link, "SELECT 1")) printf("[013] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); if (!is_null($tmp = mysqli_info($link)) || ('' != $tmp)) printf("[014] Expecting null, got %s/%s\n", gettype($tmp), $tmp); mysqli_free_result($res); // NOTE: no LOAD DATA INFILE test if ($dir = sys_get_temp_dir()) { do { $file = $dir . '/' . 'mysqli_info_phpt.cvs'; if (!$fp = fopen($file, 'w')) /* ignore this error */ break; if (!fwrite($fp, b"100;'a';\n") || !fwrite($fp, b"101;'b';\n") || !fwrite($fp, b"102;'c';\n")) { @unlink($file); break; } fclose($fp); if (!mysqli_query($link, "DELETE FROM test")) { printf("[015] [%d] %s\n", mysqli_errno($link), mysqli_error($link)); break; } if (!@mysqli_query($link, sprintf("LOAD DATA LOCAL INFILE '%s' INTO TABLE test FIELDS TERMINATED BY ';' OPTIONALLY ENCLOSED BY '\'' LINES TERMINATED BY '\n'", $file))) { /* ok, because we might not be allowed to do this */ @unlink($file); break; } if (!is_string($tmp = mysqli_info($link)) || ('' == $tmp)) printf("[016] Expecting string/any_non_empty, got %s/%s\n", gettype($tmp), $tmp); unlink($file); } while (false); } print "done!"; ?> --CLEAN-- <?php require_once("clean_table.inc"); ?> --EXPECTF-- done!