-
Notifications
You must be signed in to change notification settings - Fork 255
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
Chunking in
statements for Oracle Compliance
#4947
Conversation
/backport to stable1.9 |
This comment has been minimized.
This comment has been minimized.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks good, didn't test though
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blocking until #4932 is merged
1735192
to
be19540
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Some smaller nitpicks 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some more nitpicks 🙈
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
$qb->setParameter('ids', $chunk, IQueryBuilder::PARAM_INT_ARRAY); | ||
$results[] = $this->findRelatedData($this->findEntities($qb), $userId); | ||
} | ||
return array_merge(...$results); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could also have used the flat map here
Signed-off-by: Anna Larch <anna@nextcloud.com>
de88d52
to
93a9a4b
Compare
The backport to stable1.9 failed. Please do this backport manually. |
$tagsQuery->setParameter('ids', $chunk, IQueryBuilder::PARAM_INT_ARRAY); | ||
$queryResult = $tagsQuery->execute(); | ||
|
||
while (($row = $queryResult->fetch()) !== false) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this done doesn't actually work. fetch
won't return any rows but always false
, despite $queryResult->rowCount()
returning 1. Investigating.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copy pasta error. the parameter is a string array, not an int array …
@ChristophWurst any plans to do a release with this fix in 1.9. |
Oracle can't deal with more than 1000 values in an expression list for
in
queries.Chunk all
in
queries so they'll use a max of 1000 values.Fixes #4941