summaryrefslogtreecommitdiff
path: root/sql/opt_range.cc
diff options
context:
space:
mode:
authorNeeraj Bisht <neeraj.x.bisht@oracle.com>2013-01-29 10:05:00 +0530
committerNeeraj Bisht <neeraj.x.bisht@oracle.com>2013-01-29 10:05:00 +0530
commit516a0ad46448cd7f622808f8fd07d97191cbb131 (patch)
tree188f6ea31f60dabdeee9b8ff8664ab6452040746 /sql/opt_range.cc
parente174bf73b0028e0a6fb5d9f0b7a16ee4e236eeda (diff)
downloadmariadb-git-516a0ad46448cd7f622808f8fd07d97191cbb131.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.
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 4e67727462c..ae6878c6756 100644
--- a/sql/opt_range.cc
+++ b/sql/opt_range.cc
@@ -9870,6 +9870,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))
{
/*