php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #78497 SQLite3 version regression
Submitted: 2019-09-05 20:03 UTC Modified: 2019-09-06 07:29 UTC
From: fra dot martin at free dot fr Assigned: cmb (profile)
Status: Not a bug Package: SQLite related
PHP Version: 7.3.9 OS: Debian Jessie
Private report: No CVE-ID: None
 [2019-09-05 20:03 UTC] fra dot martin at free dot fr
Description:
------------
SQLite3 version is 3.8.7.1 in latest PHP 7.3.9 (Debian Jessie repositories)
when PHP 7.3.8 had SQLITE 3.28.0

... big regression!


Test script:
---------------
echo SQLite3::version()


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2019-09-05 21:24 UTC] cmb@php.net
-Status: Open +Status: Not a bug -Assigned To: +Assigned To: cmb
 [2019-09-05 21:24 UTC] cmb@php.net
The bundled libsqlite3 is indeed version 3.28.0 in PHP 7.3.8 and
7.3.9.  It is, however, not up to php.net to decide which version
is used by distros.  Feel free to report this issue to Debian.
 [2019-09-05 22:59 UTC] phpbugreports at gmail dot com
> SQLite3 version is 3.8.7.1 in latest PHP 7.3.9 (Debian Jessie repositories)

how does that bother upstream in any way?
 [2019-09-06 07:29 UTC] fra dot martin at free dot fr
Hi,
When querying from a SQLite View with alias, the field names change depending on the libsqlite3 version.

Ex: 
// 'my_view' is defined as: CREATE my_view AS SELECT id FROM my_table
$q = $db->query("select m.id from my_view as m");
$r = $q->fetchArray(SQLITE3_ASSOC);

Then, to read the ID field:
With sqlite v3.8.7.1, I have to use $r['m.id']
With sqlite v3.28.0, I have to use $r['id']

When queyring from a Table with exactly the same syntax:
$q = $db->query("select m.id from my_table as m");
$r = $q->fetchArray(SQLITE3_ASSOC);

I can use $r['id'] with both SQLite versions.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Fri Apr 16 12:01:23 2021 UTC