change_author_contrib_count() subtracts author_contribs and the per-type counter (author_styles, author_mods) in one UPDATE guarded only by author_contribs > 0. The columns are unsigned, so when a per-type counter is already at zero the subtraction fails with SQL error 1690 and the whole action dies.
change_author_contrib_count() subtracts author_contribs and the per-type counter (author_styles, author_mods) in one UPDATE guarded only by author_contribs > 0. The columns are unsigned, so when a per-type counter is already at zero the subtraction fails with SQL error 1690 and the whole action dies.