Details
Improvement
Resolution:Fixed
Minor
3.10, 3.11, 4.0
PostgreSQL
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE
MOODLE_311_STABLE
MDL-70055-master
Hide
Unittest contains good coverage of all cases, however if regression test is needed, one may use any bulk user action to ensure get_in_or_equal works correctly (they all use $DB->get_in_or_equal($SESSION->bulk_users) as part of users processing). For example:
a. Make sure you are using Postgresql as db engine.
Unit test
$ vendor/bin/phpunit lib/dml/tests/pgsql_native_moodle_database_test.phpRegression test
1. Create test site, "upload users" from csv, so that you have 65000 users in total.
2. Navigate to Bulk user actions
3. Click "Add all"
4. "With selected users..." set "Delete" and click "Go" - No errors expected.New functionality test
1. Using existing test site, "upload users" from csv, so that you have 65600 users in total.
2. Navigate to Bulk user actions
3. Click "Add all"
4. "With selected users..." set "Delete" and click "Go" - No errors expected.Show
Unittest contains good coverage of all cases, however if regression test is needed, one may use any bulk user action to ensure get_in_or_equal works correctly (they all use $DB->get_in_or_equal($SESSION->bulk_users) as part of users processing). For example:a. Make sure you are using Postgresql as db engine.Unit test$ vendor/bin/phpunit lib/dml/tests/pgsql_native_moodle_database_test.phpRegression test1. Create test site, "upload users" from csv, so that you have 65000 users in total.2. Navigate to Bulk user actions3. Click "Add all"4. "With selected users..." set "Delete" and click "Go" - No errors expected.New functionality test1. Using existing test site, "upload users" from csv, so that you have 65600 users in total.2. Navigate to Bulk user actions3. Click "Add all"4. "With selected users..." set "Delete" and click "Go" - No errors expected.
Description
When querying/deleting records by bulk, we can get errors when the values array becomes too large (i.e. > 65535 parameters for PostgreSQL). This patch adds a solution for Postgres that allows overriding IN statement limit of 16bit (65535 values) by wrapping items in VALUES list. This only takes place in number of items exceeds 65535, otherwise parent class get_in_or_equal() function is used.
Attachments
Issue Links
- has a non-specific relationship to
MDL-27071Oracle cannot cope withan IN operator with more than 1000 conditions in it
-
- Closed
-
- has been marked as being related by
MDL-71433Having trouble performing certain actions with courses with more than 65,000 participants.
-
- Open
-
MDL-75160Really support large number of SQL-IN parameters in Postgres
-
- Open
-
- will help resolve
MDL-53735Split very large SQL-IN parameters to chunks
-
- Closed
-
Activity
People
Ruslan Kabalin
Ruslan Kabalin
Paul Holden
Eloy Lafuente (stronk7)
CiBoT
- Votes:
0 Vote for this issue
- Watchers:
9 Start watching this issue
Dates
- Created:
- Updated:
- Resolved:
Time Tracking
- Estimated:
- 0m
- Remaining:
- 0m
- Logged:
- 4d 3h 46m
Clockify
Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.