mySQL 5.0.11 sources for tomato
[tomato.git] / release / src / router / mysql / man / ndb_blob_tool.1
blobd0986564ea2003565a07801c8363cf915f61fa9f
1 '\" t
2 .\"     Title: \fBndb_blob_tool\fR
3 .\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
4 .\" Generator: DocBook XSL Stylesheets v1.77.1 <http://docbook.sf.net/>
5 .\"      Date: 11/04/2013
6 .\"    Manual: MySQL Database System
7 .\"    Source: MySQL 5.1
8 .\"  Language: English
9 .\"
10 .TH "\FBNDB_BLOB_TOOL\FR" "1" "11/04/2013" "MySQL 5\&.1" "MySQL Database System"
11 .\" -----------------------------------------------------------------
12 .\" * Define some portability stuff
13 .\" -----------------------------------------------------------------
14 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15 .\" http://bugs.debian.org/507673
16 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
17 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
18 .ie \n(.g .ds Aq \(aq
19 .el       .ds Aq '
20 .\" -----------------------------------------------------------------
21 .\" * set default formatting
22 .\" -----------------------------------------------------------------
23 .\" disable hyphenation
24 .nh
25 .\" disable justification (adjust text to left margin only)
26 .ad l
27 .\" -----------------------------------------------------------------
28 .\" * MAIN CONTENT STARTS HERE *
29 .\" -----------------------------------------------------------------
30 .\" ndb_blob_tool
31 .SH "NAME"
32 ndb_blob_tool \- check and repair BLOB and TEXT columns of MySQL Cluster tables
33 .SH "SYNOPSIS"
34 .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
35 \fBndb_blob_tool \fR\fB\fIoptions\fR\fR\fB \fR\fB\fItable\fR\fR\fB [\fR\fB\fIcolumn\fR\fR\fB, \&.\&.\&.]\fR
36 .SH "DESCRIPTION"
37 .PP
38 This tool, which is available in MySQL Cluster NDB 7\&.0\&.4 and later, can be used to check for and remove orphaned BLOB column parts from
39 NDB
40 tables, as well as to generate a file listing any orphaned parts\&. It is sometimes useful in diagnosing and repairing corrupted or damaged
41 NDB
42 tables containing
43 BLOB
45 TEXT
46 columns\&.
47 .PP
48 The basic syntax for
49 \fBndb_blob_tool\fR
50 is shown here:
51 .sp
52 .if n \{\
53 .RS 4
54 .\}
55 .nf
56 ndb_blob_tool [\fIoptions\fR] \fItable\fR [\fIcolumn\fR, \&.\&.\&.]
57 .fi
58 .if n \{\
59 .RE
60 .\}
61 .PP
62 Unless you use the
63 \fB\-\-help\fR
64 option, you must specify an action to be performed by including one or more of the options
65 \fB\-\-check\-orphans\fR,
66 \fB\-\-delete\-orphans\fR, or
67 \fB\-\-dump\-file\fR\&. These options cause
68 \fBndb_blob_tool\fR
69 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\&.
70 .PP
71 You must also specify the name of a table when invoking
72 \fBndb_blob_tool\fR\&. In addition, you can optionally follow the table name with the (comma\-separated) names of one or more
73 BLOB
75 TEXT
76 columns from that table\&. If no columns are listed, the tool works on all of the table\*(Aqs
77 BLOB
78 and
79 TEXT
80 columns\&. If you need to specify a database, use the
81 \fB\-\-database\fR
82 (\fB\-d\fR) option\&.
83 .PP
84 The
85 \fB\-\-verbose\fR
86 option provides additional information in the output about the tool\*(Aqs progress\&.
87 .PP
88 The following table includes options that are specific to
89 \fBndb_blob_tool\fR\&. Additional descriptions follow the table\&. For options common to most MySQL Cluster programs (including
90 \fBndb_blob_tool\fR), see
91 Options Common to MySQL Cluster Programs(1)\&.
92 .sp
93 .it 1 an-trap
94 .nr an-no-space-flag 1
95 .nr an-break-flag 1
96 .br
97 .B Table\ \&17.14.\ \&ndb_blob_tool Options and Variables: MySQL 5.1, MySQL Cluster NDB 6.3-7.1
98 .TS
99 allbox tab(:);
100 lB lB lB.
102 Format
103 T}:T{
104 Description
105 T}:T{
106 Added / Removed
109 l l l
110 l l l
111 l l l
112 l l l
113 l l l.
116 --check-orphans
117 T}:T{
118 Check for orphan blob parts
119 T}:T{
121 ADDED: NDB 7\&.0\&.4
125 --database=db_name,
128 T}:T{
129 Database to find the table in\&.
130 T}:T{
132 ADDED: NDB 7\&.0\&.4
136 --delete-orphans
137 T}:T{
138 Delete orphan blob parts
139 T}:T{
141 ADDED: NDB 7\&.0\&.4
145 --dump-file=file
146 T}:T{
147 Write orphan keys to specified file
148 T}:T{
150 ADDED: NDB 7\&.0\&.4
154 --verbose,
157 T}:T{
158 Verbose output
159 T}:T{
161 ADDED: NDB 7\&.0\&.4
164 .sp 1
166 .RS 4
167 .ie n \{\
168 \h'-04'\(bu\h'+03'\c
170 .el \{\
171 .sp -1
172 .IP \(bu 2.3
174 .\" ndb_blob_tool: check-orphans option
175 .\" check-orphans option: ndb_blob_tool
176 \fB\-\-check\-orphans\fR
178 allbox tab(:);
179 l l s s
180 l l s s
181 l l s s
182 ^ l l s
183 ^ l l s.
185 \fBIntroduced\fR
186 T}:T{
187 5\&.1\&.32\-ndb\-7\&.0\&.4
190 \fBCommand\-Line Format\fR
191 T}:T{
192 \-\-check\-orphans
195 \ \&
196 T}:T{
197 \fBPermitted Values\fR
200 \fBType\fR
201 T}:T{
202 boolean
205 \fBDefault\fR
206 T}:T{
207 FALSE
210 .sp 1
211 Check for orphaned BLOB parts in MySQL Cluster tables\&.
214 .RS 4
215 .ie n \{\
216 \h'-04'\(bu\h'+03'\c
218 .el \{\
219 .sp -1
220 .IP \(bu 2.3
222 .\" ndb_blob_tool: database option
223 .\" database option: ndb_blob_tool
224 \fB\-\-database=\fR\fB\fIdb_name\fR\fR,
225 \fB\-d\fR
227 allbox tab(:);
228 l l s s
229 l l s s
230 l l s s
231 l l s s
232 ^ l l s
233 ^ l l s.
235 \fBIntroduced\fR
236 T}:T{
237 5\&.1\&.32\-ndb\-7\&.0\&.4
240 \fBCommand\-Line Format\fR
241 T}:T{
242 \-\-database=db_name
245 \ \&
246 T}:T{
250 \ \&
251 T}:T{
252 \fBPermitted Values\fR
255 \fBType\fR
256 T}:T{
257 string
260 \fBDefault\fR
261 T}:T{
262 [none]
265 .sp 1
266 Specify the database to find the table in\&.
269 .RS 4
270 .ie n \{\
271 \h'-04'\(bu\h'+03'\c
273 .el \{\
274 .sp -1
275 .IP \(bu 2.3
277 .\" ndb_blob_tool: delete-orphans option
278 .\" delete-orphans option: ndb_blob_tool
279 \fB\-\-delete\-orphans\fR
281 allbox tab(:);
282 l l s s
283 l l s s
284 l l s s
285 ^ l l s
286 ^ l l s.
288 \fBIntroduced\fR
289 T}:T{
290 5\&.1\&.32\-ndb\-7\&.0\&.4
293 \fBCommand\-Line Format\fR
294 T}:T{
295 \-\-delete\-orphans
298 \ \&
299 T}:T{
300 \fBPermitted Values\fR
303 \fBType\fR
304 T}:T{
305 boolean
308 \fBDefault\fR
309 T}:T{
310 FALSE
313 .sp 1
314 Remove orphaned BLOB parts from MySQL Cluster tables\&.
317 .RS 4
318 .ie n \{\
319 \h'-04'\(bu\h'+03'\c
321 .el \{\
322 .sp -1
323 .IP \(bu 2.3
325 .\" ndb_blob_tool: dump-file option
326 .\" dump-file option: ndb_blob_tool
327 \fB\-\-dump\-file=\fR\fB\fIfile\fR\fR
329 allbox tab(:);
330 l l s s
331 l l s s
332 l l s s
333 ^ l l s
334 ^ l l s.
336 \fBIntroduced\fR
337 T}:T{
338 5\&.1\&.32\-ndb\-7\&.0\&.4
341 \fBCommand\-Line Format\fR
342 T}:T{
343 \-\-dump\-file=file
346 \ \&
347 T}:T{
348 \fBPermitted Values\fR
351 \fBType\fR
352 T}:T{
353 file name
356 \fBDefault\fR
357 T}:T{
358 [none]
361 .sp 1
362 Writes a list of orphaned BLOB column parts to
363 \fIfile\fR\&. The information written to the file includes the table key and BLOB part number for each orphaned BLOB part\&.
366 .RS 4
367 .ie n \{\
368 \h'-04'\(bu\h'+03'\c
370 .el \{\
371 .sp -1
372 .IP \(bu 2.3
374 .\" ndb_blob_tool: verbose option
375 .\" verbose option: ndb_blob_tool
376 \fB\-\-verbose\fR
378 allbox tab(:);
379 l l s s
380 l l s s
381 l l s s
382 l l s s
383 ^ l l s
384 ^ l l s.
386 \fBIntroduced\fR
387 T}:T{
388 5\&.1\&.32\-ndb\-7\&.0\&.4
391 \fBCommand\-Line Format\fR
392 T}:T{
393 \-\-verbose
396 \ \&
397 T}:T{
401 \ \&
402 T}:T{
403 \fBPermitted Values\fR
406 \fBType\fR
407 T}:T{
408 boolean
411 \fBDefault\fR
412 T}:T{
413 FALSE
416 .sp 1
417 Provide extra information in the tool\*(Aqs output regarding its progress\&.
419         Example
421 First we create an
423 table in the
424 test
425 database, using the
426 CREATE TABLE
427 statement shown here:
429 .if n \{\
430 .RS 4
433 USE test;
434 CREATE TABLE btest (
435     c0 BIGINT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, 
436     c1 TEXT, 
437     c2 BLOB
438 )   ENGINE=NDB;
440 .if n \{\
444 Then we insert a few rows into this table, using a series of statements similar to this one:
446 .if n \{\
447 .RS 4
450 INSERT INTO btest VALUES (NULL, \*(Aqx\*(Aq, REPEAT(\*(Aqx\*(Aq, 1000));
452 .if n \{\
456 When run with
457 \fB\-\-check\-orphans\fR
458 against this table,
459 \fBndb_blob_tool\fR
460 generates the following output:
462 .if n \{\
463 .RS 4
466 shell> \fBndb_blob_tool \-\-check\-orphans \-\-verbose \-d test btest\fR
467 connected
468 processing 2 blobs
469 processing blob #0 c1 NDB$BLOB_19_1
470 NDB$BLOB_19_1: nextResult: res=1
471 total parts: 0
472 orphan parts: 0
473 processing blob #1 c2 NDB$BLOB_19_2
474 NDB$BLOB_19_2: nextResult: res=0
475 NDB$BLOB_19_2: nextResult: res=0
476 NDB$BLOB_19_2: nextResult: res=0
477 NDB$BLOB_19_2: nextResult: res=0
478 NDB$BLOB_19_2: nextResult: res=0
479 NDB$BLOB_19_2: nextResult: res=0
480 NDB$BLOB_19_2: nextResult: res=0
481 NDB$BLOB_19_2: nextResult: res=0
482 NDB$BLOB_19_2: nextResult: res=0
483 NDB$BLOB_19_2: nextResult: res=0
484 NDB$BLOB_19_2: nextResult: res=1
485 total parts: 10
486 orphan parts: 0
487 disconnected
488 NDBT_ProgramExit: 0 \- OK
490 .if n \{\
494 The tool reports that there are no
496 BLOB column parts associated with column
497 c1, even though
499 is a
500 TEXT
501 column\&. This is due to the fact that, in an
503 table, only the first 256 bytes of a
504 BLOB
506 TEXT
507 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
508 BLOB
509 column parts are created by
511 for this column\&. See
512 Section\ \&11.6, \(lqData Type Storage Requirements\(rq, for more information\&.
513 .SH "COPYRIGHT"
516 Copyright \(co 1997, 2013, Oracle and/or its affiliates. All rights reserved.
518 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.
520 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.
522 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/.
524 .SH "SEE ALSO"
525 For more information, please refer to the MySQL Reference Manual,
526 which may already be installed locally and which is also available
527 online at http://dev.mysql.com/doc/.
528 .SH AUTHOR
529 Oracle Corporation (http://dev.mysql.com/).