SQLite REGEXP user function exists, but is wrongly implemented.

Solution

  • Update the SQLite REGEXP user function in the SQLite driver

Testing
php ./scripts/run-tests.sh --dburl sqlite://localhost/sqlite/db.sqlite --file core/modules/system/src/Tests/Database/SelectTest.php
There should be no fails and no exceptions.

Commit credits
Please give @sun commit credits for this issue. All the code from the patch from the first comment is originally written by @sun.

CommentFileSizeAuthor
#1 2427773-1.patch1.18 KBdaffie

Comments

daffie’s picture

Status: Active » Needs review
StatusFileSize
new1.18 KB
daffie’s picture

If I run the test locally I get the following result:


Drupal test run
---------------

Tests to be run:
  - Drupal\system\Tests\Database\SelectTest

Test run started:
  Tuesday, February 17, 2015 - 10:42

Test summary
------------

Drupal\system\Tests\Database\SelectTest                      106 passes

Test run duration: 1 min 19 sec

daffie’s picture

Title: SQLite <code>REGEXP</code> user function exists, but is wrongly implemented. » SQLite REGEXP user function exists, but is wrongly implemented.
amateescu’s picture

Priority: Critical » Major
Status: Needs review » Reviewed & tested by the community

Looks good. Thanks @daffie :)

Since the parent issue is critical and has a full patch already, I think the sub-issues that are split from it should be just major.

amateescu’s picture

Issue tags: +Needs backport to D7

This patch could also be backported to D7.

  • alexpott committed e25c440 on 8.0.x
    Issue #2427773 by sun, daffie: SQLite REGEXP user function exists, but...
alexpott’s picture

Version: 8.0.x-dev » 7.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

This issue addresses a major bug and is allowed per https://www.drupal.org/core/beta-changes. Committed e25c440 and pushed to 8.0.x. Thanks!

  • alexpott committed e25c440 on 8.1.x
    Issue #2427773 by sun, daffie: SQLite REGEXP user function exists, but...
sivaji_ganesh_jojodae’s picture

Not sure if this is still applicable for D7, couldn't find it's equivalent file or method for d7.

  • alexpott committed e25c440 on 8.3.x
    Issue #2427773 by sun, daffie: SQLite REGEXP user function exists, but...

  • alexpott committed e25c440 on 8.3.x
    Issue #2427773 by sun, daffie: SQLite REGEXP user function exists, but...

  • alexpott committed e25c440 on 8.4.x
    Issue #2427773 by sun, daffie: SQLite REGEXP user function exists, but...

  • alexpott committed e25c440 on 8.4.x
    Issue #2427773 by sun, daffie: SQLite REGEXP user function exists, but...

Status: Patch (to be ported) » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.