Recommended fix for MySQL Checker Query Script for Tungsten Clustering

We have identified an issue in a script that is executed as part of the Tungsten Clustering solution. The script itself executes a small query against the internal tables used by the replicator in order to help identify the current status and latency of the replication process. We believe this script may occasionally fail under some very specific conditions, which would not normally be an issue, but the knock on effect is to create Out of Memory errors and instability in the way identifying the current replication state is handled.

The issue has been fixed in the upcoming 6.0.1 and 5.3.2 releases, but we have identified that customers on versions of the Tungsten Clustering solution from v4.0 upwards would benefit from using an updated version of the script.

If you are using Tungsten Clustering 4.x or higher, it is recommended that you apply this patch to improve the stability of your clustering installation.

The script can be updated in a number of different ways, including using a script we have written that will update the in place versions of the file. Due to the nature of the script and the installation process, we recommend that even if you manually update or use the update script to fix existing installations, you should also update the version in the package or staging directories so that updates and new installations do not wipe out the changes.

Note: Updating the live version of the file in an installed directory saves you having to reinstall or restart any of the clustering components. When the file has been updated, the manager will automatically reload and use the new version.

Updating installed directories using a script

The easiest way to apply the fix is to use our script, which simply finds all files named *mysql_checker_query.sql and swaps out just one line.
Since the standard location for staging extraction is /opt/continuent/software, we expect to be able to patch the files found in the staging directories along with those found in the installed directory.

To apply the patch to both the installed files and staging templates by using our update script:

  1. Download the script file we have written from
  2. Make the script executable:
    chmod +x
  3. Run the script, by default it searches for files in /opt/continuent, and you may also specify the directory. For example:


    ./ /opt/tungsten

The script will update both the installed files and any staging templates located under the target directory.

Updating via staging directory (requires tpm update)

To update a version of the software extracted from the distribution tarball:

  1. Download the mysql_checker_query.sql.tpl file.
  2. Change to the extracted software directory
  3. Copy the downloaded file into ./tungsten-manager/samples/conf/mysql_checker_query.sql.tpl
$ cp ~/mysql_checker_query.sql.tpl ./tungsten-manager/samples/conf/mysql_checker_query.sql.tpl

If you want to update your software now, bearing in mind that this will restart the managers and connectors, perform an update through tpm to update the distribution:

./tools/tpm update --replace-release

Updating an installed directory manually

To update the script by hand, you will need to update a version of the script for every service within your installation.

  1. Download the mysql_checker_query.sql.tpl file.
  2. Copy the file into a new file named mysql_checker_query.sql
  3. Edit the file and change each instance of the stringĀ @{MGR_REPL_SCHEMA} to the name of the tracking schema. For example, if you service is called 'east' then the tracking schema is 'tungsten_east'
  4. Copy the temporary file into the installed configuration directory. For example,

About the Author

MC Brown
Former VP of Products

MC Brown is a professional writer and technologist for over 25 years, an author and contributor to over 26 books covering a wide array of topics, and technical and architectural advisor on databases, cloud and grid computing, and operating system development. During his time he has worked for and with Sun, MySQL, Oracle, Couchbase, VMware, Microsoft and IBM, and written for O'Reilly, IBM, Computerworld, IBM developerWorks and many others.

Add new comment