When editing a table, if a field that is designated as required is not populated, an error message pops up that a required field has not been filled in. The error is that when the dialog box is closed, the Autonumber function increments, such that the primary key ID will increment without adding a new record, however, the incremented value is not displayed until the next row is entered or the table is saved. For each error message that occurs, the Autonumber will increment +1. For a particular row in the table, if there are 5 attempts to move beyond a required field, that results in 5 error messages, which will have the effect of indexing the Autonumber +5 for a single row. This makes the numbering sequence out of sync by the number of error messages that have popped up or been displayed. The next row will continue to have the same delta, i.e. +5 from the last value. A temporary workaround is to turn off the Autonumber, close the table, save, reopen in edit mode, and turn on the Autonumber. This appears to clear the counter and allows the Autonumber to increment correctly from the previous value.
Created attachment 189730 [details] Open the attached database. Write a complete row. Change row. Now try only "Forename". Bug seems to be a very old bug. Could see it also with LO 7.4.7.2, but it is a buggy behavior of the database driver. Table has been created with all fields required. Sending a row to this table to save the data will automatically ask for new autoincremented value. After the value has been asked for there will be detected: Oh, there are some values missed, we can't save data … This behavior is the same in internal HSQLDB and internal Firebird. Trying to insert the row (with completed values) next time will ask for the next autoincremented value. I tried the same with MariaDB. With direct connection and missing content for a field there will be inserted a (not defined) default value. "Input required" has been changed to "Input nonsense". With JDBC connection and missing content it produces an error. After filling fields it will save the data with right autoincremented value. So the values will look like 1,2,3,4 instead of 1,3,6,9 when using internal HSQLDB and Firebird.
Same behavior with LO 7.1.5.2 and internal HSQLDB. Seems it never worked well. Remember: GUI will offer the way to input data through forms. Form fields could also be set to "Input required". This will be controlled by GUI before submitting data. So autoincremented values will look well here.