mirror of
https://github.com/php/php-src.git
synced 2024-10-21 00:12:34 +00:00
f8156f1607
Currently they have failed by default. Note also the environment variable MYSQL_TEST_SKIP_CONNECT_FAILURE to control the default (skip or fail)
37 lines
1.2 KiB
PHP
37 lines
1.2 KiB
PHP
--TEST--
|
|
mysql.trace_mode=1
|
|
--SKIPIF--
|
|
<?php
|
|
require_once('skipif.inc');
|
|
require_once('skipifconnectfailure.inc');
|
|
?>
|
|
--INI--
|
|
mysql.trace_mode=1
|
|
error_reporting=E_ALL | E_NOTICE | E_STRICT
|
|
--FILE--
|
|
<?php
|
|
require_once('connect.inc');
|
|
require_once('table.inc');
|
|
|
|
$res1 = mysql_query('SELECT id FROM test', $link);
|
|
|
|
if (!$res2 = mysql_db_query('phptest', 'SELECT id FROM test', $link))
|
|
printf("[001] [%d] %s\n", mysql_errno($link), mysql_error($link));
|
|
mysql_free_result($res2);
|
|
print mysql_escape_string("I don't mind character sets, do I?\n");
|
|
|
|
$res3 = mysql_query('BOGUS_SQL', $link);
|
|
mysql_close($link);
|
|
|
|
print "done!\n";
|
|
?>
|
|
--EXPECTF--
|
|
Notice: mysql_db_query(): This function is deprecated; use mysql_query() instead%sin %s on line %d
|
|
|
|
Warning: mysql_escape_string(): This function is deprecated; use mysql_real_escape_string() instead. in %s on line %d
|
|
I don\'t mind character sets, do I?\n
|
|
Warning: mysql_query(): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'BOGUS_SQL' at line 1 in %s on line %d
|
|
done!
|
|
|
|
Warning: Unknown: 1 result set(s) not freed. Use mysql_free_result to free result sets which were requested using mysql_query() in %s on line %d
|