3require_once(
'./Services/Database/classes/PDO/FieldDefinition/class.ilDBPdoMySQLFieldDefinition.php');
 
    4require_once(
'class.ilDBPdo.php');
 
   33        $this->pdo->query(
"SET SESSION sql_mode = 'IGNORE_SPACE,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION';");
 
   52            PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => 
true,
 
   53            PDO::ATTR_TIMEOUT => 300 * 60,
 
   64        $engines = $this->
queryCol(
'SHOW ENGINES');
 
   65        if (!in_array(
$engine, $engines)) {
 
   72                $this->pdo->exec(
"ALTER TABLE {$table} ENGINE={$engine}");
 
   73            } 
catch (Exception $e) {
 
   89        foreach ($ilDBPdoManager->listTables() as $table_name) {
 
   90            $q = 
"ALTER TABLE {$this->quoteIdentifier($table_name)} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;";
 
   93            } 
catch (PDOException $e) {
 
  118        $seqcol_name = 
'sequence';
 
  119        $query = 
"INSERT INTO $sequence_name ($seqcol_name) VALUES (NULL)";
 
  122        } 
catch (PDOException $e) {
 
  126        $result = $this->
query(
'SELECT LAST_INSERT_ID() AS next');
 
  127        $value = 
$result->fetchObject()->next;
 
  129        if (is_numeric($value)) {
 
  130            $query = 
"DELETE FROM $sequence_name WHERE $seqcol_name < $value";
 
An exception for terminatinating execution or to throw for unit testing.
const MYSQL_ENGINE_INNODB
const MYSQL_COLLATION_UTF8MB4
Class ilDBPdoMySQLFieldDefinition.
getAdditionalAttributes()
supportsCollationMigration()
@inheritDoc
doesCollationSupportMB4Strings()
@inheritDoc
migrateAllTablesToEngine($engine=ilDBConstants::MYSQL_ENGINE_INNODB)
migrateAllTablesToCollation($collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4)
@inheritDoc
supportsEngineMigration()
getSequenceName($table_name)
quoteIdentifier($identifier, $check_option=false)
queryCol($query, $type=PDO::FETCH_ASSOC, $colnum=0)
if(empty($password)) $table