(NULLIF(count(table.col)), 0) gives wrong result on 10.1.x

Description

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

Environment

openbsd, windows

Assignee

Alexander Barkov

Reporter

MartinL

Labels

Components

Sprint

None

Fix versions

Affects versions

Priority

Critical
Configure