summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2005-07-14 15:19:26 +0000
committersergefp@mysql.com <>2005-07-14 15:19:26 +0000
commit0b3db181bf58e7d7b083eb6c790859d1975aece2 (patch)
tree1cba71569a8f83236248b7adb97feb8e96231a96 /sql/item_func.cc
parente1273aec6dfcb163542e449a31bf2f8aa3e0fa63 (diff)
downloadmariadb-git-0b3db181bf58e7d7b083eb6c790859d1975aece2.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)
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++)
{