pwaring, TIL: If you try to manually INSERT a row into a MySQL table and set an AUTO_INCREMENT column to 0, MySQL ignores the provided value and assumes you want the next increment amount.
Found this whilst migrating a legacy database to a new structure, where the legacy database had foreign keys (not actually defined as constraints) with 0 values.
You can control this with NO_AUTO_VALUE_ON_ZERO in sql_mode (it's on by default I think).