1--TEST-- 2Bug #80783 (PDO ODBC truncates BLOB records at every 256th byte) 3--EXTENSIONS-- 4pdo_odbc 5--SKIPIF-- 6<?php 7 8require 'ext/pdo/tests/pdo_test.inc'; 9PDOTest::skip(); 10 11if (PDO_ODBC_TYPE === "unixODBC") { 12 die("skip Fails with unixODBC"); 13} 14?> 15--FILE-- 16<?php 17require 'ext/pdo/tests/pdo_test.inc'; 18$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); 19$db->exec("CREATE TABLE bug80783a (name NVARCHAR(MAX))"); 20 21$string = str_repeat("0123456789", 50); 22$db->exec("INSERT INTO bug80783a VALUES('$string')"); 23 24$stmt = $db->prepare("SELECT name FROM bug80783a"); 25$stmt->setAttribute(PDO::ODBC_ATTR_ASSUME_UTF8, true); 26$stmt->bindColumn(1, $data, PDO::PARAM_STR); 27$stmt->execute(); 28$stmt->fetch(PDO::FETCH_BOUND); 29 30var_dump($data === $string); 31?> 32--CLEAN-- 33<?php 34require 'ext/pdo/tests/pdo_test.inc'; 35$db = PDOTest::test_factory(dirname(__FILE__) . '/common.phpt'); 36$db->exec("DROP TABLE bug80783a"); 37?> 38--EXPECT-- 39bool(true) 40