Skip to content

[2.x] fix(sticky): qualify ambiguous id column in is_unread_sticky subquery#4520

Merged
imorland merged 1 commit into2.xfrom
im/fix-sticky-ambiguous-id
Apr 3, 2026
Merged

[2.x] fix(sticky): qualify ambiguous id column in is_unread_sticky subquery#4520
imorland merged 1 commit into2.xfrom
im/fix-sticky-ambiguous-id

Conversation

@imorland
Copy link
Copy Markdown
Member

@imorland imorland commented Apr 3, 2026

Fixes #4519.

The correlated subquery that builds the is_unread_sticky computed column used a bare id reference:

where `sticky`.`discussion_id` = `id`

When the outer discussions query is joined by another extension (e.g. byobu adding LEFT JOIN recipients), MySQL raises Column 'id' in where clause is ambiguous. Qualifying it as discussions.id resolves this regardless of what JOINs are present.

@imorland imorland requested a review from a team as a code owner April 3, 2026 08:19
@imorland imorland changed the title fix(sticky): qualify ambiguous id column in is_unread_sticky subquery [2.x] fix(sticky): qualify ambiguous id column in is_unread_sticky subquery Apr 3, 2026
@imorland imorland added this to the 2.0.0-rc.1 milestone Apr 3, 2026
@imorland imorland merged commit 8a886b8 into 2.x Apr 3, 2026
25 checks passed
@imorland imorland deleted the im/fix-sticky-ambiguous-id branch April 3, 2026 08:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[2.x][sticky] Ambiguous column 'id' in sticky is_unread_sticky expression when other extensions add JOINs

1 participant