Most of us are lucky that software bugs are a small part of our
lives. The ‘things just work’ attitude works for most situations,
but occasionally something appears that may seem trivial at first
glance may be catastrophic.
A bug appeared in MySQL’s recently released 8.0.32 that really
caught my attention. This is a prime example of how a minor bug
could have a significant impact on your life and a detrimental
impact on your company or project.
The title Wrong result for AVG() OVER(ROWS BETWEEN 1
FOLLOWING AND UNBOUNDED FOLLOWING) is the first
thing that caught my eye. A lot of developers heavily use the
AVG() function. My first thought was, ‘ut-oh, AVG()
being broken is a terrible thing,’ but then I realized it was
thankfully not that drastic.
The OVER() clause indicates this is a problem in a
Window Function. And odds are, if you are using OVER()
for …
[Read more]