Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53735

Split very large SQL-IN parameters to chunks

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.9.5, 3.0.3, 3.1
    • Fix Version/s: None
    • Component/s: Database SQL/XMLDB
    • Labels:

      Description

      When querying/deleting records by bulk, we can get errors when the values array becomes too large (i.e. > 65535 parameters for PostgreSQL, >1000 for Oracle). Basically, this involves the \moodle_database methods that use where_clause_list(), such as \moodle_database::get_recordset_list(), \moodle_database::get_records_list(), and \moodle_database::delete_records_list().

      We need to split the values array into chunks in order to avoid these errors.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              jpataleta Jun Pataleta
              Participants:
              Component watchers:
              Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

                Dates

                Created:
                Updated: