mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
MDEV-14689 Server crashes in find_field_in_tables on 2nd execution of PS with versioned table and view
SQL: wrong usage of Item::transform()
This commit is contained in:
@ -700,24 +700,36 @@ void JOIN::vers_check_items()
|
||||
|
||||
if (conds)
|
||||
{
|
||||
conds= conds->transform(thd, transformer, NULL);
|
||||
Item *tmp = conds->transform(thd, transformer, NULL);
|
||||
if (conds != tmp)
|
||||
conds= tmp;
|
||||
}
|
||||
|
||||
for (ORDER *ord= order; ord; ord= ord->next)
|
||||
{
|
||||
ord->item_ptr= (*ord->item)->transform(thd, transformer, NULL);
|
||||
*ord->item= ord->item_ptr;
|
||||
Item *tmp= (*ord->item)->transform(thd, transformer, NULL);
|
||||
if (*ord->item != tmp)
|
||||
{
|
||||
ord->item_ptr= tmp;
|
||||
*ord->item= ord->item_ptr;
|
||||
}
|
||||
}
|
||||
|
||||
for (ORDER *ord= group_list; ord; ord= ord->next)
|
||||
{
|
||||
ord->item_ptr= (*ord->item)->transform(thd, transformer, NULL);
|
||||
*ord->item= ord->item_ptr;
|
||||
Item *tmp= (*ord->item)->transform(thd, transformer, NULL);
|
||||
if (*ord->item != tmp)
|
||||
{
|
||||
ord->item_ptr= tmp;
|
||||
*ord->item= ord->item_ptr;
|
||||
}
|
||||
}
|
||||
|
||||
if (having)
|
||||
{
|
||||
having= having->transform(thd, transformer, NULL);
|
||||
Item *tmp= having->transform(thd, transformer, NULL);
|
||||
if (having != tmp)
|
||||
having= tmp;
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user