Commit e21e41fc authored by serg@serg.mylan's avatar serg@serg.mylan

Merge bk-internal:/home/bk/mysql-4.1/

into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents cb07a07e 11128fb6
......@@ -355,15 +355,18 @@ int st_select_lex_unit::exec()
if (uncacheable || !item || !item->assigned() || describe)
{
if (optimized && item && item->assigned())
if (optimized && item)
{
if (item->assigned())
{
item->assigned(0); // We will reinit & rexecute unit
item->reset();
table->file->delete_all_rows();
}
if (union_distinct && table->file->enable_indexes(HA_KEY_SWITCH_ALL) &&
!describe)
DBUG_RETURN(1); // For sub-selects
/* re-enabling indexes for next subselect iteration */
if (union_distinct && table->file->enable_indexes(HA_KEY_SWITCH_ALL))
DBUG_ASSERT(1);
}
for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select())
{
ha_rows records_at_start= 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