summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorSergey Petrunya <psergey@askmonty.org>2014-04-29 18:33:17 +0400
committerSergey Petrunya <psergey@askmonty.org>2014-04-29 18:33:17 +0400
commit32392c05b79f1ee9ec8a1ca533d7b32b584c126c (patch)
treefd9d34f787bbaff5378bb15fbff13722ca3e300d /sql/sql_select.cc
parent54265c5f5055bc153edd8b55efd441640d941f7d (diff)
downloadmariadb-git-32392c05b79f1ee9ec8a1ca533d7b32b584c126c.tar.gz
MDEV-6185: Buildbot valgrind failure: Conditional jump or move in table_cond_selectivity
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index e4ea70ba47e..3975f0aff62 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -7342,8 +7342,11 @@ double table_cond_selectivity(JOIN *join, uint idx, JOIN_TAB *s,
*/
for (; quick_key_map & 1 ; quick_key_map>>= 1)
{
- while (keyuse->keypart == keyparts)
+ while (keyuse->table == table && keyuse->key == key &&
+ keyuse->keypart == keyparts)
+ {
keyuse++;
+ }
keyparts++;
}
sel /= table->quick_rows[key] / table->stat_records();