Don't select year 0 when there are all 0's.

Year 0 is almost never a 'good' selection value and causes odd behavior
when paired with MySQL.

Fixes #2658