diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-06-11 20:20:35 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-11 20:20:35 +0200 |
commit | 810cf362eae28d4a096e0acea7efa67dd32aa05b (patch) | |
tree | 4f7b2f858e8a57022e790bcac6d88b5e3451ee0f /storage/myisam | |
parent | a99efc00a68fe2406343e63b67fc4ea58bed345a (diff) | |
parent | d199a0ffb0aac86881ea2db7dd78bc07b438dc67 (diff) | |
download | mariadb-git-810cf362eae28d4a096e0acea7efa67dd32aa05b.tar.gz |
Merge branch '5.5' into 10.0
Diffstat (limited to 'storage/myisam')
-rw-r--r-- | storage/myisam/mi_check.c | 12 | ||||
-rw-r--r-- | storage/myisam/rt_split.c | 9 |
2 files changed, 10 insertions, 11 deletions
diff --git a/storage/myisam/mi_check.c b/storage/myisam/mi_check.c index b79d6c891f1..178fff6a204 100644 --- a/storage/myisam/mi_check.c +++ b/storage/myisam/mi_check.c @@ -1944,16 +1944,8 @@ int mi_sort_index(HA_CHECK *param, register MI_INFO *info, char * name) for (key= 0,keyinfo= &share->keyinfo[0]; key < share->base.keys ; key++,keyinfo++) { - if (! mi_is_key_active(info->s->state.key_map, key)) - { - /* Since the key is not active, this should not be read, but we - initialize it anyway to silence a Valgrind warn when passing that - chunk of memory to pwrite(). */ - index_pos[key]= HA_OFFSET_ERROR; - continue; - } - - if (share->state.key_root[key] != HA_OFFSET_ERROR) + if (mi_is_key_active(info->s->state.key_map, key) && + share->state.key_root[key] != HA_OFFSET_ERROR) { index_pos[key]=param->new_file_pos; /* Write first block here */ if (sort_one_index(param,info,keyinfo,share->state.key_root[key], diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c index 9ab0bd99201..be61734e01c 100644 --- a/storage/myisam/rt_split.c +++ b/storage/myisam/rt_split.c @@ -1,5 +1,5 @@ /* - Copyright (c) 2002, 2010, Oracle and/or its affiliates + Copyright (c) 2002, 2015, Oracle and/or its affiliates This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -69,6 +69,10 @@ static double mbr_join_square(const double *a, const double *b, int n_dim) b += 2; }while (a != end); + /* Check for infinity or NaN */ + if (my_isinf(square) || isnan(square)) + square = DBL_MAX; + return square; } @@ -103,6 +107,9 @@ static void pick_seeds(SplitStruct *node, int n_entries, double max_d = -DBL_MAX; double d; + *seed_a = node; + *seed_b = node + 1; + for (cur1 = node; cur1 < lim1; ++cur1) { for (cur2=cur1 + 1; cur2 < lim2; ++cur2) |