<html>
    <head>
      <base href="https://bugs.documentfoundation.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_UNCONFIRMED "
   title="UNCONFIRMED - BASE: Auto-value is incremented when input to form was aborted due to erroneous input"
   href="https://bugs.documentfoundation.org/show_bug.cgi?id=125955">125955</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>BASE: Auto-value is incremented when input to form was aborted due to erroneous input
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>LibreOffice
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>6.2.4.2 release
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>x86-64 (AMD64)
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows (All)
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>UNCONFIRMED
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>minor
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>medium
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>Base
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>libreoffice-bugs@lists.freedesktop.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>simon.i@outlook.de
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Description:
I have created a form with a table control element which is used to input data
to a table. Some of the fields have "input required" enabled, so when I want to
jump to another row (could also happen by clicking somewhere else by mistake)
before I entered any data into those fields, Base shows the correct error
message and lets me return to that row to input the missing data. However, it
still increments the auto-value of the primary key.

So let's say, for example, the previous table entry has ID=5. -> I start a new
row -> mess up while inputting the data or forget one field -> that error
message is shown -> I correct my input -> continue to the next row, the row
will now have ID=7 instead of ID=6.

(This is the error message: firebird_sdbc error:
*validation error for column "tablename"."fieldname", value "*** null ***"
caused by
'isc_dsql_execute')

Steps to Reproduce:
1. Create a table
2. Create a primary key with type integer and auto-value enabled
3. Create a field of any type without "input required"
4. create some other field with "input required"
5. Save the table
6. edit the table: enter something into first field (the one without input
required)
7. leave the second field blank (the one with input required)
8. try to get to the next row by using tabulator key
9. Error message pops up because of blank field. Exit message
10. enter data into second field (the one which was previoulsy left blank)
11. tab into next row by using tabulator key
12. Primary key integer value is now 2 whereas it should be 1


Actual Results:
inconsistent IDs

Expected Results:
The Primary key value should not be increased when the data record submission
was aborted due to an error


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.2.4.2 (x64)
Build-ID: 2412653d852ce75f65fbfa83fb7e7b669a126d64
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>