I have 4 rows in col1, yet maria 10.1 says on
that I have 7.
maria 10.0 and mysql gives 4 here.
changing to ifnull instead of nullif works fine.
To recreate this simple bug just use that line on anything you have or to recreate my testdb see below