summaryrefslogtreecommitdiff
path: root/sql
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
commit265814f2ae1ddf8eb089ce703a58b9a43b2bc1f9 (patch)
tree188f6ea31f60dabdeee9b8ff8664ab6452040746 /sql
parentd1378565bba59726ae3f4d47d0709e68d77110ed (diff)
downloadmariadb-git-265814f2ae1ddf8eb089ce703a58b9a43b2bc1f9.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')
-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))
{
/*