Commit ab661dec authored by unknown's avatar unknown

Fixed portability problems in mysqlcheck


Docs/manual.texi:
  Updated TODO
client/mysqlcheck.c:
  Fixed portability problems
mysql-test/r/backup.result:
  Fixed output after format change for BACKUP TABLE
sql/ha_berkeley.cc:
  Added missing variable
sql/opt_range.cc:
  Small optimization when calculating key blocks
parent f2ef9e2b
......@@ -49219,6 +49219,8 @@ Add @code{record_in_range()} method to @code{MERGE} tables to be
able to choose the right index when there is many to choose from. We should
also extend the info interface to get the key distribution for each index,
of @code{analyze} is run on all sub tables.
@item
@code{SET SQL_DEFAULT_TABLE_TYPE=[MyISAM | INNODB | BDB | GEMINI | HEAP]}.
@end itemize
@node TODO future, TODO sometime, TODO MySQL 4.0, TODO
......@@ -158,8 +158,8 @@ static void usage(void)
-f, --force Continue even if we get an sql-error.\n\
-e, --extended If you are using this option with CHECK TABLE,\n\
it will ensure that the table is 100 percent\n\
consistent, but will take a long time.\n\
consistent, but will take a long time.\n\n");
printf("\
If you are using this option with REPAIR TABLE,\n\
it will run an extended repair on the table, which\n\
may not only take a long time to execute, but\n\
......@@ -177,8 +177,7 @@ static void usage(void)
-P, --port=... Port number to use for connection.\n\
-q, --quick If you are using this option with CHECK TABLE, it\n\
prevents the check from scanning the rows to check\n\
for wrong links. This is the fastest check.\n\
for wrong links. This is the fastest check.\n\n\
If you are using this option with REPAIR TABLE, it\n\
will try to repair only the index tree. This is\n\
the fastest repair method for a table.\n\
......
Table Op Msg_type Msg_text
t1 backup error Failed copying .frm file: errno = X
test.t1 backup error Failed copying .frm file: errno = X
test.t1 backup status Operation failed
Table Op Msg_type Msg_text
test.t1 backup status OK
......
......@@ -571,6 +571,7 @@ int ha_berkeley::open(const char *name, int mode, uint test_if_locked)
transaction=0;
cursor=0;
key_read=0;
block_size=8192; // Berkeley DB block size
share->fixed_length_row=!(table->db_create_options & HA_OPTION_PACK_RECORD);
get_status();
......
......@@ -697,7 +697,9 @@ int SQL_SELECT::test_quick_select(key_map keys_to_use, table_map prev_tables,
** and that all key blocks are half full (normally things are
** much better)
*/
uint keys_per_block= head->file->block_size/2/head->key_info[param.real_keynr[idx]].key_length+1;
uint keys_per_block= head->file->block_size/2/
(head->key_info[param.real_keynr[idx]].key_length+
head->file->ref_length) + 1;
found_read_time=((double) (found_records+keys_per_block-1)/
(double) keys_per_block);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment