diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2013-03-14 05:42:27 +0000 |
---|---|---|
committer | <> | 2013-04-03 16:25:08 +0000 |
commit | c4dd7a1a684490673e25aaf4fabec5df138854c4 (patch) | |
tree | 4d57c44caae4480efff02b90b9be86f44bf25409 /ext/mysql/tests/mysql_trace_mode.phpt | |
download | php2-master.tar.gz |
Imported from /home/lorry/working-area/delta_php2/php-5.4.13.tar.bz2.HEADphp-5.4.13master
Diffstat (limited to 'ext/mysql/tests/mysql_trace_mode.phpt')
-rw-r--r-- | ext/mysql/tests/mysql_trace_mode.phpt | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/ext/mysql/tests/mysql_trace_mode.phpt b/ext/mysql/tests/mysql_trace_mode.phpt new file mode 100644 index 0000000..2b6c61d --- /dev/null +++ b/ext/mysql/tests/mysql_trace_mode.phpt @@ -0,0 +1,36 @@ +--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('table.inc'); + +$res1 = mysql_query('SELECT id FROM test', $link); + +if (!$res2 = @mysql_db_query($db, '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"; +?> +--CLEAN-- +<?php +require_once("clean_table.inc"); +?> +--EXPECTF-- +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 |