Replication of Server-Side Help Tables

The server maintains tables in the mysql database that store information for the HELP statement (see Section 13.8.3, “HELP Syntax”. These tables can be loaded manually as described at Section 5.1.9, “Server-Side Help”.

Help table content is derived from the MySQL Reference Manual. There are versions of the manual specific to each MySQL release series, so help content is specific to each series as well. Normally, you load a version of help content that matches the server version. This has implications for replication. For example, you would load MySQL 5.5 help content into a MySQL 5.5 master server, but not necessarily replicate that content to a MySQL 5.6 slave server for which 5.6 help content is more appropriate.

This section describes how to manage help table content upgrades when your servers participate in replication. Server versions are one factor in this task. Another is that help table structure may differ between the master and the slave.

Assume that help content is stored in a file named fill_help_tables.sql. In MySQL distributions, this file is located under the share or share/mysql directory, and the most recent version is always available for download from http://dev.mysql.com/doc/index-other.html.

To upgrade help tables, using the following procedure. Connection parameters are not shown for the mysql commands discussed here; in all cases, connect to the server using an account such as root that has privileges for modifying tables in the mysql database.

  1. Upgrade your servers by running mysql_upgrade, first on the slaves and then on the master. This is the usual principle of upgrading slaves first.

  2. Decide whether you want to replicate help table content from the master to its slaves. If not, load the content on the master and each slave individually. Otherwise, check for and resolve any incompatibilities between help table structure on the master and its slaves, then load the content into the master and let it replicate to the slaves.

    More detail about these two methods of loading help table content follows.

Loading Help Table Content Without Replication to Slaves

To load help table content without replication, run this command on the master and each slave individually, using a fill_help_tables.sql file containing content appropriate to the server version (enter the command on one line):

mysql --init-command="SET sql_log_bin=0"
  mysql < fill_help_tables.sql

Use the --init-command option on each server, including the slaves, in case a slave also acts as a master to other slaves in your replication topology. The SET statement suppresses binary logging. After the command has been run on each server to be upgraded, you are done.

Loading Help Table Content With Replication to Slaves

If you do want to replicate help table content, check for help table incompatibilities between your master and its slaves. The url column in the help_category and help_topic tables was originally CHAR(128), but is TEXT in newer MySQL versions to accommodate longer URLs. To check help table structure, use this statement:


For tables with the old structure, the statement produces this result:

| help_category | url         | char(128)   |
| help_topic    | url         | char(128)   |

For tables with the new structure, the statement produces this result:

| help_category | url         | text        |
| help_topic    | url         | text        |

If the master and slave both have the old structure or both have the new structure, they are compatible and you can replicate help table content by executing this command on the master:

mysql mysql < fill_help_tables.sql

The table content will load into the master, then replicate to the slaves.

If the master and slave have incompatible help tables (one server has the old structure and the other has the new), you have a choice between not replicating help table content after all, or making the table structures compatible so that you can replicate the content.