Loading...
 

About InnoDB

InnoDB is a storage engine for the databases supported by Tiki: MariaDB, MySQL and Percona Server for MySQL.

Support for InnoDB was introduced in Tiki8 (2011). InnoDB is the default storage engine since Tiki18 (2017) and MariaDB 10.2 (2017)

InnoDB provides several benefits over the MyISAM engine. It offers better crash recovery.

Additionally, InnoDB supports (multi-statement) transactions and row-level locking, i.e. updates, inserts and deletes will no longer lock the whole file/table. It also supports referential integrity by the use of foreign keys. But these features are currently not used by vanilla Tiki. Customized Tiki versions could take advantage of these features, e.g. if the tiki_pages table is linked from a custom table.

Installing with InnoDB

When creating the Tiki database, the user can choose to use MyISAM or InnoDB. Once the choice is made, Tiki will remember the selection.

Migrating existing MyISAM databases

Migration steps:

  1. Make sure you are not using the deprecated tiki-searchresults.php feature (preference name feature_search_fulltext and removed after Tiki26), but instead use tiki-searchindex.php (preference name: feature_search)
  2. Do a full backup of your current database/installation
  3. Alter the database engine for all tables to InnoDB using db/tiki_convert_myisam_to_innodb.sql


Performing the conversion with phpMyAdmin may cause a PHP timeout. Running the script with the mysql command avoids that:

Copy to clipboard
mysql -u userName -p databaseName < db\tiki_convert_myisam_to_innodb.sql

Nevertheless, step 4 may fail converting the tiki_files table if innodb_log_file_size is not high enough. In one case, 25 MB was insufficient (80 MB sufficed).

The source code lives here: https://gitlab.com/tikiwiki/tiki/-/blob/master/db/tiki_convert_myisam_to_innodb.sql

Supporting InnoDB

Installs

Rules

  • No FKs are allowed in the tiki.sql script.
  • Fulltext index definitions are placed in the tiki_myisam.sql file. InnoDB specific definitions are placed in the tiki_innodb.sql file.
  • The word MyISAM must be used (only) in the engine specification, and it is not allowed in attribute names or other definitions.


The Tiki installer translates the engine type, based on the selected database in the installer GUI.

After the main install script (tiki.sql), the installer will run tiki_myisam.sql or tiki_innodb.sql for the respective installation. tiki_myisam.sql installs the fulltext indexes.

Upgrades

When adding an engine-dependent patch, the engine-independent SQL statements must be put in the YYYYMMDD_description_tiki.sql file. The engine-dependent parts must be put in an accompanying PHP file, defining a post_YYYYMMDD_description_tiki function.
Example: Add a table with a fulltext index

20110918_tiki_test_tiki.sql
Copy to clipboard
DROP TABLE IF EXISTS `tiki_test`; CREATE TABLE `tiki_test` ( `title` varchar(255) default NULL, KEY `title` (`title`) ) ENGINE=MyISAM;

and a PHP file specifying the engine dependent part

20110918_tiki_test_tiki.php
Copy to clipboard
function post_20110918_tiki_test_tiki( $installer ) { if($installer->isMySQLFulltextSearchSupported()) { $installer->query( "CREATE FULLTEXT INDEX ft_test ON tiki_test(`title`);"); } }


More info at Database Schema Upgrade

Continuous Integration

The Tiki CI has sql-engine-conversion section which leverages doc/devtools/check_sql_engine_conversion.php


See also:

doc.tiki.org

Get Started

Admin Guide User Guide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting
Articles and Submissions
Backlinks
Banners
Batch
BigBlueButton audio/video/chat/screensharing
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution
Cookie
Copyright
Credit
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs
Draw
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Mail-in
Map with Mapserver
Menu
Meta Elements
Mobile Tiki and Voice Tiki
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags
Task
Tell a Friend, alert + Social Bookmarking
TikiTests
Theme CSS & Smarty
Tiki Manager
Trackers
Transitions
User Administration including registration and banning
User Files
User Menu
Watch
WebDAV
Webmail
Web Services
Wiki History, page rename, etc
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG
XMLRPC

Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki