~clint-fewbar/ubuntu/natty/mysql-5.1/merge-5.1.49-2

« back to all changes in this revision

Viewing changes to storage/myisam/myisamchk.c

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-08-04 13:18:27 UTC
  • mfrom: (1.2.2 upstream) (2.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100804131827-4tjg88vr9dd49s3k
Tags: 5.1.49-1ubuntu1
* Merge from debian unstable:
  + debian/control:
     * Update maintainer according to spec.
     * Move section from "misc" to "database".
     * Added libmysqlclient16-dev an empty transitional package. 
     * Added mysql-client-core-5.1 package.
     * Suggest mailx for mysql-server-5.1
     * Add mysql-testsuite package so you can run the testsuite seperately.
  + debian/additions/my.cnf:
    * Remove language options. Error message files are located in a different directory in Mysql
      5.0. Setting the language option to use /usr/share/mysql/english breaks Mysql 5.0. Both 5.0
      and 5.1 use a different value that works. (LP: #316974)
  + Add apparmor profile:
    + debian/apparmor-profile: apparmor-profile
    + debian/rules, debian/mysql-server-5.1.files: install apparmor profile
    + debian/mysql-server-5.1.dirs: add etc/apparmor.d/fore-complain
    + debian/mysql-server-5.1.postrm: remove symlink in force-complain/ on purge.
    + debian/mysql-server-5.1.README.Debian: add apparmor documentation.
    + debian/additions/my.cnf: Add warning about apparmor. (LP: #201799)
    + debian/mysql-server-5.1.postinst: reload apparmor profiles
  * Convert the package from sysvinit to upstart:
    + debian/mysql-server-5.1.mysql.upstart: Add upstart script.
    + debian/mysql-server-5.1.mysql.init: Dropped, unused now with upstart.
    + debian/additions/mysqld_safe_syslog.cnf: Dropped, unused now with upstart.
    + debian/additons/my.cnf: Remove pid declaration and setup error logging to /var/log/mysql since
      we're not piping anything around logger anymore.
    + debian/rules, debian/mysql-server-5.1.logcheck.ignore.{paranoid,worstation},
      debian/mysql-server-5.1.logcheck.ignore.server: : Remove references to mysqld_safe
    + debian/patches/38_scripts_mysqld_safe.sh_signals.dpatch: Dropped
  * Added -fno-strict-aliasing to CFLAGS to get around mysql testsuite build failures.
  * Add Apport hook (LP: #354188):
    + debian/mysql-server-5.1.py: apport package hook
    + debian/rules: Make it installable
  * debian/mysql-server-5.1.mysql-server.logrotate: Check to see if mysql is running before
    running logrotate. (LP: #513135)
  * Make the testsuite installable. (LP: #530752)
    + debian/mysql-server-5.1.files, debian/rules: install apport package hook
  * debian/mysql-server-5.1.preinst: Set mysql user's home directory
    to /nonexistent to protect against having the /var/lib/mysql
    user-writeable. If an attacker can trick mysqld into creating
    dot files in the home directory, he could do .rhost-like attacks
    on the system. (LP: #293258)
  * debian/control: mysql-client-5.1 should depend on mysql-core-client-5.1.
    (LP: #590952) 

Show diffs side-by-side

added added

removed removed

Lines of Context:
168
168
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
169
169
  {"character-sets-dir", OPT_CHARSETS_DIR,
170
170
   "Directory where character sets are.",
171
 
   (uchar**) &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
171
   &charsets_dir, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
172
172
  {"check", 'c',
173
173
   "Check table for errors.",
174
174
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
188
188
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
189
189
  {"data-file-length", 'D',
190
190
   "Max length of data file (when recreating data-file when it's full).",
191
 
   (uchar**) &check_param.max_data_file_length,
192
 
   (uchar**) &check_param.max_data_file_length,
 
191
   &check_param.max_data_file_length,
 
192
   &check_param.max_data_file_length,
193
193
   0, GET_LL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
194
194
  {"extend-check", 'e',
195
195
   "If used when checking a table, ensure that the table is 100 percent consistent, which will take a long time. If used when repairing a table, try to recover every possible row from the data file. Normally this will also find a lot of garbage rows; Don't use this option with repair if you are not totally desperate.",
211
211
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
212
212
  {"keys-used", 'k',
213
213
   "Tell MyISAM to update only some specific keys. # is a bit mask of which keys to use. This can be used to get faster inserts.",
214
 
   (uchar**) &check_param.keys_in_use,
215
 
   (uchar**) &check_param.keys_in_use,
 
214
   &check_param.keys_in_use,
 
215
   &check_param.keys_in_use,
216
216
   0, GET_ULL, REQUIRED_ARG, -1, 0, 0, 0, 0, 0},
217
217
  {"max-record-length", OPT_MAX_RECORD_LENGTH,
218
218
   "Skip rows bigger than this if myisamchk can't allocate memory to hold it",
219
 
   (uchar**) &check_param.max_record_length,
220
 
   (uchar**) &check_param.max_record_length,
 
219
   &check_param.max_record_length,
 
220
   &check_param.max_record_length,
221
221
   0, GET_ULL, REQUIRED_ARG, LONGLONG_MAX, 0, LONGLONG_MAX, 0, 0, 0},
222
222
  {"medium-check", 'm',
223
223
   "Faster than extend-check, but only finds 99.99% of all errors. Should be good enough for most cases.",
246
246
#endif
247
247
  {"set-auto-increment", 'A',
248
248
   "Force auto_increment to start at this or higher value. If no value is given, then sets the next auto_increment value to the highest used value for the auto key + 1.",
249
 
   (uchar**) &check_param.auto_increment_value,
250
 
   (uchar**) &check_param.auto_increment_value,
 
249
   &check_param.auto_increment_value,
 
250
   &check_param.auto_increment_value,
251
251
   0, GET_ULL, OPT_ARG, 0, 0, 0, 0, 0, 0},
252
252
  {"set-collation", OPT_SET_COLLATION,
253
253
   "Change the collation used by the index",
254
 
   (uchar**) &set_collation_name, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
 
254
   &set_collation_name, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
255
255
  {"set-variable", 'O',
256
256
   "Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
257
257
   0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
263
263
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
264
264
  {"sort-records", 'R',
265
265
   "Sort records according to an index. This makes your data much more localized and may speed up things. (It may be VERY slow to do a sort the first time!)",
266
 
   (uchar**) &check_param.opt_sort_key,
267
 
   (uchar**) &check_param.opt_sort_key,
 
266
   &check_param.opt_sort_key,
 
267
   &check_param.opt_sort_key,
268
268
   0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
269
269
  {"tmpdir", 't',
270
270
   "Path for temporary files.",
271
 
   (uchar**) &opt_tmpdir,
 
271
   &opt_tmpdir,
272
272
   0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
273
273
  {"update-state", 'U',
274
274
   "Mark tables as crashed if any errors were found.",
286
286
   "Wait if table is locked.",
287
287
   0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
288
288
  { "key_buffer_size", OPT_KEY_BUFFER_SIZE, "",
289
 
    (uchar**) &check_param.use_buffers, (uchar**) &check_param.use_buffers, 0,
 
289
    &check_param.use_buffers, &check_param.use_buffers, 0,
290
290
    GET_ULL, REQUIRED_ARG, USE_BUFFER_INIT, MALLOC_OVERHEAD,
291
291
    SIZE_T_MAX, MALLOC_OVERHEAD,  IO_SIZE, 0},
292
292
  { "key_cache_block_size", OPT_KEY_CACHE_BLOCK_SIZE,  "",
293
 
    (uchar**) &opt_key_cache_block_size,
294
 
    (uchar**) &opt_key_cache_block_size, 0,
 
293
    &opt_key_cache_block_size,
 
294
    &opt_key_cache_block_size, 0,
295
295
    GET_LONG, REQUIRED_ARG, MI_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH,
296
296
    MI_MAX_KEY_BLOCK_LENGTH, 0, MI_MIN_KEY_BLOCK_LENGTH, 0},
297
297
  { "myisam_block_size", OPT_MYISAM_BLOCK_SIZE,  "",
298
 
    (uchar**) &opt_myisam_block_size, (uchar**) &opt_myisam_block_size, 0,
 
298
    &opt_myisam_block_size, &opt_myisam_block_size, 0,
299
299
    GET_LONG, REQUIRED_ARG, MI_KEY_BLOCK_LENGTH, MI_MIN_KEY_BLOCK_LENGTH,
300
300
    MI_MAX_KEY_BLOCK_LENGTH, 0, MI_MIN_KEY_BLOCK_LENGTH, 0},
301
301
  { "read_buffer_size", OPT_READ_BUFFER_SIZE, "",
302
 
    (uchar**) &check_param.read_buffer_length,
303
 
    (uchar**) &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
 
302
    &check_param.read_buffer_length,
 
303
    &check_param.read_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
304
304
    (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD,
305
305
    INT_MAX32, (long) MALLOC_OVERHEAD, (long) 1L, 0},
306
306
  { "write_buffer_size", OPT_WRITE_BUFFER_SIZE, "",
307
 
    (uchar**) &check_param.write_buffer_length,
308
 
    (uchar**) &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
 
307
    &check_param.write_buffer_length,
 
308
    &check_param.write_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
309
309
    (long) READ_BUFFER_INIT, (long) MALLOC_OVERHEAD,
310
310
    INT_MAX32, (long) MALLOC_OVERHEAD, (long) 1L, 0},
311
311
  { "sort_buffer_size", OPT_SORT_BUFFER_SIZE, "",
312
 
    (uchar**) &check_param.sort_buffer_length,
313
 
    (uchar**) &check_param.sort_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
 
312
    &check_param.sort_buffer_length,
 
313
    &check_param.sort_buffer_length, 0, GET_ULONG, REQUIRED_ARG,
314
314
    (long) SORT_BUFFER_INIT, (long) (MIN_SORT_BUFFER + MALLOC_OVERHEAD),
315
315
    ULONG_MAX, (long) MALLOC_OVERHEAD, (long) 1L, 0},
316
316
  { "sort_key_blocks", OPT_SORT_KEY_BLOCKS, "",
317
 
    (uchar**) &check_param.sort_key_blocks,
318
 
    (uchar**) &check_param.sort_key_blocks, 0, GET_ULONG, REQUIRED_ARG,
 
317
    &check_param.sort_key_blocks,
 
318
    &check_param.sort_key_blocks, 0, GET_ULONG, REQUIRED_ARG,
319
319
    BUFFERS_WHEN_SORTING, 4L, 100L, 0L, 1L, 0},
320
 
  { "decode_bits", OPT_DECODE_BITS, "", (uchar**) &decode_bits,
321
 
    (uchar**) &decode_bits, 0, GET_UINT, REQUIRED_ARG, 9L, 4L, 17L, 0L, 1L, 0},
322
 
  { "ft_min_word_len", OPT_FT_MIN_WORD_LEN, "", (uchar**) &ft_min_word_len,
323
 
    (uchar**) &ft_min_word_len, 0, GET_ULONG, REQUIRED_ARG, 4, 1, HA_FT_MAXCHARLEN,
 
320
  { "decode_bits", OPT_DECODE_BITS, "", &decode_bits,
 
321
    &decode_bits, 0, GET_UINT, REQUIRED_ARG, 9L, 4L, 17L, 0L, 1L, 0},
 
322
  { "ft_min_word_len", OPT_FT_MIN_WORD_LEN, "", &ft_min_word_len,
 
323
    &ft_min_word_len, 0, GET_ULONG, REQUIRED_ARG, 4, 1, HA_FT_MAXCHARLEN,
324
324
    0, 1, 0},
325
 
  { "ft_max_word_len", OPT_FT_MAX_WORD_LEN, "", (uchar**) &ft_max_word_len,
326
 
    (uchar**) &ft_max_word_len, 0, GET_ULONG, REQUIRED_ARG, HA_FT_MAXCHARLEN, 10,
 
325
  { "ft_max_word_len", OPT_FT_MAX_WORD_LEN, "", &ft_max_word_len,
 
326
    &ft_max_word_len, 0, GET_ULONG, REQUIRED_ARG, HA_FT_MAXCHARLEN, 10,
327
327
    HA_FT_MAXCHARLEN, 0, 1, 0},
328
328
  { "ft_stopword_file", OPT_FT_STOPWORD_FILE,
329
329
    "Use stopwords from this file instead of built-in list.",
330
 
    (uchar**) &ft_stopword_file, (uchar**) &ft_stopword_file, 0, GET_STR,
 
330
    &ft_stopword_file, &ft_stopword_file, 0, GET_STR,
331
331
    REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
332
332
  {"stats_method", OPT_STATS_METHOD,
333
333
   "Specifies how index statistics collection code should treat NULLs. "
334
334
   "Possible values of name are \"nulls_unequal\" (default behavior for 4.1/5.0), "
335
335
   "\"nulls_equal\" (emulate 4.0 behavior), and \"nulls_ignored\".",
336
 
   (uchar**) &myisam_stats_method_str, (uchar**) &myisam_stats_method_str, 0,
 
336
   &myisam_stats_method_str, &myisam_stats_method_str, 0,
337
337
    GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
338
338
  { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
339
339
};