Commit 2cc81ba3 authored by unknown's avatar unknown

Fix for a bug which results in "Unknown Error".

Query should actually return empty result set, but currently can't, as
it attempts to store NULL in NOT NULL field, because that is a match
made by self join conditions.

parent bcfdc99d
......@@ -969,7 +969,14 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
group ? group : order,
select_limit,
thd->select_limit))
goto err; /* purecov: inspected */
{
if (!join.join_tab[join.const_tables].select->quick)
error= return_zero_rows(&join, result, tables, fields,
0, select_options,
"Impossible WHERE noticed after reading const tables",
having,procedure);
goto err;
}
}
join.having=having; // Actually a parameter
thd->proc_info="Sending data";
......
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