|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57331 column values have last character truncated on SELECT
Submitted: 2006-10-28 18:36 UTC Modified: 2006-10-31 00:01 UTC
From: fletch at pobox dot com Assigned:
Status: Closed Package: PDO_SQLITE (PECL)
PHP Version: 5.1.6 OS: Fedora Core 6
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Bug Type:
From: fletch at pobox dot com
New email:
PHP Version: OS:


 [2006-10-28 18:36 UTC] fletch at pobox dot com
All SELECTed values have the final character truncated.

Version information from phpinfo():

PECL Module version:  1.0.1 $Id: pdo_sqlite.c,v 2006/01/01 12:50:12 sniper Exp $
SQLite Library:       3.3.6

Reproduce code:
$dbh = new PDO( 'sqlite::memory:' );

$dbh->query( 'CREATE TABLE "things" ( name VARCHAR NOT NULL )');
$dbh->query( 'INSERT INTO things VALUES ( "thing one" )');

foreach( $dbh->query( 'SELECT * FROM things' ) as $row ) {
	print_r( $row );
$dbh = null;

Expected result:
    [name] => thing one
    [0] => thing one

Actual result:
    [name] => thing on
    [0] => thing on


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-10-28 18:48 UTC] fletch at pobox dot com
When performing these queries with the sqlite3 command line client on the same box, the values are returned intact.
 [2006-10-31 00:01 UTC] fletch at pobox dot com
I've compiled from CVS and this bug appears to be fixed.
PHP Copyright © 2001-2023 The PHP Group
All rights reserved.
Last updated: Sun May 28 00:03:40 2023 UTC