Re: help confirming a PDO_SQLITE bug

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks to anyone who entertained my previous email, but I've solved my own problem.

It looks like the bug is in PDO_SQLITE 1.0.1. I've just compiled from that extension from CVS, changing nothing else, and the bug is gone.

--rick

Rick Fletcher wrote:
I've just upgraded to Fedora Core 6 and my personal site broke. Along with the upgrade came PHP 5.1.6 and SQLite 3.3.6. After the upgrade any SELECT returns all its values with the last character missing.

I've filed a bug at pecl.php.net (http://pecl.php.net/bugs/bug.php?id=9191), but it doesn't look as though that's reviewed very often. I need help confirming that it is a PDO or SQLite bug so that I can begin upgrading or downgrading to avoid it.

If you have matching versions of PHP and/or SQLite, can you try out the test script below and see if it's broken in the same way?

Thanks,
Rick Fletcher

Reproduce code:
---------------
<?php
$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:
----------------
Array
(
    [name] => thing one
    [0] => thing one
)

Actual result:
--------------
Array
(
    [name] => thing on
    [0] => thing on
)


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux