ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
class.ilDBInnoDB.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2012 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/Database/classes/MDB2/class.ilDBMySQL.php");
6
18class ilDBInnoDB extends ilDBMySQL
19{
20
24 public function getDBType()
25 {
26 return "innodb";
27 }
28
29
33 public function initConnection()
34 {
35 // SET 'max_allowed_packet' (only possible for mysql version 4)
36 $this->setMaxAllowedPacket();
37
38 // NOTE: Two sourcecodes use this or a similar handling:
39 // - classes/class.ilDB.php
40 // - setup/classes/class.ilClient.php
41
42 $this->query("SET NAMES utf8");
43 if (DEVMODE == 1) {
44 $this->query("SET SESSION SQL_MODE = 'ONLY_FULL_GROUP_BY'");
45 }
46 $this->setStorageEngine('INNODB');
47 }
48
49
53 public function supportsFulltext()
54 {
55 return false;
56 }
57
58
59 protected function getCreateTableOptions()
60 {
61 // InnoDB is default engine for MySQL >= 5.5
62 return array( 'type' => 'InnoDB' );
63 }
64
65
66 public function getStorageEngine()
67 {
68 return 'InnoDB';
69 }
70}
An exception for terminatinating execution or to throw for unit testing.
MySQL InnoDB Database Wrapper.
initConnection()
Initialize the database connection.
supportsFulltext()
Is fulltext index supported?
getDBType()
Get DB Type.
getCreateTableOptions()
Get options for the create table statement.
MySQL Database Wrapper.
query($sql, $a_handle_error=true)
Query.Example:"SELECT * FROM data"For multiple similar queries/manipulations you may use prepare() an...
setStorageEngine($a_storage_engine)
Set the storage engine.
setMaxAllowedPacket()
Set maximum allowed packet size.