mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merge 4.1->5.0
This commit is contained in:
@ -30,7 +30,7 @@ bool mysql_union(THD *thd, LEX *lex, select_result *result,
|
||||
DBUG_ENTER("mysql_union");
|
||||
bool res;
|
||||
if (!(res= unit->prepare(thd, result, SELECT_NO_UNLOCK |
|
||||
setup_tables_done_option)))
|
||||
setup_tables_done_option, "")))
|
||||
res= unit->exec();
|
||||
if (!res && thd->cursor && thd->cursor->is_open())
|
||||
{
|
||||
@ -140,7 +140,8 @@ st_select_lex_unit::init_prepare_fake_select_lex(THD *thd)
|
||||
|
||||
|
||||
bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
ulong additional_options)
|
||||
ulong additional_options,
|
||||
const char *tmp_table_alias)
|
||||
{
|
||||
SELECT_LEX *lex_select_save= thd_arg->lex->current_select;
|
||||
SELECT_LEX *sl, *first_select;
|
||||
@ -255,7 +256,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
while ((item_tmp= it++))
|
||||
{
|
||||
/* Error's in 'new' will be detected after loop */
|
||||
types.push_back(new Item_type_holder(thd_arg, item_tmp, empty_table));
|
||||
types.push_back(new Item_type_holder(thd_arg, item_tmp));
|
||||
}
|
||||
|
||||
if (thd_arg->is_fatal_error)
|
||||
@ -274,8 +275,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
Item *type, *item_tmp;
|
||||
while ((type= tp++, item_tmp= it++))
|
||||
{
|
||||
if (((Item_type_holder*)type)->join_types(thd_arg, item_tmp,
|
||||
empty_table))
|
||||
if (((Item_type_holder*)type)->join_types(thd_arg, item_tmp))
|
||||
DBUG_RETURN(TRUE);
|
||||
}
|
||||
}
|
||||
@ -308,7 +308,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
|
||||
(first_select_in_union()->options |
|
||||
thd_arg->options |
|
||||
TMP_TABLE_ALL_COLUMNS),
|
||||
HA_POS_ERROR, (char*) "")))
|
||||
HA_POS_ERROR, (char *) tmp_table_alias)))
|
||||
goto err;
|
||||
table->file->extra(HA_EXTRA_WRITE_CACHE);
|
||||
table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
|
||||
|
Reference in New Issue
Block a user