summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorInaam Rana <inaam.rana@oracle.com>2011-12-21 21:33:13 -0500
committerInaam Rana <inaam.rana@oracle.com>2011-12-21 21:33:13 -0500
commit2cdcb18bf4f7a68fcb05e50a66e0689a513b49e2 (patch)
treeb8647fee88084494363d41338473050ed1fdf846 /storage
parent9cce451c4e95fd6005b5d572d2849997c20b3912 (diff)
downloadmariadb-git-2cdcb18bf4f7a68fcb05e50a66e0689a513b49e2.tar.gz
Bug#11866367 FPE WHEN SETTING INNODB_SPIN_WAIT_DELAY
rb://865 approved by: Jimmy Integer overflow causes division by zero.
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/include/ut0rnd.ic2
-rw-r--r--storage/innodb_plugin/include/ut0rnd.ic2
2 files changed, 2 insertions, 2 deletions
diff --git a/storage/innobase/include/ut0rnd.ic b/storage/innobase/include/ut0rnd.ic
index dc4c0d62f56..b54f629de37 100644
--- a/storage/innobase/include/ut0rnd.ic
+++ b/storage/innobase/include/ut0rnd.ic
@@ -96,7 +96,7 @@ ut_rnd_interval(
rnd = ut_rnd_gen_ulint();
- return(low + (rnd % (high - low + 1)));
+ return(low + (rnd % (high - low)));
}
/*************************************************************
diff --git a/storage/innodb_plugin/include/ut0rnd.ic b/storage/innodb_plugin/include/ut0rnd.ic
index a33813037ea..3ae12f69186 100644
--- a/storage/innodb_plugin/include/ut0rnd.ic
+++ b/storage/innodb_plugin/include/ut0rnd.ic
@@ -114,7 +114,7 @@ ut_rnd_interval(
rnd = ut_rnd_gen_ulint();
- return(low + (rnd % (high - low + 1)));
+ return(low + (rnd % (high - low)));
}
/*********************************************************//**