summaryrefslogtreecommitdiff
path: root/sql/sql_derived.cc
diff options
context:
space:
mode:
Diffstat (limited to 'sql/sql_derived.cc')
-rw-r--r--sql/sql_derived.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/sql_derived.cc b/sql/sql_derived.cc
index 41f166c6ad0..4a64c30e7e5 100644
--- a/sql/sql_derived.cc
+++ b/sql/sql_derived.cc
@@ -34,7 +34,7 @@ int mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
TODO: make derived tables with union inside (now only 1 SELECT may be
procesed)
*/
- SELECT_LEX *sl= (SELECT_LEX*)unit->slave;
+ SELECT_LEX *sl= unit->first_select();
List<Item> item_list;
TABLE *table;
int res;