summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--storage/myisam/rt_split.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/storage/myisam/rt_split.c b/storage/myisam/rt_split.c
index 955a69c6588..d37084f79b8 100644
--- a/storage/myisam/rt_split.c
+++ b/storage/myisam/rt_split.c
@@ -68,6 +68,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;
}
@@ -102,6 +106,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)