Fix for a crashing bug

parent 3ee8d6e3
......@@ -7088,7 +7088,7 @@ find_order_in_list(THD *thd, Item **ref_pointer_array,
Item *item=0;
uint count= (uint) ((Item_int*)itemptr)->value;
if (count > fields.elements)
if (!count || count > fields.elements)
{
my_printf_error(ER_BAD_FIELD_ERROR,ER(ER_BAD_FIELD_ERROR),
MYF(0),itemptr->full_name(),
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment