Macrotone Blogs

Macrotone blogs upon Joomla, our products and other matters.
Font size: +
1 minute reading time (208 words)

MySQL versions and binlog_format settings

Following on from an earlier post, there has been further investigations into the settings of the binlog_format setting for MySQL.  The problem is possibly aggravated by the use of InnoDB tables, which are the default in MySQL 5.5, the use of which offers some distinct advantages.  This setting seems to have been introduced in version 5.1.5 of MySQL.  Prior to that date it didn't exist and attempts to use the setting would generate an error, which is not totally surprising.

  Where this doesn't help is when you are trying to develop a script/program/application that will run on different versions of the database.  It is therefore necessary to have to have a routine to check the version of the database and determine the version before making a decision as to whether it is necessary to make a call changing the binlog_format.

In Joomla we can do this by using a PHP routine as follows:

$db->setQuery('select version()');
      $ret = $db->query();

This will return a version string similar to: '5.1.35-log'.  This can then be parsed to determine the individual elements which we can then check.

Given the large number of possible versions of MySQL upon which Joomla may be running, we hope that there are no more unknown 'gotchas' lurking.

×
Stay Informed

When you subscribe to the blog, we will send you an e-mail when there are new updates on the site so you wouldn't miss them.

Password Control User Profile Plugin
MySQL logs and QNAP systems
 
Go To Top

Joomla! Debug Console

Session

Profile Information

Memory Usage

Database Queries