Browse Source
MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)
MDEV-34 delete storage/ndb and sql/*ndb* (and collateral changes)
remove: * NDB from everywhere * IM from mtr-v1 * packaging/rpm-oel and packaging/rpm-uln * few unused spec files * plug.in file * .bzrignorepull/69/head
1663 changed files with 138 additions and 530970 deletions
-
1462.bzrignore
-
1.gitignore
-
3BUILD/SETUP.sh
-
1876BUILD/build_mccge.sh
-
2BUILD/compile-amd64-debug-max-no-ndb
-
2BUILD/compile-amd64-gprof-no-ndb
-
23BUILD/compile-amd64-max-sci
-
2BUILD/compile-bintar
-
2BUILD/compile-dist
-
24BUILD/compile-ndb-autotest
-
2BUILD/compile-pentium-debug-max-no-ndb
-
2BUILD/compile-pentium-valgrind-max-no-ndb
-
25BUILD/compile-pentium64-max-sci
-
2BUILD/compile-ppc-debug-max-no-ndb
-
6CMakeLists.txt
-
2client/mysql.cc
-
142client/mysqltest.cc
-
9cmake/make_dist.cmake.in
-
8cmake/mysql_version.cmake
-
7cmake/package_name.cmake
-
4config.h.cmake
-
3debian/README.Maintainer
-
2debian/mariadb-server-10.1.mysql.init
-
12debian/mariadb-server-10.1.preinst
-
6debian/mariadb-server-10.1.templates
-
13debian/mariadb-test-10.1.dirs
-
1debian/patches/00list
-
18debian/patches/02_no_builtin_ndbcluster_plugin.dpatch
-
15debian/po/ar.po
-
15debian/po/ca.po
-
15debian/po/cs.po
-
15debian/po/da.po
-
18debian/po/de.po
-
15debian/po/es.po
-
23debian/po/eu.po
-
18debian/po/fr.po
-
15debian/po/gl.po
-
17debian/po/it.po
-
17debian/po/ja.po
-
15debian/po/nb.po
-
15debian/po/nl.po
-
15debian/po/pt.po
-
15debian/po/pt_BR.po
-
15debian/po/ro.po
-
17debian/po/ru.po
-
18debian/po/sv.po
-
15debian/po/templates.pot
-
15debian/po/tr.po
-
10extra/CMakeLists.txt
-
58extra/perror.c
-
2include/my_base.h
-
3include/my_global.h
-
3include/mysqld_default_groups.h
-
69man/mysql-test-run.pl.1
-
8man/mysqldump.1
-
819man/ndbd.8
-
176man/ndbd_redo_log_reader.1
-
388man/ndbmtd.8
-
31man/perror.1
-
10mysql-test/CMakeLists.txt
-
2mysql-test/collections/default.experimental
-
3mysql-test/collections/mysql-trunk.daily
-
1mysql-test/extra/rpl_tests/rpl_auto_increment.test
-
5mysql-test/extra/rpl_tests/rpl_ddl.test
-
5mysql-test/extra/rpl_tests/rpl_extra_col_slave.test
-
4mysql-test/extra/rpl_tests/rpl_foreign_key.test
-
284mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test
-
2mysql-test/extra/rpl_tests/rpl_innodb.test
-
4mysql-test/extra/rpl_tests/rpl_loadfile.test
-
7mysql-test/extra/rpl_tests/rpl_mixing_engines.test
-
119mysql-test/extra/rpl_tests/rpl_ndb_2multi_basic.test
-
347mysql-test/extra/rpl_tests/rpl_ndb_2multi_eng.test
-
307mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test
-
4mysql-test/extra/rpl_tests/rpl_partition.test
-
8mysql-test/extra/rpl_tests/rpl_row_blob.test
-
3mysql-test/extra/rpl_tests/rpl_row_func003.test
-
2mysql-test/extra/rpl_tests/rpl_row_sp003.test
-
2mysql-test/extra/rpl_tests/rpl_sv_relay_space.test
-
6mysql-test/extra/rpl_tests/rpl_trig004.test
-
36mysql-test/include/ctype_utf8mb4.inc
-
27mysql-test/include/default_ndbd.cnf
-
52mysql-test/include/have_multi_ndb.inc
-
2mysql-test/include/have_ndb.inc
-
2mysql-test/include/have_ndb_extra.inc
-
4mysql-test/include/have_ndbapi_examples.inc
-
3mysql-test/include/loaddata_autocom.inc
-
4mysql-test/include/mtr_check.sql
-
4mysql-test/include/mtr_warnings.sql
-
48mysql-test/include/ndb_backup.inc
-
9mysql-test/include/ndb_backup_print.inc
-
4mysql-test/include/ndb_default_cluster.inc
-
12mysql-test/include/ndb_master-slave.inc
-
67mysql-test/include/ndb_master-slave_2ch.inc
-
36mysql-test/include/ndb_not_readonly.inc
-
8mysql-test/include/ndb_restore_master.inc
-
11mysql-test/include/ndb_restore_slave_eoption.inc
-
27mysql-test/include/ndb_setup_slave.inc
-
26mysql-test/include/ndb_wait_connected.inc
-
7mysql-test/include/not_ndb.inc
-
4mysql-test/include/not_ndb_default.inc
1462
.bzrignore
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
1876
BUILD/build_mccge.sh
File diff suppressed because it is too large
View File
File diff suppressed because it is too large
View File
@ -1,23 +0,0 @@ |
|||
#! /bin/sh |
|||
|
|||
# Copyright (C) 2007 MySQL AB |
|||
# Use is subject to license terms |
|||
# This program is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; version 2 of the License. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with this program; if not, write to the Free Software |
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
|
|||
path=`dirname $0` |
|||
. "$path/SETUP.sh" |
|||
extra_flags="$amd64_cflags $fast_cflags -g" |
|||
extra_configs="$amd64_configs $max_configs --with-ndb-sci=/opt/DIS" |
|||
|
|||
. "$path/FINISH.sh" |
@ -1,24 +0,0 @@ |
|||
#! /bin/sh |
|||
|
|||
# Copyright (c) 2006, 2010, Oracle and/or its affiliates. All rights reserved. |
|||
# |
|||
# This program is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; version 2 of the License. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with this program; if not, write to the Free Software |
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
|
|||
path=`dirname $0` |
|||
. "$path/SETUP.sh" |
|||
|
|||
extra_configs="$max_configs --with-ndb-test --with-ndb-ccflags='-DERROR_INSERT'" |
|||
extra_flags="$fast_cflags $max_cflags -g" |
|||
|
|||
. "$path/FINISH.sh" |
@ -1,25 +0,0 @@ |
|||
#! /bin/sh |
|||
|
|||
# Copyright (C) 2007 MySQL AB |
|||
# Use is subject to license terms |
|||
# |
|||
# This program is free software; you can redistribute it and/or modify |
|||
# it under the terms of the GNU General Public License as published by |
|||
# the Free Software Foundation; version 2 of the License. |
|||
# |
|||
# This program is distributed in the hope that it will be useful, |
|||
# but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
# GNU General Public License for more details. |
|||
# |
|||
# You should have received a copy of the GNU General Public License |
|||
# along with this program; if not, write to the Free Software |
|||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA |
|||
|
|||
path=`dirname $0` |
|||
. "$path/SETUP.sh" |
|||
|
|||
extra_flags="$pentium64_cflags $fast_cflags -g" |
|||
extra_configs="$pentium_configs $max_configs --with-ndb-sci=/opt/DIS" |
|||
|
|||
. "$path/FINISH.sh" |
@ -1,18 +0,0 @@ |
|||
#! /bin/sh /usr/share/dpatch/dpatch-run |
|||
## 02_no_builtin_ndbcluster_plugin.dpatch by <ch@debian.org> |
|||
## |
|||
## All lines beginning with `## DP:' are a description of the patch. |
|||
## DP: As we completely disabled ndbcluster |
|||
|
|||
@DPATCH@ |
|||
|
|||
--- old/sql/sql_builtin.cc |
|||
+++ new/sql/sql_builtin.cc |
|||
@@ -22,6 +22,6 @@ |
|||
|
|||
struct st_mysql_plugin *mysqld_builtins[]= |
|||
{ |
|||
- builtin_binlog_plugin, builtin_partition_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin, builtin_ndbcluster_plugin,(struct st_mysql_plugin *)0 |
|||
+ builtin_binlog_plugin, builtin_partition_plugin, builtin_csv_plugin, builtin_heap_plugin, builtin_myisam_plugin, builtin_myisammrg_plugin, (struct st_mysql_plugin *)0 |
|||
}; |
|||
|
@ -1,819 +0,0 @@ |
|||
'\" t |
|||
.\" Title: \fBndbd\fR |
|||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] |
|||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> |
|||
.\" Date: 04/06/2010 |
|||
.\" Manual: MySQL Database System |
|||
.\" Source: MySQL 5.1 |
|||
.\" Language: English |
|||
.\" |
|||
.TH "\FBNDBD\FR" "8" "04/06/2010" "MySQL 5\&.1" "MySQL Database System" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ndbd |
|||
.\" MySQL Cluster: ndbd |
|||
.\" MySQL Cluster: data nodes |
|||
.\" data nodes (MySQL Cluster) |
|||
.\" storage nodes - see data nodes, ndbd |
|||
.SH "NAME" |
|||
ndbd \- the MySQL Cluster data node daemon |
|||
.SH "SYNOPSIS" |
|||
.HP \w'\fBndbd\ \fR\fB\fIoptions\fR\fR\ 'u |
|||
\fBndbd \fR\fB\fIoptions\fR\fR |
|||
.SH "DESCRIPTION" |
|||
.PP |
|||
\fBndbd\fR |
|||
is the process that is used to handle all the data in tables using the NDB Cluster storage engine\&. This is the process that empowers a data node to accomplish distributed transaction handling, node recovery, checkpointing to disk, online backup, and related tasks\&. |
|||
.PP |
|||
In a MySQL Cluster, a set of |
|||
\fBndbd\fR |
|||
processes cooperate in handling data\&. These processes can execute on the same computer (host) or on different computers\&. The correspondences between data nodes and Cluster hosts is completely configurable\&. |
|||
.\" MySQL Cluster: administration |
|||
.\" MySQL Cluster: commands |
|||
.\" command options (MySQL Cluster): ndbd |
|||
.\" MySQL Cluster: ndbd process |
|||
.PP |
|||
The following table includes command options specific to the MySQL Cluster data node program |
|||
\fBndbd\fR\&. Additional descriptions follow the table\&. For options common to all MySQL Cluster programs, see |
|||
Section\ \&17.4.2, \(lqOptions Common to MySQL Cluster Programs\(rq\&. |
|||
.if n \{\ |
|||
.sp |
|||
.\} |
|||
.RS 4 |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.br |
|||
.ps +1 |
|||
\fBNote\fR |
|||
.ps -1 |
|||
.br |
|||
.PP |
|||
All of these options also apply to the multi\-threaded version of this program \(em |
|||
\fBndbmtd\fR, which is available in MySQL Cluster NDB 7\&.0 \(em and you may substitute |
|||
\(lq\fBndbmtd\fR\(rq |
|||
for |
|||
\(lq\fBndbd\fR\(rq |
|||
wherever the latter occurs in this section\&. |
|||
.sp .5v |
|||
.RE |
|||
.PP |
|||
For options common to all |
|||
NDBCLUSTER |
|||
programs, see |
|||
Section\ \&17.4.2, \(lqOptions Common to MySQL Cluster Programs\(rq\&. |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
\fB\-\-bind\-address\fR |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBVersion Introduced\fR |
|||
T}:T{ |
|||
5\&.1\&.12 |
|||
T} |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-\-bind\-address=name |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
string |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
Causes |
|||
\fBndbd\fR |
|||
to bind to a specific network interface (host name or IP address)\&. This option has no default value\&. |
|||
.sp |
|||
This option was added in MySQL 5\&.1\&.12\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
\fB\-\-daemon\fR, |
|||
\fB\-d\fR |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-\-daemon |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
boolean |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
TRUE |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
Instructs |
|||
\fBndbd\fR |
|||
to execute as a daemon process\&. This is the default behavior\&. |
|||
\fB\-\-nodaemon\fR |
|||
can be used to prevent the process from running as a daemon\&. |
|||
.sp |
|||
This option has no effect when running |
|||
\fBndbd\fR |
|||
or |
|||
\fBndbmtd\fR |
|||
on Windows platforms\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.\" --initial option (ndbd) |
|||
.\" --initial option (ndbmtd) |
|||
\fB\-\-initial\fR |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-\-initial |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
boolean |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
FALSE |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
Instructs |
|||
\fBndbd\fR |
|||
to perform an initial start\&. An initial start erases any files created for recovery purposes by earlier instances of |
|||
\fBndbd\fR\&. It also re\-creates recovery log files\&. Note that on some operating systems this process can take a substantial amount of time\&. |
|||
.sp |
|||
An |
|||
\fB\-\-initial\fR |
|||
start is to be used |
|||
\fIonly\fR |
|||
when starting the |
|||
\fBndbd\fR |
|||
process under very special circumstances; this is because this option causes all files to be removed from the Cluster file system and all redo log files to be re\-created\&. These circumstances are listed here: |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
When performing a software upgrade which has changed the contents of any files\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
When restarting the node with a new version of |
|||
\fBndbd\fR\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
As a measure of last resort when for some reason the node restart or system restart repeatedly fails\&. In this case, be aware that this node can no longer be used to restore data due to the destruction of the data files\&. |
|||
.RE |
|||
.RS 4 |
|||
Use of this option prevents the |
|||
StartPartialTimeout |
|||
and |
|||
StartPartitionedTimeout |
|||
configuration parameters from having any effect\&. |
|||
.if n \{\ |
|||
.sp |
|||
.\} |
|||
.RS 4 |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.br |
|||
.ps +1 |
|||
\fBImportant\fR |
|||
.ps -1 |
|||
.br |
|||
This option does |
|||
\fInot\fR |
|||
affect either of the following: |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
Backup files that have already been created by the affected node |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
MySQL Cluster Disk Data files (see |
|||
Section\ \&17.5.10, \(lqMySQL Cluster Disk Data Tables\(rq)\&. |
|||
.RE |
|||
.RS 4 |
|||
.sp |
|||
This option also has no effect on recovery of data by a data node that is just starting (or restarting) from data nodes that are already running\&. This recovery of data occurs automatically, and requires no user intervention in a MySQL Cluster that is running normally\&. |
|||
.sp .5v |
|||
.RE |
|||
It is permissible to use this option when starting the cluster for the very first time (that is, before any data node files have been created); however, it is |
|||
\fInot\fR |
|||
necessary to do so\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.\" --initial-start option (ndbd) |
|||
.\" --initial-start option (ndbmtd) |
|||
\fB\-\-initial\-start\fR |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBVersion Introduced\fR |
|||
T}:T{ |
|||
5\&.1\&.11 |
|||
T} |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-\-initial\-start |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
boolean |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
FALSE |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
This option is used when performing a partial initial start of the cluster\&. Each node should be started with this option, as well as |
|||
\fB\-\-nowait\-nodes\fR\&. |
|||
.sp |
|||
Suppose that you have a 4\-node cluster whose data nodes have the IDs 2, 3, 4, and 5, and you wish to perform a partial initial start using only nodes 2, 4, and 5 \(em that is, omitting node 3: |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.nf |
|||
shell> \fBndbd \-\-ndb\-nodeid=2 \-\-nowait\-nodes=3 \-\-initial\-start\fR |
|||
shell> \fBndbd \-\-ndb\-nodeid=4 \-\-nowait\-nodes=3 \-\-initial\-start\fR |
|||
shell> \fBndbd \-\-ndb\-nodeid=5 \-\-nowait\-nodes=3 \-\-initial\-start\fR |
|||
.fi |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.sp |
|||
Prior to MySQL 5\&.1\&.19, it was not possible to perform DDL operations involving Disk Data tables on a partially started cluster\&. (See |
|||
\m[blue]\fBBug#24631\fR\m[]\&\s-2\u[1]\d\s+2\&.) |
|||
.sp |
|||
When using this option, you must also specify the node ID for the data node being started with the |
|||
\fB\-\-ndb\-nodeid\fR |
|||
option\&. |
|||
.sp |
|||
This option was added in MySQL 5\&.1\&.11\&. |
|||
.if n \{\ |
|||
.sp |
|||
.\} |
|||
.RS 4 |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.br |
|||
.ps +1 |
|||
\fBImportant\fR |
|||
.ps -1 |
|||
.br |
|||
Do not confuse this option with the |
|||
\fB\-\-nowait\-nodes\fR |
|||
option added for |
|||
\fBndb_mgmd\fR |
|||
in MySQL Cluster NDB 7\&.0\&.10, which can be used to allow a cluster configured with multiple management servers to be started without all management servers being online\&. |
|||
.sp .5v |
|||
.RE |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.\" --nowait-nodes option (ndbd) |
|||
.\" --nowait-nodes option (ndbmtd) |
|||
\fB\-\-nowait\-nodes=\fR\fB\fInode_id_1\fR\fR\fB[, \fR\fB\fInode_id_2\fR\fR\fB[, \&.\&.\&.]]\fR |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBVersion Introduced\fR |
|||
T}:T{ |
|||
5\&.1\&.9 |
|||
T} |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-\-nowait\-nodes=list |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
string |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
This option takes a list of data nodes which for which the cluster will not wait for before starting\&. |
|||
.sp |
|||
This can be used to start the cluster in a partitioned state\&. For example, to start the cluster with only half of the data nodes (nodes 2, 3, 4, and 5) running in a 4\-node cluster, you can start each |
|||
\fBndbd\fR |
|||
process with |
|||
\fB\-\-nowait\-nodes=3,5\fR\&. In this case, the cluster starts as soon as nodes 2 and 4 connect, and does |
|||
\fInot\fR |
|||
wait |
|||
StartPartitionedTimeout |
|||
milliseconds for nodes 3 and 5 to connect as it would otherwise\&. |
|||
.sp |
|||
If you wanted to start up the same cluster as in the previous example without one |
|||
\fBndbd\fR |
|||
\(em say, for example, that the host machine for node 3 has suffered a hardware failure \(em then start nodes 2, 4, and 5 with |
|||
\fB\-\-nowait\-nodes=3\fR\&. Then the cluster will start as soon as nodes 2, 4, and 5 connect and will not wait for node 3 to start\&. |
|||
.sp |
|||
This option was added in MySQL 5\&.1\&.9\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.\" --nodaemon option (ndbd) |
|||
.\" --nodaemon option (ndbmtd) |
|||
\fB\-\-nodaemon\fR |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-\-nodaemon |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
boolean |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
FALSE |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR (windows) |
|||
T}:T{ |
|||
boolean |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
TRUE |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
Instructs |
|||
\fBndbd\fR |
|||
not to start as a daemon process\&. This is useful when |
|||
\fBndbd\fR |
|||
is being debugged and you want output to be redirected to the screen\&. |
|||
.sp |
|||
As of MySQL Cluster NDB 7\&.0\&.8, the default behavior for |
|||
\fBndbd\fR |
|||
and |
|||
\fBndbmtd\fR |
|||
on Windows is to run in the foreground, making this option unnecessary on Windows platforms\&. (\m[blue]\fBBug#45588\fR\m[]\&\s-2\u[2]\d\s+2) |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.\" --nostart option (ndbd) |
|||
.\" -n option (ndbd) |
|||
.\" --nostart option (ndbmtd) |
|||
.\" -n option (ndbmtd) |
|||
\fB\-\-nostart\fR, |
|||
\fB\-n\fR |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-\-nostart |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
boolean |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
FALSE |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
Instructs |
|||
\fBndbd\fR |
|||
not to start automatically\&. When this option is used, |
|||
\fBndbd\fR |
|||
connects to the management server, obtains configuration data from it, and initializes communication objects\&. However, it does not actually start the execution engine until specifically requested to do so by the management server\&. This can be accomplished by issuing the proper |
|||
START |
|||
command in the management client (see |
|||
Section\ \&17.5.2, \(lqCommands in the MySQL Cluster Management Client\(rq)\&. |
|||
.RE |
|||
.\" MySQL Cluster: log files |
|||
.\" log files (MySQL Cluster) |
|||
.PP |
|||
\fBndbd\fR |
|||
generates a set of log files which are placed in the directory specified by |
|||
DataDir |
|||
in the |
|||
config\&.ini |
|||
configuration file\&. |
|||
.PP |
|||
These log files are listed below\&. |
|||
\fInode_id\fR |
|||
is the node\'s unique identifier\&. Note that |
|||
\fInode_id\fR |
|||
represents the node\'s unique identifier\&. For example, |
|||
ndb_2_error\&.log |
|||
is the error log generated by the data node whose node ID is |
|||
2\&. |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.\" MySQL Cluster: error logs |
|||
.\" error logs (MySQL Cluster) |
|||
ndb_\fInode_id\fR_error\&.log |
|||
is a file containing records of all crashes which the referenced |
|||
\fBndbd\fR |
|||
process has encountered\&. Each record in this file contains a brief error string and a reference to a trace file for this crash\&. A typical entry in this file might appear as shown here: |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.nf |
|||
Date/Time: Saturday 30 July 2004 \- 00:20:01 |
|||
Type of error: error |
|||
Message: Internal program error (failed ndbrequire) |
|||
Fault ID: 2341 |
|||
Problem data: DbtupFixAlloc\&.cpp |
|||
Object of reference: DBTUP (Line: 173) |
|||
ProgramName: NDB Kernel |
|||
ProcessID: 14909 |
|||
TraceFile: ndb_2_trace\&.log\&.2 |
|||
***EOM*** |
|||
.fi |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.sp |
|||
Listings of possible |
|||
\fBndbd\fR |
|||
exit codes and messages generated when a data node process shuts down prematurely can be found in |
|||
\m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[3]\d\s+2\&. |
|||
.if n \{\ |
|||
.sp |
|||
.\} |
|||
.RS 4 |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.br |
|||
.ps +1 |
|||
\fBImportant\fR |
|||
.ps -1 |
|||
.br |
|||
\fIThe last entry in the error log file is not necessarily the newest one\fR |
|||
(nor is it likely to be)\&. Entries in the error log are |
|||
\fInot\fR |
|||
listed in chronological order; rather, they correspond to the order of the trace files as determined in the |
|||
ndb_\fInode_id\fR_trace\&.log\&.next |
|||
file (see below)\&. Error log entries are thus overwritten in a cyclical and not sequential fashion\&. |
|||
.sp .5v |
|||
.RE |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.\" MySQL Cluster: trace files |
|||
.\" trace files (MySQL Cluster) |
|||
ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR |
|||
is a trace file describing exactly what happened just before the error occurred\&. This information is useful for analysis by the MySQL Cluster development team\&. |
|||
.sp |
|||
It is possible to configure the number of these trace files that will be created before old files are overwritten\&. |
|||
\fItrace_id\fR |
|||
is a number which is incremented for each successive trace file\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
ndb_\fInode_id\fR_trace\&.log\&.next |
|||
is the file that keeps track of the next trace file number to be assigned\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
ndb_\fInode_id\fR_out\&.log |
|||
is a file containing any data output by the |
|||
\fBndbd\fR |
|||
process\&. This file is created only if |
|||
\fBndbd\fR |
|||
is started as a daemon, which is the default behavior\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
ndb_\fInode_id\fR\&.pid |
|||
is a file containing the process ID of the |
|||
\fBndbd\fR |
|||
process when started as a daemon\&. It also functions as a lock file to avoid the starting of nodes with the same identifier\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
ndb_\fInode_id\fR_signal\&.log |
|||
is a file used only in debug versions of |
|||
\fBndbd\fR, where it is possible to trace all incoming, outgoing, and internal messages with their data in the |
|||
\fBndbd\fR |
|||
process\&. |
|||
.RE |
|||
.PP |
|||
It is recommended not to use a directory mounted through NFS because in some environments this can cause problems whereby the lock on the |
|||
\&.pid |
|||
file remains in effect even after the process has terminated\&. |
|||
.PP |
|||
To start |
|||
\fBndbd\fR, it may also be necessary to specify the host name of the management server and the port on which it is listening\&. Optionally, one may also specify the node ID that the process is to use\&. |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.nf |
|||
shell> \fBndbd \-\-connect\-string="nodeid=2;host=ndb_mgmd\&.mysql\&.com:1186"\fR |
|||
.fi |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.PP |
|||
See |
|||
Section\ \&17.3.2.3, \(lqThe MySQL Cluster Connectstring\(rq, for additional information about this issue\&. |
|||
\fBndbd\fR(8), describes other options for |
|||
\fBndbd\fR\&. |
|||
.PP |
|||
When |
|||
\fBndbd\fR |
|||
starts, it actually initiates two processes\&. The first of these is called the |
|||
\(lqangel process\(rq; its only job is to discover when the execution process has been completed, and then to restart the |
|||
\fBndbd\fR |
|||
process if it is configured to do so\&. Thus, if you attempt to kill |
|||
\fBndbd\fR |
|||
via the Unix |
|||
\fBkill\fR |
|||
command, it is necessary to kill both processes, beginning with the angel process\&. The preferred method of terminating an |
|||
\fBndbd\fR |
|||
process is to use the management client and stop the process from there\&. |
|||
.PP |
|||
The execution process uses one thread for reading, writing, and scanning data, as well as all other activities\&. This thread is implemented asynchronously so that it can easily handle thousands of concurrent actions\&. In addition, a watch\-dog thread supervises the execution thread to make sure that it does not hang in an endless loop\&. A pool of threads handles file I/O, with each thread able to handle one open file\&. Threads can also be used for transporter connections by the transporters in the |
|||
\fBndbd\fR |
|||
process\&. In a multi\-processor system performing a large number of operations (including updates), the |
|||
\fBndbd\fR |
|||
process can consume up to 2 CPUs if permitted to do so\&. |
|||
.PP |
|||
For a machine with many CPUs it is possible to use several |
|||
\fBndbd\fR |
|||
processes which belong to different node groups; however, such a configuration is still considered experimental and is not supported for MySQL 5\&.1 in a production setting\&. See |
|||
Section\ \&17.1.5, \(lqKnown Limitations of MySQL Cluster\(rq\&. |
|||
.SH "COPYRIGHT" |
|||
.br |
|||
.PP |
|||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. |
|||
.PP |
|||
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. |
|||
.PP |
|||
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|||
.PP |
|||
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. |
|||
.sp |
|||
.SH "NOTES" |
|||
.IP " 1." 4 |
|||
Bug#24631 |
|||
.RS 4 |
|||
\%http://bugs.mysql.com/bug.php?id=24631 |
|||
.RE |
|||
.IP " 2." 4 |
|||
Bug#45588 |
|||
.RS 4 |
|||
\%http://bugs.mysql.com/bug.php?id=45588 |
|||
.RE |
|||
.IP " 3." 4 |
|||
ndbd Error Messages |
|||
.RS 4 |
|||
\%http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html |
|||
.RE |
|||
.SH "SEE ALSO" |
|||
For more information, please refer to the MySQL Reference Manual, |
|||
which may already be installed locally and which is also available |
|||
online at http://dev.mysql.com/doc/. |
|||
.SH AUTHOR |
|||
Sun Microsystems, Inc. (http://www.mysql.com/). |
@ -1,176 +0,0 @@ |
|||
'\" t |
|||
.\" Title: \fBndbd_redo_log_reader\fR |
|||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] |
|||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> |
|||
.\" Date: 04/06/2010 |
|||
.\" Manual: MySQL Database System |
|||
.\" Source: MySQL 5.1 |
|||
.\" Language: English |
|||
.\" |
|||
.TH "\FBNDBD_REDO_LOG_REA" "1" "04/06/2010" "MySQL 5\&.1" "MySQL Database System" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ndbd_redo_log_reader |
|||
.SH "NAME" |
|||
ndbd_redo_log_reader \- check and print content of cluster redo log |
|||
.SH "SYNOPSIS" |
|||
.HP \w'\fBndbd_redo_log_reader\ \fR\fB\fIfile_name\fR\fR\fB\ [\fR\fB\fIoptions\fR\fR\fB]\fR\ 'u |
|||
\fBndbd_redo_log_reader \fR\fB\fIfile_name\fR\fR\fB [\fR\fB\fIoptions\fR\fR\fB]\fR |
|||
.SH "DESCRIPTION" |
|||
.PP |
|||
Reads a redo log file, checking it for errors, printing its contents in a human\-readable format, or both\&. |
|||
\fBndbd_redo_log_reader\fR |
|||
is intended for use primarily by MySQL developers and support personnel in debugging and diagnosing problems\&. |
|||
.PP |
|||
This utility was made available as part of default builds beginning with MySQL Cluster NDB 6\&.1\&.3\&. It remains under development, and its syntax and behavior are subject to change in future releases\&. For this reason, it should be considered experimental at this time\&. |
|||
.PP |
|||
The C++ source files for |
|||
\fBndbd_redo_log_reader\fR |
|||
can be found in the directory |
|||
/storage/ndb/src/kernel/blocks/dblqh/redoLogReader\&. |
|||
.PP |
|||
The following table includes options that are specific to the MySQL Cluster program |
|||
\fBndbd_redo_log_reader\fR\&. Additional descriptions follow the table\&. For options common to all MySQL Cluster programs, see |
|||
Section\ \&17.4.2, \(lqOptions Common to MySQL Cluster Programs\(rq\&. |
|||
.PP |
|||
\fBUsage\fR: |
|||
.sp |
|||
.if n \{\ |
|||
.RS 4 |
|||
.\} |
|||
.nf |
|||
ndbd_redo_log_reader \fIfile_name\fR [\fIoptions\fR] |
|||
.fi |
|||
.if n \{\ |
|||
.RE |
|||
.\} |
|||
.PP |
|||
\fIfile_name\fR |
|||
is the name of a cluster REDO log file\&. REDO log files are located in the numbered directories under the data node\'s data directory (DataDir); the path under this directory to the REDO log files matches the pattern |
|||
ndb_\fI#\fR_fs/D\fI#\fR/LCP/\fI#\fR/T\fI#\fRF\fI#\fR\&.Data\&. In each case, the |
|||
\fI#\fR |
|||
represents a number (not necessarily the same number)\&. For more information, see |
|||
\m[blue]\fBCluster Data Node FileSystemDir Files\fR\m[]\&\s-2\u[1]\d\s+2\&. |
|||
.PP |
|||
The name of the file to be read may be followed by one or more of the options listed here: |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-noprint |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
boolean |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
FALSE |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
\fB\-noprint\fR: Do not print the contents of the log file\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
.TS |
|||
allbox tab(:); |
|||
l l s |
|||
l l s |
|||
^ l l |
|||
^ l l. |
|||
T{ |
|||
\fBCommand\-Line Format\fR |
|||
T}:T{ |
|||
\-nocheck |
|||
T} |
|||
T{ |
|||
\ \& |
|||
T}:T{ |
|||
\fBPermitted Values \fR |
|||
T} |
|||
:T{ |
|||
\fBType\fR |
|||
T}:T{ |
|||
boolean |
|||
T} |
|||
:T{ |
|||
\fBDefault\fR |
|||
T}:T{ |
|||
FALSE |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
\fB\-nocheck\fR: Do not check the log file for errors\&. |
|||
.RE |
|||
.sp |
|||
.RE |
|||
.PP |
|||
Like |
|||
\fBndb_print_backup_file\fR |
|||
and |
|||
\fBndb_print_schema_file\fR |
|||
(and unlike most of the |
|||
NDB |
|||
utilities that are intended to be run on a management server host or to connect to a management server) |
|||
\fBndbd_redo_log_reader\fR |
|||
must be run on a cluster data node, since it accesses the data node file system directly\&. Because it does not make use of the management server, this utility can be used when the management server is not running, and even when the cluster has been completely shut down\&. |
|||
.SH "COPYRIGHT" |
|||
.br |
|||
.PP |
|||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. |
|||
.PP |
|||
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. |
|||
.PP |
|||
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|||
.PP |
|||
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. |
|||
.sp |
|||
.SH "NOTES" |
|||
.IP " 1." 4 |
|||
Cluster Data Node FileSystemDir Files |
|||
.RS 4 |
|||
\%http://dev.mysql.com/doc/ndbapi/en/ndb-internals-ndbd-filesystemdir-files.html |
|||
.RE |
|||
.SH "SEE ALSO" |
|||
For more information, please refer to the MySQL Reference Manual, |
|||
which may already be installed locally and which is also available |
|||
online at http://dev.mysql.com/doc/. |
|||
.SH AUTHOR |
|||
Sun Microsystems, Inc. (http://www.mysql.com/). |
@ -1,388 +0,0 @@ |
|||
'\" t |
|||
.\" Title: \fBndbmtd\fR |
|||
.\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] |
|||
.\" Generator: DocBook XSL Stylesheets v1.75.2 <http://docbook.sf.net/> |
|||
.\" Date: 04/06/2010 |
|||
.\" Manual: MySQL Database System |
|||
.\" Source: MySQL 5.1 |
|||
.\" Language: English |
|||
.\" |
|||
.TH "\FBNDBMTD\FR" "8" "04/06/2010" "MySQL 5\&.1" "MySQL Database System" |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * set default formatting |
|||
.\" ----------------------------------------------------------------- |
|||
.\" disable hyphenation |
|||
.nh |
|||
.\" disable justification (adjust text to left margin only) |
|||
.ad l |
|||
.\" ----------------------------------------------------------------- |
|||
.\" * MAIN CONTENT STARTS HERE * |
|||
.\" ----------------------------------------------------------------- |
|||
.\" ndbmtd |
|||
.\" MySQL Cluster: ndbmtd |
|||
.\" MySQL Cluster: data nodes |
|||
.\" data nodes (MySQL Cluster) |
|||
.\" storage nodes - see data nodes, ndbd, ndbmtd |
|||
.SH "NAME" |
|||
ndbmtd \- the MySQL Cluster data node daemon (multi\-threaded version) |
|||
.SH "SYNOPSIS" |
|||
.HP \w'\fBndbmtd\ \fR\fB\fIoptions\fR\fR\ 'u |
|||
\fBndbmtd \fR\fB\fIoptions\fR\fR |
|||
.SH "DESCRIPTION" |
|||
.PP |
|||
\fBndbmtd\fR |
|||
is a multi\-threaded version of |
|||
\fBndbd\fR, the process that is used to handle all the data in tables using the |
|||
NDBCLUSTER |
|||
storage engine\&. |
|||
\fBndbmtd\fR |
|||
is intended for use on host computers having multiple CPU cores\&. Except where otherwise noted, |
|||
\fBndbmtd\fR |
|||
functions in the same way as |
|||
\fBndbd\fR; therefore, in this section, we concentrate on the ways in which |
|||
\fBndbmtd\fR |
|||
differs from |
|||
\fBndbd\fR, and you should consult |
|||
\fBndbd\fR(8), for additional information about running MySQL Cluster data nodes that apply to both the single\-threaded and multi\-threaded versions of the data node process\&. |
|||
.PP |
|||
Command\-line options and configuration parameters used with |
|||
\fBndbd\fR |
|||
also apply to |
|||
\fBndbmtd\fR\&. For more information about these options and parameters, see |
|||
\fBndbd\fR(8), and |
|||
Section\ \&17.3.2.6, \(lqDefining MySQL Cluster Data Nodes\(rq, respectively\&. |
|||
.PP |
|||
\fBndbmtd\fR |
|||
is also file system\-compatible with |
|||
\fBndbd\fR\&. In other words, a data node running |
|||
\fBndbd\fR |
|||
can be stopped, the binary replaced with |
|||
\fBndbmtd\fR, and then restarted without any loss of data\&. (However, when doing this, you must make sure that |
|||
MaxNoOfExecutionThreads |
|||
is set to an apppriate value before restarting the node if you wish for |
|||
\fBndbmtd\fR |
|||
to run in multi\-threaded fashion\&.) Similarly, an |
|||
\fBndbmtd\fR |
|||
binary can be replaced with |
|||
\fBndbd\fR |
|||
simply by stopping the node and then starting |
|||
\fBndbd\fR |
|||
in place of the multi\-threaded binary\&. It is not necessary when switching between the two to start the data node binary using |
|||
\fB\-\-initial\fR\&. |
|||
.PP |
|||
Prior to MySQL Cluster NDB 7\&.0\&.6, there were known issues when using |
|||
\fBndbmtd\fR |
|||
with MySQL Cluster Disk Data tables\&. If you wish to use multi\-threaded data nodes with disk\-based |
|||
NDB |
|||
tables, you should ensure that you are running MySQL Cluster NDB 7\&.0\&.6 or later\&. (\m[blue]\fBBug#41915\fR\m[]\&\s-2\u[1]\d\s+2, |
|||
\m[blue]\fBBug#44915\fR\m[]\&\s-2\u[2]\d\s+2) |
|||
.PP |
|||
Using |
|||
\fBndbmtd\fR |
|||
differs from using |
|||
\fBndbd\fR |
|||
in two key respects: |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04' 1.\h'+01'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP " 1." 4.2 |
|||
.\} |
|||
You must set an appropriate value for the |
|||
MaxNoOfExecutionThreads |
|||
configuration parameter in the |
|||
config\&.ini |
|||
file\&. If you do not do so, |
|||
\fBndbmtd\fR |
|||
runs in single\-threaded mode \(em that is, it behaves like |
|||
\fBndbd\fR\&. |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04' 2.\h'+01'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP " 2." 4.2 |
|||
.\} |
|||
Trace files are generated by critical errors in |
|||
\fBndbmtd\fR |
|||
processes in a somewhat different fashion from how these are generated by |
|||
\fBndbd\fR |
|||
failures\&. |
|||
.RE |
|||
.PP |
|||
These differences are discussed in more detail in the next few paragraphs\&. |
|||
.\" execution threads (MySQL Cluster) |
|||
.\" MySQL Cluster: execution threads |
|||
.\" ndbmtd: MaxNoOfExecutionThreads |
|||
.\" MaxNoOfExecutionThreads: ndbmtd |
|||
.\" ndbmtd: trace files |
|||
.\" trace files: ndbmtd |
|||
.PP |
|||
\fBNumber of execution threads\fR. The |
|||
MaxNoOfExecutionThreads |
|||
configuration parameter is used to determine the number of local query handler (LQH) threads spawned by |
|||
\fBndbmtd\fR\&. Although this parameter is set in |
|||
[ndbd] |
|||
or |
|||
[ndbd default] |
|||
sections of the |
|||
config\&.ini |
|||
file, it is exclusive to |
|||
\fBndbmtd\fR |
|||
and does not apply to |
|||
\fBndbd\fR\&. |
|||
.PP |
|||
This parameter takes an integer value from 2 to 8 inclusive\&. Generally, you should set this parameter equal to the number of CPU cores on the data node host, as shown in the following table: |
|||
.TS |
|||
allbox tab(:); |
|||
lB lB. |
|||
T{ |
|||
Number of Cores |
|||
T}:T{ |
|||
Recommended MaxNoOfExecutionThreads Value |
|||
T} |
|||
.T& |
|||
l l |
|||
l l |
|||
l l. |
|||
T{ |
|||
2 |
|||
T}:T{ |
|||
2 |
|||
T} |
|||
T{ |
|||
4 |
|||
T}:T{ |
|||
4 |
|||
T} |
|||
T{ |
|||
8 or more |
|||
T}:T{ |
|||
8 |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
.PP |
|||
(It is possible to set this parameter to other values within the permitted range, but these are automatically rounded as shown in the |
|||
\fBValue Used\fR |
|||
column of the next table in this section\&.) |
|||
.PP |
|||
The multi\-threaded data node process always spawns at least 4 threads: |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
1 local query handler (LQH) thread |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
1 transaction coordinator (TC) thread |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
1 transporter thread |
|||
.RE |
|||
.sp |
|||
.RS 4 |
|||
.ie n \{\ |
|||
\h'-04'\(bu\h'+03'\c |
|||
.\} |
|||
.el \{\ |
|||
.sp -1 |
|||
.IP \(bu 2.3 |
|||
.\} |
|||
1 subscription manager (SUMA) thread |
|||
.RE |
|||
.PP |
|||
Setting this parameter to a value between 4 and 8 inclusive causes additional LQH threads to be used by |
|||
\fBndbmtd\fR |
|||
(up to a maximum of 4 LQH threads), as shown in the following table: |
|||
.TS |
|||
allbox tab(:); |
|||
lB lB lB. |
|||
T{ |
|||
config\&.ini Value |
|||
T}:T{ |
|||
Value Used |
|||
T}:T{ |
|||
Number of LQH Threads Used |
|||
T} |
|||
.T& |
|||
l l l |
|||
l l l |
|||
l l l. |
|||
T{ |
|||
3 |
|||
T}:T{ |
|||
2 |
|||
T}:T{ |
|||
1 |
|||
T} |
|||
T{ |
|||
5 or 6 |
|||
T}:T{ |
|||
4 |
|||
T}:T{ |
|||
2 |
|||
T} |
|||
T{ |
|||
7 |
|||
T}:T{ |
|||
8 |
|||
T}:T{ |
|||
4 |
|||
T} |
|||
.TE |
|||
.sp 1 |
|||
.PP |
|||
Setting this parameter outside the permitted range of values causes the management server to abort on startup with the error |
|||
Error line \fInumber\fR: Illegal value \fIvalue\fR for parameter MaxNoOfExecutionThreads\&. |
|||
.if n \{\ |
|||
.sp |
|||
.\} |
|||
.RS 4 |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.br |
|||
.ps +1 |
|||
\fBNote\fR |
|||
.ps -1 |
|||
.br |
|||
.PP |
|||
In MySQL Cluster NDB 6\&.4\&.0, it is not possible to set |
|||
MaxNoOfExecutionThreads |
|||
to 2\&. You can safely use the value 3 instead (it is treated as 2 internally)\&. This issue is resolved in MySQL Cluster NDB 6\&.4\&.1\&. |
|||
.sp .5v |
|||
.RE |
|||
.PP |
|||
In MySQL Cluster NDB 6\&.4\&.0 through 6\&.4\&.3, the default value for this parameter was undefined, although the default behavior for |
|||
\fBndbmtd\fR |
|||
was to use 1 LQH thread, as though |
|||
MaxNoOfExecutionThreads |
|||
had been set to 2\&. Beginning with MySQL Cluster NDB 7\&.0\&.4, this parameter has an explcit default value of 2, thus guaranteeing this default behavior\&. |
|||
.PP |
|||
In MySQL Cluster NDB 7\&.0, it is not possible to cause |
|||
\fBndbmtd\fR |
|||
to use more than 1 TC thread, although we plan to introduce this capability in a future MySQL Cluster release series\&. |
|||
.\" MySQL Cluster: log files |
|||
.\" log files (MySQL Cluster): ndbmtd |
|||
.\" ndbmtd: trace files |
|||
.PP |
|||
Like |
|||
\fBndbd\fR, |
|||
\fBndbmtd\fR |
|||
generates a set of log files which are placed in the directory specified by |
|||
DataDir |
|||
in the |
|||
config\&.ini |
|||
configuration file\&. Except for trace files, these are generated in the same way and have the same names as those generated by |
|||
\fBndbd\fR\&. |
|||
.PP |
|||
In the event of a critical error, |
|||
\fBndbmtd\fR |
|||
generates trace files describing what happened just prior to the error\' occurrence\&. These files, which can be found in the data node\'s |
|||
DataDir, are useful for analysis of problems by the MySQL Cluster Development and Support teams\&. One trace file is generated for each |
|||
\fBndbmtd\fR |
|||
thread\&. The names of these files follow the pattern |
|||
ndb_\fInode_id\fR_trace\&.log\&.\fItrace_id\fR_t\fIthread_id\fR, where |
|||
\fInode_id\fR |
|||
is the data node\'s unique node ID in the cluster, |
|||
\fItrace_id\fR |
|||
is a trace sequence number, and |
|||
\fIthread_id\fR |
|||
is the thread ID\&. For example, in the event of the failure of an |
|||
\fBndbmtd\fR |
|||
process running as a MySQL Cluster data node having the node ID 3 and with |
|||
MaxNoOfExecutionThreads |
|||
equal to 4, four trace files are generated in the data node\'s data directory; if the is the first time this node has failed, then these files are named |
|||
ndb_3_trace\&.log\&.1_t1, |
|||
ndb_3_trace\&.log\&.1_t2, |
|||
ndb_3_trace\&.log\&.1_t3, and |
|||
ndb_3_trace\&.log\&.1_t4\&. Internally, these trace files follow the same format as |
|||
\fBndbd\fR |
|||
trace files\&. |
|||
.PP |
|||
The |
|||
\fBndbd\fR |
|||
exit codes and messages that are generated when a data node process shuts down prematurely are also used by |
|||
\fBndbmtd\fR\&. See |
|||
\m[blue]\fBndbd Error Messages\fR\m[]\&\s-2\u[3]\d\s+2, for a listing of these\&. |
|||
.if n \{\ |
|||
.sp |
|||
.\} |
|||
.RS 4 |
|||
.it 1 an-trap |
|||
.nr an-no-space-flag 1 |
|||
.nr an-break-flag 1 |
|||
.br |
|||
.ps +1 |
|||
\fBNote\fR |
|||
.ps -1 |
|||
.br |
|||
.PP |
|||
It is possible to use |
|||
\fBndbd\fR |
|||
and |
|||
\fBndbmtd\fR |
|||
concurrently on different data nodes in the same MySQL Cluster\&. However, such configurations have not been tested extensively; thus, we cannot not recommend doing so in a production setting at this time\&. |
|||
.sp .5v |
|||
.RE |
|||
.SH "COPYRIGHT" |
|||
.br |
|||
.PP |
|||
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc. |
|||
.PP |
|||
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License. |
|||
.PP |
|||
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. |
|||
.PP |
|||
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA or see http://www.gnu.org/licenses/. |
|||
.sp |
|||
.SH "NOTES" |
|||
.IP " 1." 4 |
|||
Bug#41915 |
|||
.RS 4 |
|||
\%http://bugs.mysql.com/bug.php?id=41915 |
|||
.RE |
|||
.IP " 2." 4 |
|||
Bug#44915 |
|||
.RS 4 |
|||
\%http://bugs.mysql.com/bug.php?id=44915 |
|||
.RE |
|||
.IP " 3." 4 |
|||
ndbd Error Messages |
|||
.RS 4 |
|||
\%http://dev.mysql.com/doc/ndbapi/en/ndbd-error-messages.html |
|||
.RE |
|||
.SH "SEE ALSO" |
|||
For more information, please refer to the MySQL Reference Manual, |
|||
which may already be installed locally and which is also available |
|||
online at http://dev.mysql.com/doc/. |
|||
.SH AUTHOR |
|||
Sun Microsystems, Inc. (http://www.mysql.com/). |
@ -1,119 +0,0 @@ |
|||
####################################### |
|||
# Author: Rafal Somla # |
|||
# Date: 2006-08-20 # |
|||
# Purpose: Test replication of basic # |
|||
# table operations in various setups # |
|||
# # |
|||
# Based on rpl_ndb_2multi_eng.test by # |
|||
# JBM # |
|||
####################################### |
|||
|
|||
--echo --- Doing pre test cleanup --- |
|||
|
|||
connection master; |
|||
--disable_warnings |
|||
DROP TABLE IF EXISTS t1; |
|||
--enable_query_log |
|||
|
|||
################################################# |
|||
--echo --- Create Table Section --- |
|||
|
|||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, |
|||
b1 INT, |
|||
vc VARCHAR(255), |
|||
bc CHAR(255), |
|||
d DECIMAL(10,4) DEFAULT 0, |
|||
f FLOAT DEFAULT 0, |
|||
total BIGINT UNSIGNED, |
|||
y YEAR, |
|||
t DATE, |
|||
PRIMARY KEY(id)); |
|||
|
|||
--echo --- Show table on master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Show table on slave --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--source include/rpl_multi_engine2.inc |
|||
|
|||
################################################# |
|||
# Okay lets see how it holds up to table changes |
|||
--echo --- Check that simple Alter statements are replicated correctly -- |
|||
|
|||
ALTER TABLE t1 DROP PRIMARY KEY; |
|||
# note: table with no PK can't contain blobs if it is to be replicated. |
|||
ALTER TABLE t1 MODIFY vc char(32); |
|||
|
|||
--echo --- Show the new improved table on the master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Make sure that our tables on slave are still same engine --- |
|||
--echo --- and that the alter statements replicated correctly --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--source include/rpl_multi_engine2.inc |
|||
|
|||
################################################# |
|||
--echo --- Check that replication works when slave has more columns than master |
|||
connection master; |
|||
ALTER TABLE t1 ADD PRIMARY KEY(id,total); |
|||
ALTER TABLE t1 MODIFY vc TEXT; |
|||
|
|||
INSERT INTO t1 VALUES(3,1,'Testing MySQL databases is a cool ', |
|||
'Must make it bug free for the customer', |
|||
654321.4321,15.21,0,1965,"1905-11-14"); |
|||
INSERT INTO t1 VALUES(20,1,'Testing MySQL databases is a cool ', |
|||
'Must make it bug free for the customer', |
|||
654321.4321,15.21,0,1965,"1965-11-14"); |
|||
INSERT INTO t1 VALUES(50,1,'Testing MySQL databases is a cool ', |
|||
'Must make it bug free for the customer', |
|||
654321.4321,15.21,0,1965,"1985-11-14"); |
|||
|
|||
--echo --- Add columns on slave --- |
|||
--sync_slave_with_master |
|||
ALTER TABLE t1 ADD (u int, v char(16) default 'default'); |
|||
UPDATE t1 SET u=7 WHERE id < 50; |
|||
UPDATE t1 SET v='explicit' WHERE id >10; |
|||
|
|||
--echo --- Show changed table on slave --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
SELECT * |
|||
FROM t1 |
|||
ORDER BY id; |
|||
|
|||
--source include/rpl_multi_engine2.inc |
|||
TRUNCATE TABLE t1; |
|||
|
|||
################################################# |
|||
--echo --- Check that replication works when master has more columns than slave |
|||
connection master; |
|||
|
|||
--echo --- Remove columns on slave --- |
|||
--sync_slave_with_master |
|||
ALTER TABLE t1 DROP COLUMN v; |
|||
ALTER TABLE t1 DROP COLUMN u; |
|||
ALTER TABLE t1 DROP COLUMN t; |
|||
ALTER TABLE t1 DROP COLUMN y; |
|||
|
|||
--echo --- Show changed table on slave --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--source include/rpl_multi_engine2.inc |
|||
TRUNCATE TABLE t1; |
|||
|
|||
################################################# |
|||
--echo --- Do Cleanup -- |
|||
connection master; |
|||
DROP TABLE IF EXISTS t1; |
|||
|
|||
sync_slave_with_master; |
|||
connection master; |
@ -1,347 +0,0 @@ |
|||
####################################### |
|||
# Author: JBM # |
|||
# Date: 2006-02-23 # |
|||
# Purpose: See if replication between # |
|||
# NDB -> MyISAM and InnoDB works. # |
|||
# and if # |
|||
# MyISAM and InnoDB -> NDB works. # |
|||
####################################### |
|||
# By JBM # |
|||
# Date 2006-02-28 # |
|||
# Change: Implemented review comments # |
|||
####################################### |
|||
|
|||
--echo --- Doing pre test cleanup --- |
|||
|
|||
connection master; |
|||
--disable_warnings |
|||
DROP TABLE IF EXISTS t1; |
|||
--enable_query_log |
|||
|
|||
--echo --- Start test 1 Basic testing --- |
|||
--echo --- Create Table Section --- |
|||
|
|||
################################################# |
|||
# Requirment: Create basic table, replicate # |
|||
# basice operations such at insert, update # |
|||
# delete between 2 different storage engines # |
|||
# Alter table and ensure table is handled # |
|||
# Correctly on the slave # |
|||
################################################# |
|||
|
|||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), |
|||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, |
|||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED, |
|||
y YEAR, t DATE,PRIMARY KEY(id)); |
|||
|
|||
--echo --- Show table on master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Show table on slave --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
# Okay lets see how it holds up to table changes |
|||
--echo --- Check that simple Alter statements are replicated correctly -- |
|||
|
|||
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); |
|||
ALTER TABLE t1 MODIFY vc TEXT; |
|||
|
|||
--echo --- Show the new improved table on the master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Make sure that our tables on slave are still same engine --- |
|||
--echo --- and that the alter statements replicated correctly --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- End test 1 Basic testing --- |
|||
--echo --- Do Cleanup -- |
|||
|
|||
DROP TABLE IF EXISTS t1; |
|||
|
|||
################################################################# |
|||
|
|||
--echo --- Start test 2 partition RANGE testing -- |
|||
--echo --- Do setup -- |
|||
|
|||
|
|||
################################################# |
|||
# Requirment: Create table that is partitioned # |
|||
# by range on year i.e. year(t) and replicate # |
|||
# basice operations such at insert, update # |
|||
# delete between 2 different storage engines # |
|||
# Alter table and ensure table is handled # |
|||
# Correctly on the slave # |
|||
################################################# |
|||
|
|||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), |
|||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, |
|||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED, |
|||
y YEAR, t DATE) |
|||
PARTITION BY RANGE (YEAR(t)) |
|||
(PARTITION p0 VALUES LESS THAN (1901), |
|||
PARTITION p1 VALUES LESS THAN (1946), |
|||
PARTITION p2 VALUES LESS THAN (1966), |
|||
PARTITION p3 VALUES LESS THAN (1986), |
|||
PARTITION p4 VALUES LESS THAN (2005), |
|||
PARTITION p5 VALUES LESS THAN MAXVALUE); |
|||
|
|||
--echo --- Show table on master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Show table on slave -- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- Check that simple Alter statements are replicated correctly --- |
|||
|
|||
ALTER TABLE t1 ADD PRIMARY KEY(t,id); |
|||
ALTER TABLE t1 MODIFY vc TEXT; |
|||
|
|||
--echo --- Show the new improved table on the master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Make sure that our tables on slave are still same engine --- |
|||
--echo --- and that the alter statements replicated correctly --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
--enable_query_log |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- End test 2 partition RANGE testing --- |
|||
--echo --- Do Cleanup --- |
|||
|
|||
DROP TABLE IF EXISTS t1; |
|||
|
|||
######################################################## |
|||
|
|||
--echo --- Start test 3 partition LIST testing --- |
|||
--echo --- Do setup --- |
|||
################################################# |
|||
# Requirment: Create table that is partitioned # |
|||
# by list on id i.e. (2,4). Pretend that we # |
|||
# missed one and alter to add. Then replicate # |
|||
# basice operations such at insert, update # |
|||
# delete between 2 different storage engines # |
|||
# Alter table and ensure table is handled # |
|||
# Correctly on the slave # |
|||
################################################# |
|||
|
|||
|
|||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), |
|||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, |
|||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED, |
|||
y YEAR, t DATE) |
|||
PARTITION BY LIST(id) |
|||
(PARTITION p0 VALUES IN (2, 4), |
|||
PARTITION p1 VALUES IN (42, 142)); |
|||
|
|||
--echo --- Test 3 Alter to add partition --- |
|||
|
|||
ALTER TABLE t1 ADD PARTITION (PARTITION p2 VALUES IN (412)); |
|||
|
|||
--echo --- Show table on master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Show table on slave --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- Check that simple Alter statements are replicated correctly --- |
|||
|
|||
ALTER TABLE t1 ADD PRIMARY KEY(id); |
|||
ALTER TABLE t1 MODIFY vc TEXT; |
|||
|
|||
--echo --- Show the new improved table on the master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Make sure that our tables on slave are still same engine --- |
|||
--echo --- and that the alter statements replicated correctly --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- End test 3 partition LIST testing --- |
|||
--echo --- Do Cleanup -- |
|||
|
|||
DROP TABLE IF EXISTS t1; |
|||
|
|||
######################################################## |
|||
|
|||
--echo --- Start test 4 partition HASH testing --- |
|||
--echo --- Do setup --- |
|||
################################################# |
|||
# Requirment: Create table that is partitioned # |
|||
# by hash on year i.e. YEAR(t). Then replicate # |
|||
# basice operations such at insert, update # |
|||
# delete between 2 different storage engines # |
|||
# Alter table and ensure table is handled # |
|||
# Correctly on the slave # |
|||
################################################# |
|||
|
|||
|
|||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), |
|||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, |
|||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED, |
|||
y YEAR, t DATE) |
|||
PARTITION BY HASH( YEAR(t) ) |
|||
PARTITIONS 4; |
|||
|
|||
--echo --- show that tables have been created correctly --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- Check that simple Alter statements are replicated correctly --- |
|||
|
|||
ALTER TABLE t1 ADD PRIMARY KEY(t,id); |
|||
ALTER TABLE t1 MODIFY vc TEXT; |
|||
|
|||
--echo --- Show the new improved table on the master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Make sure that our tables on slave are still same engine --- |
|||
--echo --- and that the alter statements replicated correctly --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- End test 4 partition HASH testing --- |
|||
--echo --- Do Cleanup -- |
|||
|
|||
DROP TABLE IF EXISTS t1; |
|||
|
|||
######################################################## |
|||
|
|||
--echo --- Start test 5 partition by key testing --- |
|||
--echo --- Create Table Section --- |
|||
|
|||
################################################# |
|||
# Requirment: Create table that is partitioned # |
|||
# by key on id with 4 parts. Then replicate # |
|||
# basice operations such at insert, update # |
|||
# delete between 2 different storage engines # |
|||
# Alter table and ensure table is handled # |
|||
# Correctly on the slave # |
|||
################################################# |
|||
|
|||
CREATE TABLE t1 (id MEDIUMINT NOT NULL, b1 BIT(8), vc VARCHAR(255), |
|||
bc CHAR(255), d DECIMAL(10,4) DEFAULT 0, |
|||
f FLOAT DEFAULT 0, total BIGINT UNSIGNED, |
|||
y YEAR, t DATE,PRIMARY KEY(id)) |
|||
PARTITION BY KEY() |
|||
PARTITIONS 4; |
|||
|
|||
--echo --- Show that tables on master are ndbcluster tables --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Show that tables on slave --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
# Okay lets see how it holds up to table changes |
|||
--echo --- Check that simple Alter statements are replicated correctly --- |
|||
|
|||
ALTER TABLE t1 DROP PRIMARY KEY, ADD PRIMARY KEY(id, total); |
|||
|
|||
--echo --- Show the new improved table on the master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Make sure that our tables on slave are still right type --- |
|||
--echo --- and that the alter statements replicated correctly --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- Check that simple Alter statements are replicated correctly --- |
|||
|
|||
ALTER TABLE t1 MODIFY vc TEXT; |
|||
|
|||
--echo --- Show the new improved table on the master --- |
|||
|
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Make sure that our tables on slave are still same engine --- |
|||
--echo --- and that the alter statements replicated correctly --- |
|||
|
|||
sync_slave_with_master; |
|||
SHOW CREATE TABLE t1; |
|||
|
|||
--echo --- Perform basic operation on master --- |
|||
--echo --- and ensure replicated correctly --- |
|||
|
|||
--source include/rpl_multi_engine3.inc |
|||
|
|||
--echo --- End test 5 key partition testing --- |
|||
--echo --- Do Cleanup --- |
|||
|
|||
DROP TABLE IF EXISTS t1; |
|||
sync_slave_with_master; |
|||
|
|||
# End of 5.1 test case |
@ -1,307 +0,0 @@ |
|||
############################################# |
|||
#Authors: TU and Jeb |
|||
#Date: 2007/04 |
|||
#Purpose: Generic replication to cluster |
|||
# and ensuring that the ndb_apply_status |
|||
# table is updated. |
|||
############################################# |
|||
# Notes: |
|||
# include/select_ndb_apply_status.inc |
|||
# Selects out the log name, start & end pos |
|||
# from the ndb_apply_status table |
|||
# |
|||
# include/show_binlog_using_logname.inc |
|||
# To select out 1 row from offset 1 |
|||
# from the start position in the binlog whose |
|||
# name is = log_name |
|||
# |
|||
# include/tpcb.inc |
|||
# Creates DATABASE tpcb, the tables and |
|||
# stored procedures for loading the DB |
|||
# and for running transactions against DB. |
|||
############################################## |
|||
|
|||
|
|||
--echo |
|||
--echo *** Test 1 *** |
|||
--echo |
|||
|
|||
connection master; |
|||
create table t1 (a int key, b int) engine innodb; |
|||
create table t2 (a int key, b int) engine innodb; |
|||
|
|||
--echo |
|||
|
|||
--sync_slave_with_master |
|||
alter table t1 engine ndb; |
|||
alter table t2 engine ndb; |
|||
|
|||
--echo |
|||
|
|||
# check binlog position without begin |
|||
connection master; |
|||
insert into t1 values (1,2); |
|||
|
|||
--echo |
|||
|
|||
--sync_slave_with_master |
|||
--source include/select_ndb_apply_status.inc |
|||
|
|||
--echo |
|||
|
|||
connection master; |
|||
--echo # Now check that that is in the apply_status table is consistant |
|||
--echo # with what is in the binlog |
|||
--echo |
|||
--echo # since insert is done with transactional engine, expect a BEGIN |
|||
--echo # at <start_pos> |
|||
--echo |
|||
--let $binlog_start= $start_pos |
|||
--let $binlog_limit= 1 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
--echo |
|||
--echo # Now the insert, one step after |
|||
--echo |
|||
--let $binlog_start= $start_pos |
|||
--let $binlog_limit= 1,1 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
--echo |
|||
--echo # and the COMMIT should be at <end_pos> |
|||
--echo |
|||
--let $binlog_start= $start_pos |
|||
--let $binlog_limit= 2,1 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
--echo |
|||
|
|||
# check binlog position with begin |
|||
begin; |
|||
insert into t1 values (2,3); |
|||
insert into t2 values (3,4); |
|||
commit; |
|||
|
|||
--echo |
|||
|
|||
--sync_slave_with_master |
|||
--source include/select_ndb_apply_status.inc |
|||
|
|||
connection master; |
|||
--let $binlog_start= $start_pos |
|||
--let $binlog_limit= 1 |
|||
--source include/show_binlog_events.inc |
|||
--echo |
|||
--let $binlog_start= $start_pos |
|||
--let $binlog_limit= 1,2 |
|||
--source include/show_binlog_events.inc |
|||
--echo |
|||
--let $binlog_start= $start_pos |
|||
--let $binlog_limit= 3,1 |
|||
--source include/show_binlog_events.inc |
|||
|
|||
--echo |
|||
|
|||
connection master; |
|||
DROP TABLE test.t1, test.t2; |
|||
--sync_slave_with_master |
|||
SHOW TABLES; |
|||
|
|||
# Run in some transactions using stored procedures |
|||
# and ensure that the ndb_apply_status table is |
|||
# updated to show the transactions |
|||
|
|||
|
|||
--echo |
|||
--echo *** Test 2 *** |
|||
--echo |
|||
|
|||
# Create database/tables and stored procdures |
|||
connection master; |
|||
--source include/tpcb.inc |
|||
|
|||
# Switch tables on slave to use NDB |
|||
--sync_slave_with_master |
|||
USE tpcb; |
|||
ALTER TABLE account ENGINE NDB; |
|||
ALTER TABLE branch ENGINE NDB; |
|||
ALTER TABLE teller ENGINE NDB; |
|||
ALTER TABLE history ENGINE NDB; |
|||
|
|||
--echo |
|||
|
|||
# Load DB tpcb and run some transactions |
|||
connection master; |
|||
--disable_query_log |
|||
CALL tpcb.load(); |
|||
SET AUTOCOMMIT=0; |
|||
let $run= 5; |
|||
while ($run) |
|||
{ |
|||
START TRANSACTION; |
|||
--disable_warnings |
|||
--eval CALL tpcb.trans($rpl_format); |
|||
--enable_warnings |
|||
eval SET @my_errno= $mysql_errno; |
|||
let $run_good= `SELECT @my_errno = 0`; |
|||
let $run_bad= `SELECT @my_errno <> 0`; |
|||
if ($run_good) |
|||
{ |
|||
COMMIT; |
|||
} |
|||
if ($run_bad) |
|||
{ |
|||
ROLLBACK; |
|||
} |
|||
dec $run; |
|||
} |
|||
|
|||
SET AUTOCOMMIT=1; |
|||
--enable_query_log |
|||
|
|||
--sync_slave_with_master |
|||
--source include/select_ndb_apply_status.inc |
|||
|
|||
--echo |
|||
|
|||
connection master; |
|||
--source include/show_binlog_using_logname.inc |
|||
|
|||
# Flush the logs on the master moving all |
|||
# Transaction to a new binlog and ensure |
|||
# that the ndb_apply_status table is updated |
|||
# to show the use of the new binlog. |
|||
|
|||
--echo |
|||
--echo ** Test 3 ** |
|||
--echo |
|||
|
|||
# Flush logs on master which should force it |
|||
# to switch to binlog #2 |
|||
|
|||
FLUSH LOGS; |
|||
|
|||
# Run in some transaction to increase end pos in |
|||
# binlog |
|||
|
|||
--disable_query_log |
|||
SET AUTOCOMMIT=0; |
|||
let $run= 5; |
|||
while ($run) |
|||
{ |
|||
START TRANSACTION; |
|||
--disable_warnings |
|||
--eval CALL tpcb.trans($rpl_format); |
|||
--enable_warnings |
|||
eval SET @my_errno= $mysql_errno; |
|||
let $run_good= `SELECT @my_errno = 0`; |
|||
let $run_bad= `SELECT @my_errno <> 0`; |
|||
if ($run_good) |
|||
{ |
|||
COMMIT; |
|||
} |
|||
if ($run_bad) |
|||
{ |
|||
ROLLBACK; |
|||
} |
|||
dec $run; |
|||
} |
|||
SET AUTOCOMMIT=1; |
|||
--enable_query_log |
|||
|
|||
--echo |
|||
|
|||
--sync_slave_with_master |
|||
--source include/select_ndb_apply_status.inc |
|||
|
|||
--echo |
|||
|
|||
connection master; |
|||
--source include/show_binlog_using_logname.inc |
|||
|
|||
# Now we reset both the master and the slave |
|||
# Run some more transaction and ensure |
|||
# that the ndb_apply_status is updated |
|||
# correctly |
|||
|
|||
--echo |
|||
--echo ** Test 4 ** |
|||
--echo |
|||
|
|||
# Reset both slave and master |
|||
# This should reset binlog to #1 |
|||
--source include/rpl_reset.inc |
|||
|
|||
--echo |
|||
|
|||
# Run in some transactions and check |
|||
connection master; |
|||
--disable_query_log |
|||
SET AUTOCOMMIT=0; |
|||
let $run= 5; |
|||
while ($run) |
|||
{ |
|||
START TRANSACTION; |
|||
--disable_warnings |
|||
--eval CALL tpcb.trans($rpl_format); |
|||
--enable_warnings |
|||
eval SET @my_errno= $mysql_errno; |
|||
let $run_good= `SELECT @my_errno = 0`; |
|||
let $run_bad= `SELECT @my_errno <> 0`; |
|||
if ($run_good) |
|||
{ |
|||
COMMIT; |
|||
} |
|||
if ($run_bad) |
|||
{ |
|||
ROLLBACK; |
|||
} |
|||
dec $run; |
|||
} |
|||
SET AUTOCOMMIT=1; |
|||
--enable_query_log |
|||
|
|||
--sync_slave_with_master |
|||
--source include/select_ndb_apply_status.inc |
|||
|
|||
--echo |
|||
|
|||
connection master; |
|||
--source include/show_binlog_using_logname.inc |
|||
|
|||
# Since we are doing replication, it is a good |
|||
# idea to check to make sure all data was |
|||
# Replicated correctly |
|||
|
|||
--echo |
|||
--echo *** DUMP MASTER & SLAVE FOR COMPARE ******** |
|||
|
|||
--exec $MYSQL_DUMP -n -t --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/master_apply_status.sql |
|||
|
|||
--exec $MYSQL_DUMP_SLAVE -n -t --compact --order-by-primary --skip-extended-insert tpcb account teller branch history > $MYSQLTEST_VARDIR/tmp/slave_apply_status.sql |
|||
|
|||
connection master; |
|||
DROP DATABASE tpcb; |
|||
|
|||
--sync_slave_with_master |
|||
|
|||
####### Commenting out until decision on Bug#27960 ########### |
|||
|
|||
#--source include/select_ndb_apply_status.inc |
|||
|
|||
#connection master; |
|||
#--eval SHOW BINLOG EVENTS in '$log_name' from $start_pos |
|||
#--source include/show_binlog_using_logname.inc |
|||
|
|||
--echo ****** Do dumps compare ************ |
|||
|
|||
|
|||
diff_files $MYSQLTEST_VARDIR/tmp/master_apply_status.sql $MYSQLTEST_VARDIR/tmp/slave_apply_status.sql; |
|||
|
|||
## Note: Ths files should only get removed, if the above diff succeeds. |
|||
|
|||
--exec rm $MYSQLTEST_VARDIR/tmp/master_apply_status.sql |
|||
--exec rm $MYSQLTEST_VARDIR/tmp/slave_apply_status.sql |
|||
|
|||
|
|||
# End of 5.1 Test |
@ -1,27 +0,0 @@ |
|||
|
|||
[cluster_config] |
|||
MaxNoOfSavedMessages= 1000 |
|||
MaxNoOfConcurrentTransactions= 128 |
|||
MaxNoOfConcurrentOperations= 10000 |
|||
DataMemory= 20M |
|||
IndexMemory= 1M |
|||
Diskless= 0 |
|||
TimeBetweenWatchDogCheck= 30000 |
|||
MaxNoOfOrderedIndexes= 32 |
|||
MaxNoOfAttributes= 2048 |
|||
TimeBetweenGlobalCheckpoints= 500 |
|||
NoOfFragmentLogFiles= 4 |
|||
FragmentLogFileSize= 12M |
|||
DiskPageBufferMemory= 4M |
|||
|
|||
# O_DIRECT has issues on 2.4 whach have not been handled, Bug #29612 |
|||
#ODirect= 1 |
|||
# the following parametes just function as a small regression |
|||
# test that the parameter exists |
|||
InitialNoOfOpenFiles= 27 |
|||
|
|||
# Increase timeouts for slow test-machines |
|||
HeartbeatIntervalDbDb= 30000 |
|||
HeartbeatIntervalDbApi= 30000 |
|||
|
|||
#TransactionDeadlockDetectionTimeout= 7500 |
@ -1,52 +0,0 @@ |
|||
# Setup connections to both MySQL Servers connected to the cluster |
|||
connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,); |
|||
connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,); |
|||
|
|||
# Check that server1 has NDB support |
|||
connection server1; |
|||
let $engines_table= query_get_value(SHOW TABLES FROM information_schema LIKE 'ENGINES', Tables_in_information_schema (ENGINES), 1); |
|||
disable_query_log; |
|||
if (`SELECT 1 FROM dual WHERE '$engines_table' = 'engines'`) |
|||
{ |
|||
--require r/true.require |
|||
SELECT (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; |
|||
--source include/ndb_not_readonly.inc |
|||
} |
|||
enable_query_log; |
|||
|
|||
# Check that server2 has NDB support |
|||
connection server2; |
|||
let $engines_table= query_get_value(SHOW TABLES FROM information_schema LIKE 'ENGINES', Tables_in_information_schema (ENGINES), 1); |
|||
disable_query_log; |
|||
if (`SELECT 1 FROM dual WHERE '$engines_table' = 'engines'`) |
|||
{ |
|||
--require r/true.require |
|||
SELECT (support = 'YES' or support = 'DEFAULT' or support = 'ENABLED') as `TRUE` FROM information_schema.engines WHERE engine = 'ndbcluster'; |
|||
--source include/ndb_not_readonly.inc |
|||
} |
|||
enable_query_log; |
|||
|
|||
# cleanup |
|||
|
|||
connection server1; |
|||
disable_query_log; |
|||
disable_warnings; |
|||
--error 0,1051 |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; |
|||
flush tables; |
|||
flush status; |
|||
enable_warnings; |
|||
enable_query_log; |
|||
|
|||
connection server2; |
|||
disable_query_log; |
|||
disable_warnings; |
|||
--error 0,1051 |
|||
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9,t10; |
|||
flush tables; |
|||
flush status; |
|||
enable_warnings; |
|||
enable_query_log; |
|||
|
|||
# Set the default connection |
|||
connection server1; |
@ -1,2 +0,0 @@ |
|||
# Check that server is compiled and started with support for NDB |
|||
--source include/have_multi_ndb.inc |
@ -1,2 +0,0 @@ |
|||
-- require r/have_ndb_extra.require |
|||
eval select $NDB_EXTRA_TEST; |
@ -1,4 +0,0 @@ |
|||
--require r/have_ndbapi_examples.require |
|||
disable_query_log; |
|||
eval select LENGTH('$NDB_EXAMPLES_BINARY') > 0 as 'have_ndb_example'; |
|||
enable_query_log; |
@ -1,48 +0,0 @@ |
|||
###################################################### |
|||
# By JBM 2006-02-16 So that the code is not repeated # |
|||
# in test cases and can be reused. # |
|||
###################################################### |
|||
|
|||
--exec $NDB_MGM --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -e "start backup" >> $NDB_TOOLS_OUTPUT |
|||
|
|||
# To find the backupid, we must dump this data to a table, and SELECT |
|||
# what we want into an outfile. This could be accomplished with grep, but |
|||
# grep isn't Windows-portable |
|||
|
|||
--disable_query_log |
|||
# create a table to help us out |
|||
--disable_warnings # leave this on until done with the entire process |
|||
# cleanup |
|||
DROP TABLE IF EXISTS helper1; |
|||
CREATE TABLE helper1(c1 VARCHAR(20)); |
|||
# dump raw data to file |
|||
let $ndb_backup_file1= $MYSQLTEST_VARDIR/ndb_backup_tmp.dat; |
|||
let $ndb_backup_file2= $MYSQLTEST_VARDIR/tmp.dat; |
|||
--disable_warnings |
|||
--error 0,1 |
|||
--remove_file $ndb_backup_file1 |
|||
--enable_warnings |
|||
--exec $NDB_TOOLS_DIR/ndb_select_all --ndb-connectstring="$NDB_CONNECTSTRING" -d sys --delimiter=',' SYSTAB_0 > $ndb_backup_file1 |
|||
# load the table from the raw data file |
|||
eval LOAD DATA INFILE '$ndb_backup_file1' INTO TABLE helper1; |
|||
--remove_file $ndb_backup_file1 |
|||
# output what we need |
|||
eval SELECT * FROM helper1 WHERE c1 LIKE '%520093696%' |
|||
INTO OUTFILE '$ndb_backup_file2'; |
|||
# cleanup |
|||
DROP TABLE helper1; |
|||
--enable_warnings |
|||
--enable_query_log |
|||
|
|||
CREATE TEMPORARY TABLE IF NOT EXISTS test.backup_info |
|||
(id INT, backup_id INT) ENGINE = MEMORY; |
|||
|
|||
--replace_result $MYSQLTEST_VARDIR <MYSQLTEST_VARDIR> |
|||
eval LOAD DATA INFILE '$ndb_backup_file2' INTO TABLE test.backup_info FIELDS TERMINATED BY ','; |
|||
--remove_file $ndb_backup_file2 |
|||
|
|||
# Load backup id into environment variable |
|||
let the_backup_id=`SELECT backup_id from test.backup_info`; |
|||
|
|||
DROP TABLE test.backup_info; |
|||
|
@ -1,9 +0,0 @@ |
|||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults $ndb_restore_opts -b $the_backup_id -n 1 $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id $ndb_restore_filter > $MYSQLTEST_VARDIR/tmp/tmp.dat |
|||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults $ndb_restore_opts -b $the_backup_id -n 2 $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id $ndb_restore_filter >> $MYSQLTEST_VARDIR/tmp/tmp.dat |
|||
--exec sort $MYSQLTEST_VARDIR/tmp/tmp.dat |
|||
--disable_warnings |
|||
--error 0,1 |
|||
--remove_file $MYSQLTEST_VARDIR/tmp/tmp.dat |
|||
--enable_warnings |
|||
--let ndb_restore_opts= |
|||
--let ndb_restore_filter= |
@ -1,4 +0,0 @@ |
|||
-- require r/ndb_default_cluster.require |
|||
disable_query_log; |
|||
show status like "Ndb_config_from_host"; |
|||
enable_query_log; |
@ -1,12 +0,0 @@ |
|||
--source include/master-slave.inc |
|||
|
|||
connection slave; |
|||
# Check that server is compiled and started with support for NDB |
|||
disable_query_log; |
|||
--require r/true.require |
|||
select (support = 'YES' or support = 'DEFAULT') as `TRUE` from information_schema.engines where engine = 'ndbcluster'; |
|||
--source include/ndb_not_readonly.inc |
|||
enable_query_log; |
|||
|
|||
# Set the default connection to 'master' |
|||
connection master; |
@ -1,67 +0,0 @@ |
|||
# ==== Purpose ==== |
|||
# |
|||
# Set up circular cluster replication where each |
|||
# cluster has two mysqlds and replication directions are |
|||
# following: |
|||
# master ---> slave |
|||
# / \ |
|||
# cluster A cluster B |
|||
# \ / |
|||
# master1 <--- slave1 |
|||
# |
|||
# ==== Usage ==== |
|||
# |
|||
# [--let $rpl_server_count= N] |
|||
# [--let $rpl_skip_check_server_ids= 1] |
|||
# [--let $rpl_skip_reset_master_and_slave= 1] |
|||
# [--let $rpl_skip_change_master= 1] |
|||
# [--let $rpl_skip_start_slave= 1] |
|||
# [--let $rpl_debug= 1] |
|||
# [--let $slave_timeout= NUMBER] |
|||
# --source include/ndb_master-slave_2ch.inc |
|||
# |
|||
# Parameters: |
|||
# $rpl_server_count, $rpl_skip_check_server_ids, |
|||
# $rpl_skip_reset_master_and_slave, $rpl_skip_change_master, |
|||
# $rpl_skip_start_slave, $rpl_debug, $slave_timeout |
|||
# See include/master-slave.inc |
|||
|
|||
--let $rpl_topology= 1->2,4->3 |
|||
--let $rpl_skip_check_server_ids= 1 |
|||
--source include/rpl_init.inc |
|||
|
|||
# Make connections to mysqlds |
|||
|
|||
--let $rpl_connection_name= master |
|||
--let $rpl_server_number= 1 |
|||
--source include/rpl_connect.inc |
|||
|
|||
--let $rpl_connection_name= master1 |
|||
--let $rpl_server_number= 1 |
|||
--source include/rpl_connect.inc |
|||
|
|||
--let $rpl_connection_name= slave |
|||
--let $rpl_server_number= 2 |
|||
--source include/rpl_connect.inc |
|||
|
|||
--let $rpl_connection_name= slave1 |
|||
--let $rpl_server_number= 2 |
|||
--source include/rpl_connect.inc |
|||
|
|||
|
|||
# Check that all mysqld are compiled with ndb support |
|||
--let $_rpl_server= 4 |
|||
while ($_rpl_server) |
|||
{ |
|||
--connection server_$_rpl_server |
|||
if (`SELECT COUNT(*) = 0 FROM INFORMATION_SCHEMA.ENGINES WHERE engine = 'ndbcluster' AND (support = 'YES' OR support = 'DEFAULT')`) |
|||
{ |
|||
--skip Test requires NDB. |
|||
} |
|||
--source include/ndb_not_readonly.inc |
|||
--dec $_rpl_server |
|||
} |
|||
|
|||
|
|||
# Set the default connection to 'master' (cluster A) |
|||
connection master; |
@ -1,36 +0,0 @@ |
|||
# Check that server has come out ot readonly mode |
|||
# |
|||
# wait for server to connect properly to cluster |
|||
# |
|||
|
|||
--disable_query_log |
|||
|
|||
set @saved_log = @@sql_log_bin; |
|||
set sql_log_bin = 0; |
|||
--error 0,ER_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG,ER_KEY_NOT_FOUND |
|||
delete from mysql.ndb_apply_status where server_id=0; |
|||
let $mysql_errno= 1; |
|||
let $counter= 600; |
|||
while ($mysql_errno) |
|||
{ |
|||
# Table is readonly until the mysqld has connected properly |
|||
--error 0,ER_NO_SUCH_TABLE,ER_OPEN_AS_READONLY,ER_GET_ERRMSG |
|||
replace into mysql.ndb_apply_status values(0,0,"",0,0); |
|||
if ($mysql_errno) |
|||
{ |
|||
if (!$counter) |
|||
{ |
|||
die Failed while waiting for mysqld to come out of readonly mode; |
|||
} |
|||
dec $counter; |
|||
--sleep 0.1 |
|||
} |
|||
} |
|||
delete from mysql.ndb_apply_status where server_id=0; |
|||
set sql_log_bin = @saved_log; |
|||
|
|||
--enable_query_log |
|||
|
|||
# |
|||
# connected |
|||
# |
@ -1,8 +0,0 @@ |
|||
###################################################### |
|||
# By JBM 2006-02-16 So that the code is not repeated # |
|||
# in test cases and can be reused. # |
|||
###################################################### |
|||
|
|||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT |
|||
|
|||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING" -p 8 -b $the_backup_id -n 2 -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT |
@ -1,11 +0,0 @@ |
|||
###################################################### |
|||
# By JBM 2006-03-08 So that the code is not repeated # |
|||
# in test cases and can be reused. # |
|||
###################################################### |
|||
|
|||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -p 8 -b $the_backup_id -n 1 -m -r --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT |
|||
|
|||
--exec $NDB_TOOLS_DIR/ndb_restore --no-defaults --ndb-connectstring="$NDB_CONNECTSTRING_SLAVE" -p 8 -b $the_backup_id -n 2 -r -e --print --print_meta $NDB_BACKUP_DIR/BACKUP/BACKUP-$the_backup_id >> $NDB_TOOLS_OUTPUT |
|||
|
|||
|
|||
|
@ -1,27 +0,0 @@ |
|||
# |
|||
# now setup replication to continue from last epoch |
|||
# 1. get ndb_apply_status epoch from slave |
|||
# 2. get corresponding _next_ binlog postition from master |
|||
# 3. change master on slave |
|||
|
|||
# 1. |
|||
--connection slave |
|||
--replace_column 1 <the_epoch> |
|||
SELECT @the_epoch:=MAX(epoch) FROM mysql.ndb_apply_status; |
|||
--let $the_epoch= `select @the_epoch` |
|||
|
|||
# 2. |
|||
--connection master |
|||
--replace_result $the_epoch <the_epoch> |
|||
--replace_column 1 <the_pos> |
|||
eval SELECT @the_pos:=Position,@the_file:=SUBSTRING_INDEX(FILE, '/', -1) |
|||
FROM mysql.ndb_binlog_index WHERE epoch > $the_epoch ORDER BY epoch ASC LIMIT 1; |
|||
--let $the_pos= `SELECT @the_pos` |
|||
--let $the_file= `SELECT @the_file` |
|||
|
|||
# 3. |
|||
--connection slave |
|||
--replace_result $the_pos <the_pos> |
|||
eval CHANGE MASTER TO |
|||
master_log_file = '$the_file', |
|||
master_log_pos = $the_pos ; |
@ -1,26 +0,0 @@ |
|||
# Check that mysqld has reconnected to ndbd after |
|||
# restart of ndbd |
|||
# |
|||
--disable_query_log |
|||
--disable_result_log |
|||
let $mysql_errno= 1; |
|||
let $counter= 600; |
|||
while ($mysql_errno) |
|||
{ |
|||
--error 0,157 |
|||
CREATE TABLE ndb_wait_connected (a int primary key); |
|||
if ($mysql_errno) |
|||
{ |
|||
if (!$counter) |
|||
{ |
|||
die Failed waiting for mysqld to reconnect to ndbd; |
|||
} |
|||
dec $counter; |
|||
--sleep 0.1 |
|||
} |
|||
} |
|||
DROP TABLE ndb_wait_connected; |
|||
--enable_query_log |
|||
--enable_result_log |
|||
|
|||
|
@ -1,7 +0,0 @@ |
|||
-- require r/not_ndb.require |
|||
disable_query_log; |
|||
# so that both DISABLED and NO is output as NO |
|||
-- replace_result DISABLED NO |
|||
show variables like "have_ndbcluster"; |
|||
enable_query_log; |
|||
|
@ -1,4 +0,0 @@ |
|||
--require r/not_ndb_default.require |
|||
disable_query_log; |
|||
select convert(@@storage_engine using latin1) NOT IN ("ndbcluster","NDBCLUSTER") as "TRUE"; |
|||
enable_query_log; |
Some files were not shown because too many files changed in this diff
Write
Preview
Loading…
Cancel
Save
Reference in new issue