Commit ea43df76 authored by Sergey Petrunya's avatar Sergey Petrunya

- Release build: Fix compiler warning about unused variable

- Debug build: make DBUG_ASSERT statements really look at the first table

One can't expect cursors to work with semi-join subqueries anyway, 
though (which isn't a problem because cursors are not used anywhere)
parent 65b9fb5a
...@@ -363,7 +363,6 @@ Sensitive_cursor::open(JOIN *join_arg) ...@@ -363,7 +363,6 @@ Sensitive_cursor::open(JOIN *join_arg)
join= join_arg; join= join_arg;
THD *thd= join->thd; THD *thd= join->thd;
/* First non-constant table */ /* First non-constant table */
JOIN_TAB *join_tab= join->join_tab + join->const_tables;
DBUG_ENTER("Sensitive_cursor::open"); DBUG_ENTER("Sensitive_cursor::open");
join->change_result(result); join->change_result(result);
...@@ -394,13 +393,16 @@ Sensitive_cursor::open(JOIN *join_arg) ...@@ -394,13 +393,16 @@ Sensitive_cursor::open(JOIN *join_arg)
tab->next_select= sub_select; tab->next_select= sub_select;
} }
DBUG_ASSERT(join_tab->table->reginfo.not_exists_optimize == 0); #ifndef DBUG_OFF
DBUG_ASSERT(join_tab->not_used_in_distinct == 0); JOIN_TAB *first_tab= first_linear_tab(join, WITHOUT_CONST_TABLES);
DBUG_ASSERT(first_tab->table->reginfo.not_exists_optimize == 0);
DBUG_ASSERT(first_tab->not_used_in_distinct == 0);
/* /*
null_row is set only if row not found and it's outer join: should never null_row is set only if row not found and it's outer join: should never
happen for the first table in join_tab list happen for the first table in join_tab list
*/ */
DBUG_ASSERT(join_tab->table->null_row == 0); DBUG_ASSERT(first_tab->table->null_row == 0);
#endif
DBUG_RETURN(0); DBUG_RETURN(0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment