mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge branch '10.6' into 10.11
This commit is contained in:
@ -1265,26 +1265,21 @@ bool st_select_lex_unit::join_union_item_types(THD *thd_arg,
|
||||
}
|
||||
|
||||
|
||||
bool init_item_int(THD* thd, Item_int* &item)
|
||||
static bool init_item_int(THD* thd, Item_int* &item)
|
||||
{
|
||||
if (!item)
|
||||
{
|
||||
Query_arena *arena, backup_arena;
|
||||
arena= thd->activate_stmt_arena_if_needed(&backup_arena);
|
||||
|
||||
item= new (thd->mem_root) Item_int(thd, 0);
|
||||
|
||||
if (arena)
|
||||
thd->restore_active_arena(arena, &backup_arena);
|
||||
|
||||
if (!item)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
item->value= 0;
|
||||
}
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
@ -1760,8 +1755,12 @@ cont:
|
||||
|
||||
for(uint i= 0; i< hidden; i++)
|
||||
{
|
||||
init_item_int(thd, addon_fields[i]);
|
||||
types.push_front(addon_fields[i]);
|
||||
if (init_item_int(thd, addon_fields[i]) ||
|
||||
types.push_front(addon_fields[i]))
|
||||
{
|
||||
types.empty();
|
||||
goto err;
|
||||
}
|
||||
addon_fields[i]->name.str= i ? "__CNT_1" : "__CNT_2";
|
||||
addon_fields[i]->name.length= 7;
|
||||
}
|
||||
|
Reference in New Issue
Block a user