views:

732

answers:

3

I am new to joomla and have just discovered that it uses myISAM database engine by default.

I already searched the joomla forum and extension directory, and even in google but got no useful result. Since joomla is such a big community, I am not sure why nobody seems to have an answer to it.

I would like to know if there is any well-known distribution/extension that will make joomla use innodb such that it can support transaction.

If not, I would still like to know how difficult you think it would be if this had to be done.

+2  A: 

You could always go to installation/sql/mysql/joomla.sql and change all instances of TYPE=MyISAM to TYPE=InnoDB just before installing Joomla. However, there aren't any queries in the core Joomla components that take advantage of transactions. While you would be able to code your own components to do so, the core Joomla functionality still would not. Also, if you haven't already noticed, the core Joomla components will "lock" rows of certain tables. It does this by setting a flag designating the ID of the user currently editing the item. Not ideal, but it helps avoid conflicts when people are using non-transactional database engines.

jlleblanc
@jilleblanc: Is this correct that almost all extensions available in joomla website assume the use of MyISAM engine? If the joomla core database tables use innoDB, will there be lots of compatibility issues when installing those extensions? Is this common for joomla developers to do so, or they simply like using MyISAM engine?
bobo
Most extensions either assume MyISAM or do not specify an engine in their SQL installation files. Core is always assumed to be MyISAM. I've had installations with both MyISAM and InnoDB tables side by side with no compatibility issues (although not necessarily an ideal situation either). Most Joomla 3PD extension developers are oblivious to database engines.
jlleblanc
A: 

I'm not so sure it makes sense to force a db engine type to be used. It makes more sense to allow the admin who's installing Joomla to select the engine type. Joomla's just going to take the default if nothing is specifically set. You can change your default storage engine by changing your mySQL configuration or using the start up parameters to change the default.

See: http://dev.mysql.com/doc/refman/5.0/en/storage-engines.html

Bob
No, Joomla will not take the default: it specifies MyISAM in the installation SQL. Of course, MySQL will ignore this if it is configured to use InnoDB exclusively.
jlleblanc
A: 

InnoDB wasn't stable when Joomla was written, and entirely rewriting it can cause problems for some end-users.

Chris