The functionality CONCAT_WS() is not supported by SQLite. CONCAT_WS() is supported by MySQL and is actively used by the views module.
Solution
- Create support for
CONCAT_WS()is the SQLite driver - Add testing for the added
CONCAT_WS()
Testing
php ./scripts/run-tests.sh --dburl sqlite://localhost/sqlite/db.sqlite --file core/modules/system/src/Tests/Database/BasicSyntaxTest.php
There should be no fails and no exceptions.
Commit credits
Please give @sun commit credits for this issue. All the code from the patches from the first and second comments are originally written by @sun.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 2427311-2.patch | 3.58 KB | daffie |
Comments
Comment #1
daffie commentedThis patch is cut-and-pasted from the patch from #2318191: [meta] Database tests fail on SQLite.
Comment #2
daffie commentedOeps. Wrong patch.
Comment #3
daffie commentedIf I run the test locally I get the following result:
Comment #4
daffie commentedComment #5
hass commentedWhat about PostgreSQL, Oracle, MsSQL?
I think we should not allow MySQL specific SQL functions.
Comment #6
dawehnerWell, I personally think that adding a feature most users can use, but is optional, was a good decision in Drupal 7.
Btw. I think we are working on better Pgsql support in core, this can be figure out. For the other database engines,
feel free to override the single handler views provides.
Comment #7
amateescu commentedCONCAT_WS() is supported in PostgreSQL and Oracle. Also, Oracle and MsSQL drivers are not provided by Drupal core and they can provide their own implementation in contrib.
The patch looks good and committers should also credit @sun because he wrote this code in #2318191: [meta] Database tests fail on SQLite.
Comment #8
daffie commentedComment #9
alexpottThis issue addresses a critical bug and is allowed per https://www.drupal.org/core/beta-changes. Committed 78ac456 and pushed to 8.0.x. Thanks!
@daffie are you going to create the rest of the issues from #2318191: [meta] Database tests fail on SQLite?
Comment #11
daffie commented@alexpott: That is my plan!
Comment #12
amateescu commentedDowngrading to major per #2318191-58: [meta] Database tests fail on SQLite.