'\" t .\" Title: ndb_blob_tool .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 03/11/2024 .\" Manual: MySQL Database System .\" Source: MySQL 8.4 .\" Language: English .\" .TH "NDB_BLOB_TOOL" "1" "03/11/2024" "MySQL 8\&.4" "MySQL Database System" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" ndb_blob_tool \- check and repair BLOB and TEXT columns of NDB Cluster tables .SH "SYNOPSIS" .HP \w'\fBndb_blob_tool\ \fR\fB\fIoptions\fR\fR\fB\ \fR\fB\fItable\fR\fR\fB\ [\fR\fB\fIcolumn\fR\fR\fB,\ \&.\&.\&.]\fR\ 'u \fBndb_blob_tool \fR\fB\fIoptions\fR\fR\fB \fR\fB\fItable\fR\fR\fB [\fR\fB\fIcolumn\fR\fR\fB, \&.\&.\&.]\fR .SH "DESCRIPTION" .PP This tool can be used to check for and remove orphaned BLOB column parts from NDB tables, as well as to generate a file listing any orphaned parts\&. It is sometimes useful in diagnosing and repairing corrupted or damaged NDB tables containing BLOB or TEXT columns\&. .PP The basic syntax for \fBndb_blob_tool\fR is shown here: .sp .if n \{\ .RS 4 .\} .nf ndb_blob_tool [\fIoptions\fR] \fItable\fR [\fIcolumn\fR, \&.\&.\&.] .fi .if n \{\ .RE .\} .PP Unless you use the \fB\-\-help\fR option, you must specify an action to be performed by including one or more of the options \fB\-\-check\-orphans\fR, \fB\-\-delete\-orphans\fR, or \fB\-\-dump\-file\fR\&. These options cause \fBndb_blob_tool\fR to check for orphaned BLOB parts, remove any orphaned BLOB parts, and generate a dump file listing orphaned BLOB parts, respectively, and are described in more detail later in this section\&. .PP You must also specify the name of a table when invoking \fBndb_blob_tool\fR\&. In addition, you can optionally follow the table name with the (comma\-separated) names of one or more BLOB or TEXT columns from that table\&. If no columns are listed, the tool works on all of the table\*(Aqs BLOB and TEXT columns\&. If you need to specify a database, use the \fB\-\-database\fR (\fB\-d\fR) option\&. .PP The \fB\-\-verbose\fR option provides additional information in the output about the tool\*(Aqs progress\&. .PP All options that can be used with \fBndb_mgmd\fR are shown in the following table\&. Additional descriptions follow the table\&. .PP .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-add\-missing\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --add-missing T} .TE .sp 1 For each inline part in NDB Cluster tables which has no corresponding BLOB part, write a dummy BLOB part of the required length, consisting of spaces\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-character\-sets\-dir\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --character-sets-dir=path T} .TE .sp 1 Directory containing character sets\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-check\-missing\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --check-missing T} .TE .sp 1 Check for inline parts in NDB Cluster tables which have no corresponding BLOB parts\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-check\-orphans\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --check-orphans T} .TE .sp 1 Check for BLOB parts in NDB Cluster tables which have no corresponding inline parts\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-connect\-retries\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --connect-retries=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 12 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 12 T} .TE .sp 1 Number of times to retry connection before giving up\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-connect\-retry\-delay\fR .TS allbox tab(:); lB l lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --connect-retry-delay=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ 5 T} T{ Minimum Value T}:T{ 0 T} T{ Maximum Value T}:T{ 5 T} .TE .sp 1 Number of seconds to wait between attempts to contact management server\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-connect\-string\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --connect-string=connection_string T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Same as \fB\-\-ndb\-connectstring\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-core\-file\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --core-file T} .TE .sp 1 Write core file on error; used in debugging\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-database=\fR\fB\fIdb_name\fR\fR, \fB\-d\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --database=name T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Specify the database to find the table in\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-defaults\-extra\-file\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --defaults-extra-file=path T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Read given file after global files are read\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-defaults\-file\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --defaults-file=path T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Read default options from given file only\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-defaults\-group\-suffix\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --defaults-group-suffix=string T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Also read groups with concat(group, suffix)\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-delete\-orphans\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --delete-orphans T} .TE .sp 1 Remove BLOB parts from NDB Cluster tables which have no corresponding inline parts\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-dump\-file=\fR\fB\fIfile\fR\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --dump-file=file T} T{ Type T}:T{ File name T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Writes a list of orphaned BLOB column parts to \fIfile\fR\&. The information written to the file includes the table key and BLOB part number for each orphaned BLOB part\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-help\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --help T} .TE .sp 1 Display help text and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-login\-path\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --login-path=path T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Read given path from login file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-no\-login\-paths\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --no-login-paths T} .TE .sp 1 Skips reading options from the login path file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-connectstring\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-connectstring=connection_string T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Set connection string for connecting to \fBndb_mgmd\fR\&. Syntax: [nodeid=\fIid\fR;][host=]\fIhostname\fR[:\fIport\fR]\&. Overrides entries in NDB_CONNECTSTRING and my\&.cnf\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-mgm\-tls\fR .TS allbox tab(:); lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-mgm-tls=level T} T{ Type T}:T{ Enumeration T} T{ Default Value T}:T{ relaxed T} T{ Valid Values T}:T{ .PP relaxed .PP strict T} .TE .sp 1 Sets the level of TLS support required to connect to the management server; one of relaxed or strict\&. relaxed (the default) means that a TLS connection is attempted, but success is not required; strict means that TLS is required to connect\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-mgmd\-host\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-mgmd-host=connection_string T} T{ Type T}:T{ String T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Same as \fB\-\-ndb\-connectstring\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-nodeid\fR .TS allbox tab(:); lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-nodeid=# T} T{ Type T}:T{ Integer T} T{ Default Value T}:T{ [none] T} .TE .sp 1 Set node ID for this node, overriding any ID set by \-\-ndb\-connectstring\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-optimized\-node\-selection\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --ndb-optimized-node-selection T} .TE .sp 1 Enable optimizations for selection of nodes for transactions\&. Enabled by default; use \fB\-\-skip\-ndb\-optimized\-node\-selection\fR to disable\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-ndb\-tls\-search\-path\fR .TS allbox tab(:); lB l lB l lB l lB l. T{ Command-Line Format T}:T{ --ndb-tls-search-path=list T} T{ Type T}:T{ Path name T} T{ Default Value (Unix) T}:T{ $HOME/ndb-tls T} T{ Default Value (Windows) T}:T{ $HOMEDIR/ndb-tls T} .TE .sp 1 Specify a list of directories to search for a CA file\&. On Unix platforms, the directory names are separated by colons (:); on Windows systems, the semicolon character (;) is used as the separator\&. A directory reference may be relative or absolute; it may contain one or more environment variables, each denoted by a prefixed dollar sign ($), and expanded prior to use\&. .sp Searching begins with the leftmost named directory and proceeds from left to right until a file is found\&. An empty string denotes an empty search path, which causes all searches to fail\&. A string consisting of a single dot (\&.) indicates that the search path limited to the current working directory\&. .sp If no search path is supplied, the compiled\-in default value is used\&. This value depends on the platform used: On Windows, this is \endb\-tls; on other platforms (including Linux), it is $HOME/ndb\-tls\&. This can be overridden by compiling NDB Cluster using \fB\-DWITH_NDB_TLS_SEARCH_PATH\fR\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-no\-defaults\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --no-defaults T} .TE .sp 1 Do not read default options from any option file other than login file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-print\-defaults\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --print-defaults T} .TE .sp 1 Print program argument list and exit\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-usage\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --usage T} .TE .sp 1 Display help text and exit; same as \-\-help\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-verbose\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --verbose T} .TE .sp 1 Provide extra information in the tool\*(Aqs output regarding its progress\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} \fB\-\-version\fR .TS allbox tab(:); lB l. T{ Command-Line Format T}:T{ --version T} .TE .sp 1 Display version information and exit\&. .RE Example .PP First we create an NDB table in the test database, using the CREATE TABLE statement shown here: .sp .if n \{\ .RS 4 .\} .nf USE test; CREATE TABLE btest ( c0 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, c1 TEXT, c2 BLOB ) ENGINE=NDB; .fi .if n \{\ .RE .\} .PP Then we insert a few rows into this table, using a series of statements similar to this one: .sp .if n \{\ .RS 4 .\} .nf INSERT INTO btest VALUES (NULL, \*(Aqx\*(Aq, REPEAT(\*(Aqx\*(Aq, 1000)); .fi .if n \{\ .RE .\} .PP When run with \fB\-\-check\-orphans\fR against this table, \fBndb_blob_tool\fR generates the following output: .sp .if n \{\ .RS 4 .\} .nf $> \fBndb_blob_tool \-\-check\-orphans \-\-verbose \-d test btest\fR connected processing 2 blobs processing blob #0 c1 NDB$BLOB_19_1 NDB$BLOB_19_1: nextResult: res=1 total parts: 0 orphan parts: 0 processing blob #1 c2 NDB$BLOB_19_2 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=0 NDB$BLOB_19_2: nextResult: res=1 total parts: 10 orphan parts: 0 disconnected .fi .if n \{\ .RE .\} .PP The tool reports that there are no NDB BLOB column parts associated with column c1, even though c1 is a TEXT column\&. This is due to the fact that, in an NDB table, only the first 256 bytes of a BLOB or TEXT column value are stored inline, and only the excess, if any, is stored separately; thus, if there are no values using more than 256 bytes in a given column of one of these types, no BLOB column parts are created by NDB for this column\&. See Section\ \&13.7, \(lqData Type Storage Requirements\(rq, for more information\&. .SH "COPYRIGHT" .br .PP Copyright \(co 1997, 2024, Oracle and/or its affiliates. .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 "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 Oracle Corporation (http://dev.mysql.com/).