3 require_once(
'./Services/Database/classes/PDO/FieldDefinition/class.ilDBPdoMySQLFieldDefinition.php');
4 require_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}");
89 foreach ($ilDBPdoManager->listTables() as $table_name) {
90 $q =
"ALTER TABLE {$this->quoteIdentifier($table_name)} CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;";
118 $seqcol_name =
'sequence';
119 $query =
"INSERT INTO $sequence_name ($seqcol_name) VALUES (NULL)";
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";
getSequenceName($table_name)
migrateAllTablesToEngine($engine=ilDBConstants::MYSQL_ENGINE_INNODB)
const MYSQL_COLLATION_UTF8MB4
supportsEngineMigration()
queryCol($query, $type=PDO::FETCH_ASSOC, $colnum=0)
quoteIdentifier($identifier, $check_option=false)
supportsCollationMigration()
const MYSQL_ENGINE_INNODB
doesCollationSupportMB4Strings()
Class ilDBPdoMySQLFieldDefinition.
migrateAllTablesToCollation($collation=ilDBConstants::MYSQL_COLLATION_UTF8MB4)
getAdditionalAttributes()
if(empty($password)) $table