Page MenuHomePhabricator

Add support for SQLite and postgre when searching patterns
Open, NormalPublic

Description

Currently we use RLIKE to allow users search with regular expressions. However, nor SQLite nor Postgre support RLIKE operator. Although we have bigger problems with those 2, we still need to make some changes to the search with regexps.

Event Timeline

Daimona created this task.Apr 25 2018, 6:26 PM
Restricted Application added subscribers: Scoopfinder, Aklapper. · View Herald TranscriptApr 25 2018, 6:26 PM
Daimona triaged this task as Normal priority.Apr 26 2018, 11:20 AM

As I was saying, we have T62639 and T42757 which should be addressed first since they provide bigger unusability.

Vvjjkkii renamed this task from Add support for SQLite and postgre when searching patterns to b8daaaaaaa.Jul 1 2018, 1:13 AM
Vvjjkkii raised the priority of this task from Normal to High.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed a subscriber: Aklapper.
Mainframe98 renamed this task from b8daaaaaaa to Add support for SQLite and postgre when searching patterns.Jul 1 2018, 10:04 AM
Mainframe98 lowered the priority of this task from High to Normal.
Mainframe98 updated the task description. (Show Details)
Mainframe98 added a subscriber: Aklapper.

I'm also wondering whether the cast to char needs to be rewritten to be DBMS-independent.

Daimona added a comment.EditedNov 16 2018, 1:11 PM

I'm also wondering whether the cast to char needs to be rewritten to be DBMS-independent.

Yes, it does (for instance, on Postgres the CAST only returns the first character of the string). https://gerrit.wikimedia.org/r/#/c/mediawiki/core/+/474172/ for that part.

Change 503562 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Make patterns searching compatible with Postgres and SQLite

https://gerrit.wikimedia.org/r/503562

Daimona claimed this task.Apr 13 2019, 9:36 AM

Patch above + its dependencies and that's it.