Req #79433 [NEW]: Update sqlite3 to support generated columns (3.31)
| From: | l33tengineer at gmail dot com | Date: | Mon, 30 Mar 2020 10:48:21 +0000 |
| Subject: | Req #79433 [NEW]: Update sqlite3 to support generated columns (3.31) | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-226338@lists.php.net to get a copy of this message | ||
From: l33tengineer at gmail dot com
Operating system: debian linux
PHP version: 7.4.4
Package: PDO SQLite
Bug Type: Feature/Change Request
Bug description:Update sqlite3 to support generated columns (3.31)
Description:
------------
Generated column support was added with SQLite version 3.31.0
(2020-01-22).
Php does not yet support this version and with it the generated column
syntax.
I'd like to propose an update to the sqlite extension to allow for the
generated column syntax as described in https://sqlite.org/gencol.html.
Creating an (in-memory) sqlite database with
GENERATED ALWAYS AS sql
now gives a syntax error.
Test script:
---------------
<?php
$db = new \PDO('sqlite::memory:');
$sql = <<<SQL
CREATE TABLE t1(
a INTEGER PRIMARY KEY,
b INT,
c TEXT,
d INT GENERATED ALWAYS AS (a*abs(b)) VIRTUAL,
e TEXT GENERATED ALWAYS AS (substr(c,b,b+1)) STORED
);
SQL;
$result = $db->exec($sql);
var_dump($result);
var_dump($db->errorInfo());
--
Edit bug report at https://bugs.php.net/bug.php?id=79433&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79433&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79433&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79433&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79433&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79433&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79433&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79433&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79433&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79433&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79433&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79433&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79433&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79433&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79433&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79433&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79433&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79433&r=mysqlcfg