mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Prevent needless rexecuting empty subselects
This commit is contained in:
@ -785,7 +785,7 @@ select_subselect::select_subselect(Item_subselect *item)
|
||||
bool select_subselect::send_data(List<Item> &items)
|
||||
{
|
||||
DBUG_ENTER("select_subselect::send_data");
|
||||
if (item->executed){
|
||||
if (item->assigned){
|
||||
my_printf_error(ER_SUBSELECT_NO_1_ROW, ER(ER_SUBSELECT_NO_1_ROW), MYF(0));
|
||||
DBUG_RETURN(1);
|
||||
}
|
||||
@ -812,6 +812,6 @@ bool select_subselect::send_data(List<Item> &items)
|
||||
item->int_value= val_item->val_int();
|
||||
item->res_type= val_item->result_type();
|
||||
}
|
||||
item->executed= 1;
|
||||
item->assigned= 1;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user