1--TEST-- 2PDO MySQL national character set parameters don't affect true prepared statements 3--EXTENSIONS-- 4pdo 5pdo_mysql 6--SKIPIF-- 7<?php 8require __DIR__ . '/config.inc'; 9require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 10PDOTest::skip(); 11?> 12--FILE-- 13<?php 14require __DIR__ . '/config.inc'; 15require __DIR__ . '/../../../ext/pdo/tests/pdo_test.inc'; 16$db = PDOTest::test_factory(__DIR__ . '/common.phpt'); 17 18$db->setAttribute(PDO::ATTR_EMULATE_PREPARES, 0); 19 20$db->exec('CREATE TABLE test (bar NCHAR(4) NOT NULL)'); 21 22$stmt = $db->prepare('INSERT INTO test VALUES(?)'); 23$stmt->bindValue(1, 'foo', PDO::PARAM_STR | PDO::PARAM_STR_NATL); 24$stmt->execute(); 25 26var_dump($db->query('SELECT * from test')); 27foreach ($db->query('SELECT * from test') as $row) { 28 print_r($row); 29} 30 31?> 32--CLEAN-- 33<?php 34require __DIR__ . '/mysql_pdo_test.inc'; 35MySQLPDOTest::dropTestTable(); 36?> 37--EXPECTF-- 38object(PDOStatement)#%d (1) { 39 ["queryString"]=> 40 string(18) "SELECT * from test" 41} 42Array 43( 44 [bar] => foo 45 [0] => foo 46) 47