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.
Description
Details
Status | Subtype | Assigned | Task | ||
---|---|---|---|---|---|
Resolved | None | T254646 Reconsidering how we name things | |||
Open | None | T281536 Schema:EditAttemptStep uses non-inclusive language. | |||
Open | None | T279275 Move all the functionality of {Spam,Title}Blacklist extensions into AbuseFilter and retire them | |||
Resolved | None | T290934 Expand the set of bundled extensions and skins in MediaWiki 1.38 | |||
Resolved | Daimona | T191740 Bundle AbuseFilter extension with MediaWiki | |||
Resolved | Daimona | T199544 Make AbuseFilter work on PostgreSQL and SQLite (epic) | |||
Resolved | Daimona | T193068 Add support for SQLite and postgre when searching patterns |
Event Timeline
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
Change 538026 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Use PHP regexps instead of SQL to filter results on Special:AbuseFilter
@CPT I'd like to go with this one. The other AF patch should probably be abandoned, while I think the depends-on in core may still be valuable (I'm gonna open separate tasks for them if that's the case).
Change 547186 had a related patch set uploaded (by Daimona Eaytoy; owner: Daimona Eaytoy):
[mediawiki/extensions/AbuseFilter@master] Use PHP regexps instead of SQL to filter on Special:AbuseFilter
Change 503562 abandoned by Jforrester:
Make patterns searching compatible with Postgres and SQLite
Reason:
Per the other one being merged.
Change 547186 merged by jenkins-bot:
[mediawiki/extensions/AbuseFilter@master] Use PHP regexps instead of SQL to filter on Special:AbuseFilter
Change 538026 abandoned by Daimona Eaytoy:
Use PHP regexps instead of SQL to filter results on Special:AbuseFilter
Reason:
Superseded by If6d8717795b6c1dcf619a23363eb6144902cfaed