Skip to content

Commit

Permalink
Merge branch 'wip-MDL-59476-master-2' of git://github.com/marinaglanc…
Browse files Browse the repository at this point in the history
…y/moodle
  • Loading branch information
danpoltawski committed Jul 31, 2017
2 parents 63615f6 + c07c8c6 commit 23e1ce7
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions lib/ddl/mysql_sql_generator.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,13 +329,10 @@ public function getAddFieldSQL($xmldb_table, $xmldb_field, $skip_type_clause = N
* @return array of sql statements
*/
public function getCreateTempTableSQL($xmldb_table) {
$engine = $this->mdb->get_dbengine();
// Do we know collation?
$collation = $this->mdb->get_dbcollation();
$this->temptables->add_temptable($xmldb_table->getName());

$rowformat = $this->mdb->get_row_format_sql($engine, $collation);

$sqlarr = parent::getCreateTableSQL($xmldb_table);

// Let's inject the extra MySQL tweaks.
Expand All @@ -347,7 +344,7 @@ public function getCreateTempTableSQL($xmldb_table) {
if (strpos($collation, 'utf8_') === 0) {
$sqlarr[$i] .= " DEFAULT CHARACTER SET utf8";
}
$sqlarr[$i] .= " DEFAULT COLLATE $collation $rowformat";
$sqlarr[$i] .= " DEFAULT COLLATE $collation ROW_FORMAT=DYNAMIC";
}
}
}
Expand Down

0 comments on commit 23e1ce7

Please sign in to comment.