Permalink
Browse files

Specify MySQL storage engine for mfdb temp tables.

Since MySQL 5.5 changes the default storage engine to InnoDB, and since
many distros configure the InnoDB file path to refer to a directory on a
file system with barriers enabled, any temporary tables written to disk
will be written as InnoDB tables on the InnoDB file path, rather than
using MyISAM tables, which can be stored on the tmpdir.  This results in
severe performance issues when using mythfilldatabase with Schedules
Direct data.  Therefore, specify the use of MyISAM storage engine for
mythfilldatabase DataDirect temporary tables.

See, also:
https://bugs.launchpad.net/ubuntu/+source/mythtv/+bug/997367
(cherry picked from commit c06b706)
  • Loading branch information...
1 parent 27a5404 commit 4f55fd1a10fc3cb76283ce5593528da31fe83a07 @sphery sphery committed May 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 mythtv/libs/libmythtv/datadirect.cpp
@@ -1238,7 +1238,7 @@ void DataDirectProcessor::CreateATempTable(const QString &ptablename,
MSqlQuery query(MSqlQuery::DDCon());
QString querystr;
querystr = "CREATE TEMPORARY TABLE IF NOT EXISTS " + ptablename + " " +
- ptablestruct + ";";
+ ptablestruct + " ENGINE=MyISAM;";
if (!query.exec(querystr))
MythDB::DBError("Creating temporary table", query);

0 comments on commit 4f55fd1

Please sign in to comment.