1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

Fixed portability problems in mysqlcheck

This commit is contained in:
monty@donna.mysql.fi
2001-04-21 03:03:08 +03:00
parent c8fbe93890
commit 0f37b1244b
5 changed files with 10 additions and 6 deletions

View File

@ -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

View File

@ -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\

View File

@ -1,5 +1,5 @@
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

View File

@ -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();

View File

@ -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);
}