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)
|
2021-06-11 10:58:44 +00:00
|
|
|
--EXTENSIONS--
|
|
|
|
pdo
|
|
|
|
pdo_mysql
|
2006-12-04 00:41:07 +00:00
|
|
|
--SKIPIF--
|
|
|
|
<?php
|
2019-03-15 21:55:30 +00:00
|
|
|
require __DIR__ . '/config.inc';
|
|
|
|
require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc';
|
2006-12-04 00:41:07 +00:00
|
|
|
PDOTest::skip();
|
|
|
|
?>
|
|
|
|
--FILE--
|
|
|
|
<?php
|
2019-03-15 21:55:30 +00:00
|
|
|
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));
|
2020-08-09 09:06:57 +00:00
|
|
|
?>
|
2021-05-28 11:08:25 +00:00
|
|
|
--EXPECTF--
|
2006-12-04 00:41:07 +00:00
|
|
|
array(1) {
|
|
|
|
[0]=>
|
|
|
|
array(2) {
|
|
|
|
[0]=>
|
2021-05-28 11:08:25 +00:00
|
|
|
string(4) "%0:D%0"
|
2006-12-04 00:41:07 +00:00
|
|
|
[1]=>
|
|
|
|
string(1) "1"
|
|
|
|
}
|
|
|
|
}
|