~ubuntu-branches/ubuntu/hardy/mysql-dfsg-5.0/hardy-updates

« back to all changes in this revision

Viewing changes to man/myisamchk.1

  • Committer: Bazaar Package Importer
  • Author(s): sean finney
  • Date: 2007-05-13 12:32:45 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20070513123245-8c3l187dk34cz2ar
Tags: 5.0.41-2
the previous "translation changes" inadvertently introduced unrelated
changes in the package control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
.\"     Title: \fBmyisamchk\fR
2
2
.\"    Author: 
3
3
.\" Generator: DocBook XSL Stylesheets v1.70.1 <http://docbook.sf.net/>
4
 
.\"      Date: 03/20/2007
 
4
.\"      Date: 05/02/2007
5
5
.\"    Manual: MySQL Database System
6
6
.\"    Source: MySQL 5.0
7
7
.\"
8
 
.TH "\fBMYISAMCHK\fR" "1" "03/20/2007" "MySQL 5.0" "MySQL Database System"
 
8
.TH "\fBMYISAMCHK\fR" "1" "05/02/2007" "MySQL 5.0" "MySQL Database System"
9
9
.\" disable hyphenation
10
10
.nh
11
11
.\" disable justification (adjust text to left margin only)
28
28
and
29
29
\fI.MYI\fR
30
30
files for storing data and indexes).
 
31
.sp
 
32
.it 1 an-trap
 
33
.nr an-no-space-flag 1
 
34
.nr an-break-flag 1
 
35
.br
 
36
\fBCaution\fR
 
37
.PP
 
38
It is best to make a backup of a table before performing a table repair operation; under some circumstances the operation might cause data loss. Possible causes include but are not limited to filesystem errors.
31
39
.PP
32
40
Invoke
33
41
\fBmyisamchk\fR
99
107
.RS 3n
100
108
.nf
101
109
shell> \fBmyisamchk \-\-silent \-\-fast \fR\fB\fI/path/to/datadir/*/*\fR\fR\fB.MYI\fR
 
110
shell> \fBisamchk \-\-silent \fR\fB\fI/path/to/datadir/*/*\fR\fR\fB.ISM\fR
102
111
.fi
103
112
.RE
104
113
.PP
112
121
          \fB\-\-key_buffer_size=64M \-\-sort_buffer_size=64M \\\fR
113
122
          \fB\-\-read_buffer_size=1M \-\-write_buffer_size=1M \\\fR
114
123
          \fB\fI/path/to/datadir/*/*\fR\fR\fB.MYI\fR
 
124
shell> \fBisamchk \-\-silent \-\-force \-\-key_buffer_size=64M \\\fR
 
125
          \fB\-\-sort_buffer_size=64M \-\-read_buffer_size=1M \-\-write_buffer_size=1M \\\fR
 
126
          \fB\fI/path/to/datadir/*/*\fR\fR\fB.ISM\fR
115
127
.fi
116
128
.RE
117
129
.PP
119
131
\fBmyisamchk\fR, see
120
132
the section called \(lq\fBMYISAMCHK\fR MEMORY USAGE\(rq.
121
133
.PP
122
 
You must ensure that no other program is using the tables while you are running
123
 
\fBmyisamchk\fR. Otherwise, when you run
 
134
\fBMySQL Enterprise\fR. For expert advice on checking and repairing tables, subscribe to the MySQL Network Monitoring and Advisory. For more information see
 
135
\fI\%http://www.mysql.com/products/enterprise/advisors.html\fR.
 
136
.sp
 
137
.it 1 an-trap
 
138
.nr an-no-space-flag 1
 
139
.nr an-break-flag 1
 
140
.br
 
141
\fBImportant\fR
 
142
.PP
 
143
\fIYou must ensure that no other program is using the tables while you are running \fR\fI\fBmyisamchk\fR\fR. The most effective means of doing so is to shut down the MySQL server while running
 
144
\fBmyisamchk\fR, or to lock all tables that
 
145
\fBmyisamchk\fR
 
146
is being used on.
 
147
.PP
 
148
Otherwise, when you run
124
149
\fBmyisamchk\fR, it may display the following error message:
125
150
.sp
126
151
.RS 3n
131
156
.PP
132
157
This means that you are trying to check a table that has been updated by another program (such as the
133
158
\fBmysqld\fR
134
 
server) that hasn't yet closed the file or that has died without closing the file properly.
 
159
server) that hasn't yet closed the file or that has died without closing the file properly, which can sometimes lead to the corruption of one or more
 
160
MyISAM
 
161
tables.
135
162
.PP
136
163
If
137
164
\fBmysqld\fR
138
165
is running, you must force it to flush any table modifications that are still buffered in memory by using
139
166
FLUSH TABLES. You should then ensure that no one is using the tables while you are running
140
 
\fBmyisamchk\fR. The easiest way to avoid this problem is to use
 
167
\fBmyisamchk\fR
 
168
.PP
 
169
However, the easiest way to avoid this problem is to use
141
170
CHECK TABLE
142
171
instead of
143
172
\fBmyisamchk\fR
144
 
to check tables.
 
173
to check tables. See
 
174
Section\ 5.2.3, \(lqCHECK TABLE Syntax\(rq.
145
175
.SH "\fBMYISAMCHK\fR GENERAL OPTIONS"
146
176
.PP
147
177
The options described in this section can be used for any type of table maintenance operation performed by
281
311
.TE
282
312
.sp
283
313
.PP
 
314
It is also possible to set variables by using
 
315
\fB\-\-set\-variable=\fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
 
316
or
 
317
\fB\-O \fR\fB\fIvar_name\fR\fR\fB=\fR\fB\fIvalue\fR\fR
 
318
syntax. However, this syntax is deprecated as of MySQL 4.0.
 
319
.PP
284
320
The possible
285
321
\fBmyisamchk\fR
286
322
variables and their default values can be examined with
339
375
was added in MySQL 5.0.14. For older versions, the statistics collection method is equivalent to
340
376
nulls_equal.
341
377
.PP
 
378
The
 
379
ft_min_word_len
 
380
and
 
381
ft_max_word_len
 
382
variables are available as of MySQL 4.0.0.
 
383
ft_stopword_file
 
384
is available as of MySQL 4.0.19.
 
385
.PP
342
386
ft_min_word_len
343
387
and
344
388
ft_max_word_len
501
545
\fB\-\-character\-sets\-dir=\fR\fB\fIpath\fR\fR
502
546
.sp
503
547
The directory where character sets are installed. See
504
 
Section\ 9.1, \(lqThe Character Set Used for Data and Sorting\(rq.
 
548
Section\ 8.1, \(lqThe Character Set Used for Data and Sorting\(rq.
505
549
.TP 3n
506
550
\(bu
507
551
\fB\-\-correct\-checksum\fR
536
580
\fBmyisamchk \-r\fR.
537
581
.TP 3n
538
582
\(bu
 
583
\fB\-\-no\-symlinks\fR,
 
584
\fB\-l\fR
 
585
.sp
 
586
Do not follow symbolic links. Normally
 
587
\fBmyisamchk\fR
 
588
repairs the table that a symlink points to. This option does not exist as of MySQL 4.0 because versions from 4.0 on do not remove symlinks during repair operations.
 
589
.TP 3n
 
590
\(bu
539
591
\fB\-\-max\-record\-length=\fR\fB\fIlen\fR\fR
540
592
.sp
541
593
Skip rows larger than the given length if
648
700
command or the
649
701
SHOW INDEX FROM \fItbl_name\fR
650
702
statement.
 
703
.PP
 
704
\fBMySQL Enterprise\fR. For expert advice on optimizing tables, subscribe to the MySQL Network Monitoring and Advisory. For more information see
 
705
\fI\%http://www.mysql.com/products/enterprise/advisors.html\fR.
651
706
.TP 3n
652
707
\(bu
653
708
\fB\-\-block\-search=\fR\fB\fIoffset\fR\fR,
694
749
\fBmyisamchk\fR
695
750
sees them. Indexes are numbered beginning with 1.
696
751
.sp
697
 
If keys are not packed (PACK_KEYS=0)), they have the same length, so when
 
752
If keys are not packed (PACK_KEYS=0), they have the same length, so when
698
753
\fBmyisamchk\fR
699
754
sorts and moves records, it just overwrites record offsets in the index. If keys are packed (PACK_KEYS=1),
700
755
\fBmyisamchk\fR
780
835
<docs@mysql.com>
781
836
for more information.
782
837
.SH "SEE ALSO"
783
 
comp_err(1),
784
 
innochecksum(1),
785
 
make_win_bin_dist(1),
786
 
msql2mysql(1),
787
 
my_print_defaults(1),
788
 
myisam_ftdump(1),
789
 
myisamlog(1),
790
 
myisampack(1),
791
 
mysql(1),
792
 
mysql.server(1),
793
 
mysql_config(1),
794
 
mysql_convert_table_format(1),
795
 
mysql_create_system_tables(1),
796
 
mysql_explain_log(1),
797
 
mysql_fix_privilege_tables(1),
798
 
mysql_install_db(1),
799
 
mysql_setpermission(1),
800
 
mysql_tzinfo_to_sql(1),
801
 
mysql_upgrade(1),
802
 
mysql_zap(1),
803
 
mysqlaccess(1),
804
 
mysqladmin(1),
805
 
mysqlbinlog(1),
806
 
mysqlcheck(1),
807
 
mysqld(8),
808
 
mysqld_multi(1),
809
 
mysqld_safe(1),
810
 
mysqldump(1),
811
 
mysqlhotcopy(1),
812
 
mysqlimport(1),
813
 
mysqlmanager(8),
814
 
mysqlshow(1),
815
 
ndb_config(1),
816
 
ndb_cpcd(1),
817
 
ndb_delete_all(1),
818
 
ndb_desc(1),
819
 
ndb_drop_index(1),
820
 
ndb_drop_table(1),
821
 
ndb_error_reporter(1),
822
 
ndb_mgm(1),
823
 
ndb_mgmd(1),
824
 
ndb_print_backup_file(1),
825
 
ndb_print_schema_file(1),
826
 
ndb_print_sys_file(1),
827
 
ndb_restore(1),
828
 
ndb_select_all(1),
829
 
ndb_select_count(1),
830
 
ndb_show_tables(1),
831
 
ndb_size.pl(1),
832
 
ndb_waiter(1),
833
 
ndbd(1),
834
 
perror(1),
835
 
replace(1),
836
 
resolve_stack_dump(1),
837
 
resolveip(1),
838
 
safe_mysqld(1)
839
 
.P
840
838
For more information, please refer to the MySQL Reference Manual,
841
839
which may already be installed locally and which is also available
842
840
online at http://dev.mysql.com/doc/.