Deprecated: Joomla\Input\Input implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 41

Deprecated: Return type of Joomla\Input\Input::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /homepages/13/d380392445/htdocs/Jlive/libraries/vendor/joomla/input/src/Input.php on line 170

Deprecated: KunenaControllerApplicationDisplay implements the Serializable interface, which is deprecated. Implement __serialize() and __unserialize() instead (or in addition, if support for old PHP versions is necessary) in /homepages/13/d380392445/htdocs/Jlive/libraries/kunena/controller/application/display.php on line 21

Deprecated: preg_match_all(): Passing null to parameter #2 ($subject) of type string is deprecated in /homepages/13/d380392445/htdocs/Jlive/administrator/components/com_easyblog/includes/adsense/adsense.php on line 138
MySQL versions and binlog_format settings - Macrotone Blogs
By Geoffrey Chapman on Wednesday, 07 December 2011
Category: Miscellaneous

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.

Leave Comments