php-src/ext/pdo_mysql/tests/bug_39483.phpt

32 lines
661 B
Plaintext
Raw Normal View History

2006-12-04 00:41:07 +00:00
--TEST--
2018-10-14 16:03:31 +00:00
PDO MySQL Bug #39483 (Problem with handling of \ char in prepared statements)
--EXTENSIONS--
pdo
pdo_mysql
2006-12-04 00:41:07 +00:00
--SKIPIF--
<?php
require __DIR__ . '/config.inc';
require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
2006-12-04 00:41:07 +00:00
PDOTest::skip();
?>
--FILE--
<?php
require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
$db = PDOTest::test_factory(__DIR__ . '/common.phpt');
2006-12-04 00:41:07 +00:00
$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, TRUE);
$stmt = $db->prepare('SELECT UPPER(\'\0:D\0\'),?');
$stmt->execute(array(1));
var_dump($stmt->fetchAll(PDO::FETCH_NUM));
?>
--EXPECTF--
2006-12-04 00:41:07 +00:00
array(1) {
[0]=>
array(2) {
[0]=>
string(4) "%0:D%0"
2006-12-04 00:41:07 +00:00
[1]=>
string(1) "1"
}
}