1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

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

into sanja.is.com.ua:/home/bell/mysql/bk/work-derived2-4.1
This commit is contained in:
bell@sanja.is.com.ua
2004-02-09 15:01:51 +02:00
19 changed files with 397 additions and 273 deletions

View File

@ -173,7 +173,6 @@ int handle_select(THD *thd, LEX *lex, select_result *result)
register SELECT_LEX *select_lex = &lex->select_lex;
DBUG_ENTER("handle_select");
fix_tables_pointers(lex->all_selects_list);
if (select_lex->next_select())
res=mysql_union(thd, lex, result, &lex->unit);
else
@ -1580,8 +1579,8 @@ mysql_select(THD *thd, Item ***rref_pointer_array,
goto err;
}
}
free_join= 0;
}
free_join= 0;
join->select_options= select_options;
}
else
@ -3794,11 +3793,6 @@ JOIN::join_free(bool full)
{
if (tab->table)
{
if (tab->table->key_read)
{
tab->table->key_read= 0;
tab->table->file->extra(HA_EXTRA_NO_KEYREAD);
}
/* Don't free index if we are using read_record */
if (!tab->read_record.table)
tab->table->file->index_end();
@ -9149,6 +9143,9 @@ int mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
sl;
sl= sl->next_select())
{
// drop UNCACHEABLE_EXPLAIN, because it is for internal usage only
uint8 uncacheable= (sl->uncacheable & ~UNCACHEABLE_EXPLAIN);
res= mysql_explain_select(thd, sl,
(((&thd->lex->select_lex)==sl)?
((thd->lex->all_selects_list != sl) ?
@ -9156,13 +9153,13 @@ int mysql_explain_union(THD *thd, SELECT_LEX_UNIT *unit, select_result *result)
((sl == first)?
((sl->linkage == DERIVED_TABLE_TYPE) ?
"DERIVED":
((sl->uncacheable & UNCACHEABLE_DEPENDENT) ?
((uncacheable & UNCACHEABLE_DEPENDENT) ?
"DEPENDENT SUBQUERY":
(sl->uncacheable?"UNCACHEABLE SUBQUERY":
(uncacheable?"UNCACHEABLE SUBQUERY":
"SUBQUERY"))):
((sl->uncacheable & UNCACHEABLE_DEPENDENT) ?
((uncacheable & UNCACHEABLE_DEPENDENT) ?
"DEPENDENT UNION":
sl->uncacheable?"UNCACHEABLE UNION":
uncacheable?"UNCACHEABLE UNION":
"UNION"))),
result);
if (res)