Subject Re: AW: AW: AW: [firebird-support] coalesce bug in fb 3.0 rc2?
Author Arno Brinkman
Hi,
 
Thank you for providing a script, this is much easier comparing.
I can now reproduce the error you get.
 
 
Please enter a ticket with this script into the tracker, so they can fix this issue.
 
Enter these both queries, so they can quickly find the bug:
 
The query with the wrong results:
 
SELECT
  a.tnr, a.minb, coalesce(b.amount,0) as m
FROM
  t_main a
  left join t_stock b on (a.tnr = b.tnr)
WHERE
  ((a.minb > coalesce(b.amount,0)))
 
 
A workaround by ignoring use of index:
 
SELECT
  a.tnr, a.minb, coalesce(b.amount,0) as m
FROM
  t_main a
  left join t_stock b on (a.tnr = b.tnr || '')
WHERE
  ((a.minb > coalesce(b.amount,0)))
 
 
Kind Regards,
Arno