summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2005-07-14 15:19:26 +0000
committerunknown <sergefp@mysql.com>2005-07-14 15:19:26 +0000
commitc0bcf503f5307309104ca4efe4ddbd75fd671e8f (patch)
tree1cba71569a8f83236248b7adb97feb8e96231a96 /sql/item_func.cc
parentd91c901f617ddfeade701476d9d050247a905ed3 (diff)
downloadmariadb-git-c0bcf503f5307309104ca4efe4ddbd75fd671e8f.tar.gz
Fix for BUG#11869: In Item_func_match::fix_index() handle the case when there is no
source table present (this happens for ORDER BY after UNION) mysql-test/r/fulltext_order_by.result: Testcase for BUG#11869 mysql-test/t/fulltext_order_by.test: Testcase for BUG#11869
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc3
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 442ef15bba8..fd45323aae2 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -3196,6 +3196,9 @@ bool Item_func_match::fix_index()
if (key == NO_SUCH_KEY)
return 0;
+
+ if (!table)
+ goto err;
for (keynr=0 ; keynr < table->keys ; keynr++)
{