summaryrefslogtreecommitdiff
path: root/storage/myisam/rt_split.c
diff options
context:
space:
mode:
authorSergei Golubchik <serg@mariadb.org>2015-06-05 02:06:51 +0200
committerSergei Golubchik <serg@mariadb.org>2015-06-05 02:06:51 +0200
commitf84f577aa15a193f24c3119eafdee554cb9775fb (patch)
treeee531580839374516db09b2409ec4bd57a847e8a /storage/myisam/rt_split.c
parentf07b3463e7a4ff32316e1cc94d553b5009ac51f2 (diff)
parent31c803e8d0543b330aa8e61ef878da43fe1f68f7 (diff)
downloadmariadb-git-f84f577aa15a193f24c3119eafdee554cb9775fb.tar.gz
Merge tag 'mysql-5.5.44' into bb-5.5-serg
Diffstat (limited to 'storage/myisam/rt_split.c')
-rw-r--r--storage/myisam/rt_split.c9
1 files changed, 8 insertions, 1 deletions
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)