summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-04-21 03:03:08 +0300
committerunknown <monty@donna.mysql.fi>2001-04-21 03:03:08 +0300
commit94ab8e9c4c1ac68a119feee041b29b0fb81ed350 (patch)
treeff63dbaef15a49c7e3b47265d215520cb4cabcab /sql/opt_range.cc
parent4c5dd2f27801294f716567995c0d6e625670a9a7 (diff)
downloadmariadb-git-94ab8e9c4c1ac68a119feee041b29b0fb81ed350.tar.gz
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
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 98be3639a06..b95b97d670f 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -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);
}