Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensure subquery in findNewIds never returns NULL #8590

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

IchbinkeinReh
Copy link
Collaborator

@IchbinkeinReh IchbinkeinReh commented Jul 2, 2023

Fixes #4479

@ChristophWurst ChristophWurst changed the title fix #4479 by ensuring subquery in findNewIds never returns NULL Ensure subquery in findNewIds never returns NULL Sep 13, 2023
Signed-off-by: Patrick Bender <patrick@bender-it-services.de>
@ChristophWurst
Copy link
Member

Change makes sense yet I'm unsure if it fixes #4479 entirely.

To verify all our supported databases understand the query we should add an integration test for \OCA\Mail\Db\MessageMapper::findNewIds

…turns NULL

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>

$found = $this->mapper->findNewIds($mailbox, [$id + 1]);

self::assertCount(1, $found);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this fails without COALESCE 👍

…turns NULL

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
Copy link
Member

On a second look I'm skeptical about \OCA\Mail\Db\MessageMapper::findNewIds. The method is supposed to return all messages newer than the messages identified with the passed ids. Oracle doesn't like big IN clauses, so we chunk the ids array and run the query at least once. The semantics are that we'll get all messages newer than the oldest message of each chunk.

👀 @kesselb

@ChristophWurst ChristophWurst mentioned this pull request Nov 29, 2023
24 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

MailboxDoesNotSupportModSequencesException problem with mails
2 participants