-
Bug
-
Resolution: Won't Fix
-
Minor
-
None
-
1.9.10, 1.9.11, 1.9.12, 1.9.13, 1.9.14, 1.9.15
-
Any
-
MOODLE_19_STABLE
-
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.