MDL-59476 dml: temporary mysql tables should not use compressed rows

This commit is contained in:
Marina Glancy 2017-07-25 13:49:53 +08:00
parent 229ae617c5
commit c07c8c6e3e

View file

@ -329,13 +329,10 @@ class mysql_sql_generator extends sql_generator {
* @return array of sql statements * @return array of sql statements
*/ */
public function getCreateTempTableSQL($xmldb_table) { public function getCreateTempTableSQL($xmldb_table) {
$engine = $this->mdb->get_dbengine();
// Do we know collation? // Do we know collation?
$collation = $this->mdb->get_dbcollation(); $collation = $this->mdb->get_dbcollation();
$this->temptables->add_temptable($xmldb_table->getName()); $this->temptables->add_temptable($xmldb_table->getName());
$rowformat = $this->mdb->get_row_format_sql($engine, $collation);
$sqlarr = parent::getCreateTableSQL($xmldb_table); $sqlarr = parent::getCreateTableSQL($xmldb_table);
// Let's inject the extra MySQL tweaks. // Let's inject the extra MySQL tweaks.
@ -347,7 +344,7 @@ class mysql_sql_generator extends sql_generator {
if (strpos($collation, 'utf8_') === 0) { if (strpos($collation, 'utf8_') === 0) {
$sqlarr[$i] .= " DEFAULT CHARACTER SET utf8"; $sqlarr[$i] .= " DEFAULT CHARACTER SET utf8";
} }
$sqlarr[$i] .= " DEFAULT COLLATE $collation $rowformat"; $sqlarr[$i] .= " DEFAULT COLLATE $collation ROW_FORMAT=DYNAMIC";
} }
} }
} }