summaryrefslogtreecommitdiff
path: root/storage/spider/spd_table.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/spider/spd_table.cc')
-rw-r--r--storage/spider/spd_table.cc8
1 files changed, 7 insertions, 1 deletions
diff --git a/storage/spider/spd_table.cc b/storage/spider/spd_table.cc
index 76032ca80f0..48d29602bf2 100644
--- a/storage/spider/spd_table.cc
+++ b/storage/spider/spd_table.cc
@@ -9077,8 +9077,14 @@ int spider_set_direct_limit_offset(
)
DBUG_RETURN(FALSE);
+ /*
+ TODO: following comment is wrong or the check is wrong (correct
+ check for derived table will be something like select_lex->linkage,
+ if they need only top level it is better to check nested level and do
+ not loose UNIONS & Co
+ */
// must not be derived table
- if (&thd->lex->select_lex != select_lex)
+ if (thd->lex->first_select_lex() != select_lex)
DBUG_RETURN(FALSE);
spider->direct_select_offset = offset_limit;