test(dav): fix ORA-00932: inconsistent datatypes: expected - got BLOB - #61913
Merged
hamza221 merged 1 commit intoJul 23, 2026
Merged
Conversation
hamza221
requested review from
a team,
ChristophWurst,
SebastianKrupinski and
tcitworld
as code owners
July 8, 2026 13:17
hamza221
requested review from
Altahrim,
ArtificialOwl,
leftybournes and
salmart-dev
and removed request for
a team
July 8, 2026 13:17
Signed-off-by: Hamza <hamzamahjoubi221@gmail.com>
hamza221
force-pushed
the
fix/Oracle/blob-groupby
branch
from
July 8, 2026 13:18
1e42413 to
ffbf65b
Compare
hamza221
marked this pull request as draft
July 8, 2026 13:23
Member
|
Sigh… Oracle |
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the CalDAV reminder backend and its unit tests to avoid Oracle’s ORA-00932 error by removing a GROUP BY that included BLOB columns, while still handling duplicate reminder rows during processing.
Changes:
- Removed the
GROUP BYfromgetRemindersToProcess()and introduced PHP-side deduplication of reminder rows. - Updated CalDAV reminder backend unit tests to account for an explicit duplicate reminder row and to stabilize row ordering where needed.
- Added deterministic ordering to
UserStatusMapper::findAll()(scope-wise unrelated to the DAV/Oracle change as described).
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| apps/user_status/lib/Db/UserStatusMapper.php | Adds a deterministic ORDER BY user_id for findAll() results (not mentioned in PR’s DAV/Oracle focus). |
| apps/dav/tests/unit/CalDAV/Reminder/BackendTest.php | Updates test dataset and assertions to include a duplicate reminder row and adjusted counts. |
| apps/dav/lib/CalDAV/Reminder/Backend.php | Removes BLOB-incompatible GROUP BY and adds PHP-side deduplication for reminders-to-process. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
42
to
+46
| $query->select(['cr.id', 'cr.calendar_id','cr.object_id','cr.is_recurring','cr.uid','cr.recurrence_id','cr.is_recurrence_exception','cr.event_hash','cr.alarm_hash','cr.type','cr.is_relative','cr.notification_date','cr.is_repeat_based','co.calendardata', 'c.displayname', 'c.principaluri']) | ||
| ->from('calendar_reminders', 'cr') | ||
| ->where($query->expr()->lte('cr.notification_date', $query->createNamedParameter($this->timeFactory->getTime()))) | ||
| ->join('cr', 'calendarobjects', 'co', $query->expr()->eq('cr.object_id', 'co.id')) | ||
| ->join('cr', 'calendars', 'c', $query->expr()->eq('cr.calendar_id', 'c.id')) | ||
| ->groupBy('cr.event_hash', 'cr.notification_date', 'cr.type', 'cr.id', 'cr.calendar_id', 'cr.object_id', 'cr.is_recurring', 'cr.uid', 'cr.recurrence_id', 'cr.is_recurrence_exception', 'cr.alarm_hash', 'cr.is_relative', 'cr.is_repeat_based', 'co.calendardata', 'c.displayname', 'c.principaluri'); | ||
| ->join('cr', 'calendars', 'c', $query->expr()->eq('cr.calendar_id', 'c.id')); |
Comment on lines
+187
to
+191
| $key = implode("\0", [ | ||
| (string)$row['notification_date'], | ||
| (string)$row['event_hash'], | ||
| (string)$row['type'], | ||
| ]); |
Comment on lines
39
to
+41
| ->from($this->tableName) | ||
| ->where($qb->expr()->eq('is_backup', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL))); | ||
| ->where($qb->expr()->eq('is_backup', $qb->createNamedParameter(false, IQueryBuilder::PARAM_BOOL))) | ||
| ->orderBy('user_id', 'ASC'); |
hamza221
marked this pull request as ready for review
July 23, 2026 14:53
ChristophWurst
approved these changes
Jul 23, 2026
ChristophWurst
left a comment
Member
There was a problem hiding this comment.
Makes sense to no longer deduplicate on DB level. It is unlikely to happen, and should it then the PHP deduplication catches it.
hamza221
merged commit Jul 23, 2026
15c106d
into
test/stop-using-internal-database
172 of 189 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Oracle can't group-by blob
I tried to make sure that these fixes were not regressed: