#At file:///data0/magnus/mysql/trunk-cluster/ based on revid:magnus.blaudd@stripped
3313 magnus.blaudd@stripped 2011-06-08
ndb
- remove subtraction of extra_length from key_length, since key_length
no longer includes null bytes etc.
modified:
sql/ha_ndbcluster.cc
=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc 2011-05-20 11:50:50 +0000
+++ b/sql/ha_ndbcluster.cc 2011-06-08 11:25:40 +0000
@@ -11116,14 +11116,11 @@ ha_ndbcluster::records_in_range(uint inx
else
{
// Has an equality range on a leading part of 'key_length':
- // - Null indicator, and HA_KEY_BLOB_LENGTH bytes in
- // 'extra_length' are removed from key_fraction calculations.
// - Assume reduced selectivity for non-unique indexes
// by decreasing 'eq_fraction' by 20%
// - Assume equal selectivity for all eq_parts in key.
- double eq_fraction = (double)(eq_bound_len) /
- (key_length - key_info->extra_length);
+ double eq_fraction = (double)(eq_bound_len) / key_length;
if (idx_type == ORDERED_INDEX) // Non-unique index -> less selectivity
eq_fraction/= 1.20;
if (eq_fraction >= 1.0) // Exact match -> 1 row
Attachment: [text/bzr-bundle] bzr/magnus.blaudd@oracle.com-20110608112540-hudbq0j7ixb3x0lv.bundle
| Thread |
|---|
| • bzr commit into mysql-trunk-cluster branch (magnus.blaudd:3313) | magnus.blaudd | 8 Jun |