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

create_temp_table() errors out with indexes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: Minor Minor
    • None
    • 1.9.10, 1.9.11, 1.9.12, 1.9.13, 1.9.14, 1.9.15
    • Database SQL/XMLDB
    • Any
    • MOODLE_19_STABLE
    • Hide

      See patch

      Show
      See patch

      When passing an XMLDBTable table object with indexes to function create_temp_table() (lib/ddllib.php), errors are encountered.

      This is because of:
      $sqlarr = preg_replace('/^CREATE/', "CREATE $temporary", $sqlarr)
      which will also cause index creation statements to be changed to something like "CREATE TEMPORARY INDEX..." to "CREATE GLOBAL TEMPORARY INDEX...".

      This will be an issue with all db types, except for mssql where $temporary variable is set to ''.

      Please see the attached patch that might fix the issue.

      Cheers,
      Eugene.

            skodak Petr Skoda
            binare E
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.