1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Merge sanja.is.com.ua:/home/bell/mysql/bk/mysql-4.1

into sanja.is.com.ua:/home/bell/mysql/bk/work-explain-4.1
This commit is contained in:
bell@sanja.is.com.ua
2004-05-19 17:09:40 +03:00
149 changed files with 1764 additions and 1473 deletions

View File

@ -361,8 +361,8 @@ int st_select_lex_unit::exec()
item->reset();
table->file->delete_all_rows();
}
if (union_distinct) // for subselects
table->file->extra(HA_EXTRA_CHANGE_KEY_TO_UNIQUE);
if (union_distinct && table->file->enable_indexes(HA_KEY_SWITCH_ALL))
DBUG_RETURN(1); // For sub-selects
for (SELECT_LEX *sl= select_cursor; sl; sl= sl->next_select())
{
ha_rows records_at_start= 0;
@ -414,7 +414,11 @@ int st_select_lex_unit::exec()
records_at_start= table->file->records;
sl->join->exec();
if (sl == union_distinct)
table->file->extra(HA_EXTRA_CHANGE_KEY_TO_DUP);
{
if (table->file->disable_indexes(HA_KEY_SWITCH_ALL))
DBUG_RETURN(1);
table->no_keyread=1;
}
res= sl->join->error;
offset_limit_cnt= sl->offset_limit;
if (!res && union_result->flush())