Skip to content

Fix collation issue when using LOWER with REGEXP#548

Merged
Universal-Omega merged 1 commit intoUniversal-Omega:mainfrom
weirdgloop:patch-ignorecase-collation
Feb 3, 2026
Merged

Fix collation issue when using LOWER with REGEXP#548
Universal-Omega merged 1 commit intoUniversal-Omega:mainfrom
weirdgloop:patch-ignorecase-collation

Conversation

@jayktaylor
Copy link
Contributor

When using REGEXP (e.g titleregexp in a DPL invocation) in combination with LOWER (e.g ignorecase in a DPL invocation), the following error is received:

[DynamicPageList4] Query error at MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Dpl: Error 3995: Character set 'utf8mb4_0900_ai_ci' cannot be used in conjunction with 'binary' in call to regexp_like.
Function: MediaWiki\Extension\DynamicPageList4\Query::buildAndSelect - Dpl
Query: SELECT /*+ MAX_EXECUTION_TIME(10000)*/ DISTINCT p.page_namespace AS `page_namespace`,p.page_id AS `page_id`,p.page_title AS `page_title`  FROM `page` `p`    WHERE ((LOWER(CAST(p.page_title AS CHAR CHARACTER SET utf8mb4)) REGEXP '(.*[cc]aves*_[(]+)') OR (LOWER(CAST(p.page_title AS CHAR CHARACTER SET utf8mb4)) REGEXP '(.*[cc]aves*$)')) AND p.page_is_redirect = 0  LIMIT 500  

This PR fixes this issue by using the correct collation.

@coderabbitai
Copy link

coderabbitai bot commented Feb 3, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

  • 🔍 Trigger a full review
✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@Universal-Omega Universal-Omega merged commit 3e101f4 into Universal-Omega:main Feb 3, 2026
15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants