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