summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorNeeraj Bisht <neeraj.x.bisht@oracle.com>2013-01-29 10:06:31 +0530
committerNeeraj Bisht <neeraj.x.bisht@oracle.com>2013-01-29 10:06:31 +0530
commit5a4cdc5f8eac3b58013317bb1386e117b9744c3b (patch)
tree176cb35e7fb66c4730a295370b2d309b5cdd5318 /sql/opt_range.cc
parentff0c072913ae065a6345eaaf83a90ba6d6b8bb63 (diff)
parent265814f2ae1ddf8eb089ce703a58b9a43b2bc1f9 (diff)
downloadmariadb-git-5a4cdc5f8eac3b58013317bb1386e117b9744c3b.tar.gz
Bug#16208709 - CRASH IN GET_SEL_ARG_FOR_KEYPART ON SELECT DISTINCT
ON COL WITH COMPOSITE INDEX This problem is caused by the patch for the bug#11751794. While checking for the keypart covering non grouping attribute. we are not checking whether the root node of the SEL_ARG* tree for the index have any cvalue or not. sql/opt_range.cc: check whether the keeypart_tree has any range tree.
Diffstat (limited to 'sql/opt_range.cc')
-rw-r--r--sql/opt_range.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/sql/opt_range.cc b/sql/opt_range.cc
index 8481e16082b..c078d9ac85b 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -10085,6 +10085,8 @@ get_sel_arg_for_keypart(Field *nga_field,
SEL_ARG *keypart_tree,
SEL_ARG **cur_range)
{
+ if(keypart_tree == NULL)
+ return false;
if(keypart_tree->field->eq(nga_field))
{
/*