Author: jstephens
Date: 2006-03-02 07:01:16 +0100 (Thu, 02 Mar 2006)
New Revision: 1481
Log:
Bug #17805: cluster_replication DB renamed simply to "cluster".
Modified:
trunk/refman-5.1/ndbcluster.xml
trunk/refman-common/news-5.1.xml
Modified: trunk/refman-5.1/ndbcluster.xml
===================================================================
--- trunk/refman-5.1/ndbcluster.xml 2006-03-02 05:45:18 UTC (rev 1480)
+++ trunk/refman-5.1/ndbcluster.xml 2006-03-02 06:01:16 UTC (rev 1481)
@@ -8577,13 +8577,12 @@
<para>
Replication in MySQL Cluster makes use of a number of dedicated
- tables in a separate <literal>cluster_replication</literal>
- database on each MySQL Server instance acting as an SQL node in
- both the cluster being replicated and the replication slave
- (whether the slave is a single server or a cluster). This
- database, which is created during the MySQL installation process
- by the <command>mysql_install_db</command> script, contains a
- table for storing the binary log's indexing data. As the
+ tables in a separate <literal>cluster</literal> database on each MySQL
+ Server instance acting as an SQL node in both the cluster being
+ replicated and the replication slave (whether the slave is a single
+ server or a cluster). This database, which is created during the MySQL
+ installation process by the <command>mysql_install_db</command> script,
+ contains a table for storing the binary log's indexing data. As the
<literal>binlog_index</literal> table is local to each MySQL
server and does not participate in clustering, it uses the
<literal>MyISAM</literal> storage engine, and so must be created
@@ -8603,11 +8602,17 @@
PRIMARY KEY (`epoch`)
) ENGINE=MYISAM DEFAULT CHARSET=latin1;
</programlisting>
+
+ <para>
+ <emphasis role="bold">Important</emphasis>: Prior to MySQL 5.1.8, the
+ <literal>cluster</literal> database was known as the
+ <literal>cluster_replication</literal> database.
+ </para>
<para>
The following figure shows the relationship of the MySQL Cluster
replication master server, its binlog injector thread, and the
- <literal>cluster_replication.binlog_index</literal> table.
+ <literal>cluster.binlog_index</literal> table.
</para>
<mediaobject>
@@ -8663,10 +8668,10 @@
integrity of these tables as an initial step in preparing a
MySQL Cluster for replication. It is possible to view event data
recorded in the binary log by querying the
- <literal>cluster_replication.binlog_index</literal> table
- directly on the master. This can be also be accomplished using
- the <literal>SHOW BINLOG EVENTS</literal> statement on either
- the replication master or slave MySQL servers.
+ <literal>cluster.binlog_index</literal> table directly on the master.
+ This can be also be accomplished using the <literal>SHOW BINLOG
+ EVENTS</literal> statement on either the replication master or slave
+ MySQL servers.
</para>
</section>
@@ -9150,7 +9155,7 @@
<programlisting>
mysql<replaceable>S'</replaceable>> <userinput>SELECT @latest:=MAX(epoch)</userinput>
- -> <userinput>FROM cluster_replication.apply_status;</userinput>
+ -> <userinput>FROM cluster.apply_status;</userinput>
</programlisting>
</listitem>
@@ -9166,7 +9171,7 @@
mysqlM'> <userinput>SELECT</userinput>
-> <userinput>@file:=SUBSTRING_INDEX(File, '/', -1),</userinput>
-> <userinput>@pos:=Position</userinput>
- -> <userinput>FROM cluster_replication.binlog_index</userinput>
+ -> <userinput>FROM cluster.binlog_index</userinput>
-> <userinput>WHERE epoch > @latest</userinput>
-> <userinput>ORDER BY epoch ASC LIMIT 1;</userinput>
</programlisting>
@@ -9407,7 +9412,7 @@
</para>
<programlisting>
-mysql<replaceable>S</replaceable>> <userinput>DELETE FROM cluster_replication.apply_status;</userinput>
+mysql<replaceable>S</replaceable>> <userinput>DELETE FROM cluster.apply_status;</userinput>
</programlisting>
</listitem>
@@ -9498,7 +9503,7 @@
<programlisting>
mysql<replaceable>S</replaceable>> <userinput>SELECT @latest:=MAX(epoch)</userinput>
- <userinput>FROM cluster_replication.apply_status;</userinput>
+ <userinput>FROM cluster.apply_status;</userinput>
</programlisting>
</listitem>
@@ -9508,15 +9513,15 @@
in the previous step, you can obtain the correct starting
position <literal>@pos</literal> in the correct binary
logfile <literal>@file</literal> from the master's
- <literal>cluster_replication.binlog_index table</literal>
- using the query shown here:
+ <literal>cluster.binlog_index</literal> table using the query shown
+ here:
</para>
<programlisting>
mysql<replaceable>M</replaceable>> <userinput>SELECT</userinput>
-> <userinput>@file:=SUBSTRING_INDEX(File, '/', -1),</userinput>
-> <userinput>@pos:=Position</userinput>
- -> <userinput>FROM cluster_replication.binlog_index</userinput>
+ -> <userinput>FROM cluster.binlog_index</userinput>
-> <userinput>WHERE epoch > @latest</userinput>
-> <userinput>ORDER BY epoch ASC LIMIT 1;</userinput>
</programlisting>
@@ -9672,7 +9677,7 @@
### Connect to master
$dbhM
= DBI->connect(
- "dbi:mysql:database=cluster_replication;host=$m_host;port=$m_port",
+ "dbi:mysql:database=cluster;host=$m_host;port=$m_port",
"$m_user", "$m_pass")
or die "Can't connect to Master Cluster MySQL process!
Error: $DBI::errstr\n";
@@ -9680,7 +9685,7 @@
### Connect to slave
$dbhS
= DBI->connect(
- "dbi:mysql:database=cluster_replication;host=$s_host",
+ "dbi:mysql:database=cluster;host=$s_host",
"$s_user", "$s_pass")
or die "Can't connect to Slave Cluster MySQL process!
Error: $DBI::errstr\n";
@@ -9706,7 +9711,7 @@
sub GetSlaveEpoch
{
$sth = $dbhS->prepare("SELECT MAX(epoch)
- FROM cluster_replication.apply_status;")
+ FROM cluster.apply_status;")
or die "Error while preparing to select epoch from slave: ",
$dbhS->errstr;
@@ -9725,7 +9730,7 @@
{
$sth = $dbhM->prepare("SELECT
SUBSTRING_INDEX(File, '/', -1), Position
- FROM cluster_replication.binlog_index
+ FROM cluster.binlog_index
WHERE epoch > $epoch
ORDER BY epoch ASC LIMIT 1;")
or die "Prepare to select from master error: ", $dbhM->errstr;
Modified: trunk/refman-common/news-5.1.xml
===================================================================
--- trunk/refman-common/news-5.1.xml 2006-03-02 05:45:18 UTC (rev 1480)
+++ trunk/refman-common/news-5.1.xml 2006-03-02 06:01:16 UTC (rev 1481)
@@ -85,6 +85,17 @@
</para>
<itemizedlist>
+
+ <listitem>
+ <para>
+ The <literal>cluster_replication</literal> database has been renamed
+ to <literal>cluster</literal>. This will effect replication between
+ MySQL Clusters where one cluster is running MySQL 5.1.8 or later, and
+ the other is running MySQL 5.1.7 or earlier. See
+ <xref linkend="mysql-cluster-replication"/>, and especially
+ <xref linkend="mysql-cluster-replication-schema"/>.
+ </para>
+ </listitem>
<listitem>
<para>
| Thread |
|---|
| • svn commit - mysqldoc@docsrva: r1481 - in trunk: refman-5.1 refman-common | jon | 2 Mar |