mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Backport from 5.2: Fix valgrind failure: Don't access item_func->arguments()
if item_func->argument_count()==0
This commit is contained in:
@ -1909,11 +1909,9 @@ bool uses_only_table_name_fields(Item *item, TABLE_LIST *table)
|
|||||||
if (item->type() == Item::FUNC_ITEM)
|
if (item->type() == Item::FUNC_ITEM)
|
||||||
{
|
{
|
||||||
Item_func *item_func= (Item_func*)item;
|
Item_func *item_func= (Item_func*)item;
|
||||||
Item **child;
|
for (uint i=0; i<item_func->argument_count(); i++)
|
||||||
Item **item_end= (item_func->arguments()) + item_func->argument_count();
|
|
||||||
for (child= item_func->arguments(); child != item_end; child++)
|
|
||||||
{
|
{
|
||||||
if (!uses_only_table_name_fields(*child, table))
|
if (!uses_only_table_name_fields(item_func->arguments()[i], table))
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user