in reply to (OT) MySQL bug? Or PEBKAC?

Perhaps these will help:
http://dev.mysql.com/doc/mysql/en/working-with-null.html
http://dev.mysql.com/doc/mysql/en/problems-with-null.html