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
commit3953b489714ee5eaf329894256e7fa56a7698d6b (patch)
treeb8647fee88084494363d41338473050ed1fdf846 /storage
parentb4864c8f8a63a841f73da01ef79eff55d1b26897 (diff)
downloadmariadb-git-3953b489714ee5eaf329894256e7fa56a7698d6b.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)));
}
/*********************************************************//**