Skip to content

fix(webhook_listeners): drop DISTINCT when listing configured events - #66549

Open
lazerg wants to merge 1 commit into
nextcloud:masterfrom
lazerg:fix/issue-66548-webhook-events-distinct
Open

lazerg wants to merge 1 commit into
nextcloud:masterfrom
lazerg:fix/issue-66548-webhook-events-distinct

Conversation

@lazerg

@lazerg lazerg commented Nov 13, 2026

Copy link
Copy Markdown
Contributor

Summary

getAllConfiguredEventsFromDatabase() ran SELECT DISTINCT event, and since event is a varchar(4000), MariaDB can't keep the distinct key in a memory temp table and falls back to an on-disk one on every call, even with no webhooks registered. The query now selects event without DISTINCT and duplicates are removed in PHP with array_unique(). Added a test with the same event registered twice.

Checklist

AI (if applicable)

  • The content of this PR was partly or fully generated using AI

Assisted-by: ClaudeCode:claude-opus-5-5
Signed-off-by: lazerg <lazerg2@gmail.com>
@lazerg
lazerg requested a review from a team as a code owner November 13, 2026 06:59
@lazerg
lazerg requested review from provokateurin and salmart-dev and removed request for a team November 13, 2026 06:59

This branch has not been deployed

No deployments
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.

The webhook_listeners create an on-disk temp table on every SELECT DISTINCT call no matter if the table has rows

1 participant