Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
4eaaddec
Commit
4eaaddec
authored
Oct 23, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into mysql.com:/home/hf/work/30638/my50-30638
parents
4cc7db9d
d61d1880
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
sql/ha_heap.cc
sql/ha_heap.cc
+1
-1
sql/opt_range.cc
sql/opt_range.cc
+3
-3
No files found.
sql/ha_heap.cc
View file @
4eaaddec
...
...
@@ -175,7 +175,7 @@ void ha_heap::update_key_stats()
else
{
ha_rows
hash_buckets
=
file
->
s
->
keydef
[
i
].
hash_buckets
;
uint
no_records
=
hash_buckets
?
(
uint
)
file
->
s
->
records
/
hash_buckets
:
2
;
uint
no_records
=
hash_buckets
?
(
uint
)
(
file
->
s
->
records
/
hash_buckets
)
:
2
;
if
(
no_records
<
2
)
no_records
=
2
;
key
->
rec_per_key
[
key
->
key_parts
-
1
]
=
no_records
;
...
...
sql/opt_range.cc
View file @
4eaaddec
...
...
@@ -8376,14 +8376,14 @@ void cost_group_min_max(TABLE* table, KEY *index_info, uint used_key_parts,
keys_per_block
=
(
table
->
file
->
block_size
/
2
/
(
index_info
->
key_length
+
table
->
file
->
ref_length
)
+
1
);
num_blocks
=
(
table_records
/
keys_per_block
)
+
1
;
num_blocks
=
(
uint
)(
table_records
/
keys_per_block
)
+
1
;
/* Compute the number of keys in a group. */
keys_per_group
=
index_info
->
rec_per_key
[
group_key_parts
-
1
];
if
(
keys_per_group
==
0
)
/* If there is no statistics try to guess */
/* each group contains 10% of all records */
keys_per_group
=
(
table_records
/
10
)
+
1
;
num_groups
=
(
table_records
/
keys_per_group
)
+
1
;
keys_per_group
=
(
uint
)(
table_records
/
10
)
+
1
;
num_groups
=
(
uint
)(
table_records
/
keys_per_group
)
+
1
;
/* Apply the selectivity of the quick select for group prefixes. */
if
(
range_tree
&&
(
quick_prefix_records
!=
HA_POS_ERROR
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment