From: [email]mrobinso@php.net[/email]
Operating system: RH-8.0
PHP version: 4.3.3RC4
PHP Bug Type: SQLite related
Bug description: sqlite appending one extra char at end of each table name

Description:
------------
The sqlite library is appending an extra character onto
the end of any specified table name. For example, if I
specify a table name of 'foo' for a query, sqlite looks for a table named
'fooo'. It takes the last character of the table name supplied, and
appends an extra one of those chars onto the end of the table name.

If I do a select and supply a table name of 'fo', sqlite will return data
from the table 'foo'.

Sqlite was installed with pear.

Reproduce code:
---------------
# The table 'foo' exists and has data in it.
# returns data.

if ($db = @sqlite_open('test.db', 0666, $sqliteerror)) {
$result = sqlite_query($db,'SELECT * from "fo');
var_dump(sqlite_fetch_array($result));
} else {
die ($sqliteerror);
}

# Changing the name to 'foo' returns a
# 'no such table' error






--
Edit bug report at [url]http://bugs.php.net/?id=25179&edit=1[/url]
--
Try a CVS snapshot (php4): [url]http://bugs.php.net/fix.php?id=25179&r=trysnapshot4[/url]
Try a CVS snapshot (php5): [url]http://bugs.php.net/fix.php?id=25179&r=trysnapshot5[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=25179&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=25179&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=25179&r=needtrace[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=25179&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=25179&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=25179&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=25179&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=25179&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=25179&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=25179&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=25179&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=25179&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=25179&r=gnused[/url]