summaryrefslogtreecommitdiff
path: root/sql/opt_subselect.cc
diff options
context:
space:
mode:
authorIgor Babaev <igor@askmonty.org>2011-12-11 19:41:53 -0800
committerIgor Babaev <igor@askmonty.org>2011-12-11 19:41:53 -0800
commit63d32c115dd962b53cf7bcaa340472ee2f44f9e2 (patch)
tree0ab189512324810847cfb828ef3212206b1385a1 /sql/opt_subselect.cc
parent9b4cd1b0aeb869a6adfe7ad7a530cde27e37bc9e (diff)
downloadmariadb-git-63d32c115dd962b53cf7bcaa340472ee2f44f9e2.tar.gz
Fixed LP bug #901709.
The cause of the reported assertion failure was a division of a double value by 0.
Diffstat (limited to 'sql/opt_subselect.cc')
-rw-r--r--sql/opt_subselect.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/opt_subselect.cc b/sql/opt_subselect.cc
index 217966eb296..ff0b80acb0e 100644
--- a/sql/opt_subselect.cc
+++ b/sql/opt_subselect.cc
@@ -2629,7 +2629,8 @@ bool Firstmatch_picker::check_qep(JOIN *join,
- read_time is the same (i.e. FirstMatch doesn't add any cost
- remove fanout added by the last table
*/
- *record_count /= join->positions[idx].records_read;
+ if (*record_count)
+ *record_count /= join->positions[idx].records_read;
}
else
{