You're encountering a well-known quirk in MariaDB's handling of `AUTO_INCREMENT` values during an engine conversion, especially when switching from MyISAM to Aria. While it might seem surprising, the **re-sequencing** issue often arises because Aria (and InnoDB too) handles `AUTO_INCREMENT` differently than MyISAM. It tries to recalculate the next auto-increment value by scanning the table — not by just continuing from the previously stored `AUTO_INCREMENT` metadata.
In your case, the presence of **gaps** in `id` values and the sheer size of the number (`106274948879084`) may be leading to misinterpretation by the engine, which then tries to assign an already existing `id`, triggering the duplicate entry error. If you're not relying on the exact `id` values, then resetting the counter using: ```sql ALTER TABLE xxx AUTO_INCREMENT = 1; ``` is a reasonable workaround. But for **tables linked via foreign keys**, this could break relationships. Also, if you're interested in more niche technical challenges or even want a fun break, you might enjoy checking out this rage-inducing game: [https://gettingoverit-apk.com/] https://gettingoverit-apk.com/ — great stress test for both your patience and hardware! In serious systems, it's always best to **test engine changes on a staging environment** before applying to production. _______________________________________________ discuss mailing list -- discuss@lists.mariadb.org To unsubscribe send an email to discuss-le...@lists.mariadb.org