Description
When editing data directly in the Data grid, the first modification of a field is saved correctly.
However, if I return to the same field in the same row and modify it a second time, HeidiSQL fails to save the new value and displays the following error:
0 rows updated when that should have been 1.
The problem is not limited to a particular data type. I have reproduced it with different field types, including VARCHAR, INT, TEXT, etc.
If I press the Reload/Refresh button after the first modification, I can modify the same field again without receiving the error.
This means that, after changing a field, I currently have to reload the table data before I can edit that field a second time.
This is an important issue for users who edit records directly in HeidiSQL, because reloading the data after every modification should not be necessary.
HeidiSQL version and OS
HeidiSQL 12.20.0.7320
Database server version
MariaDB-11.8.5
Reproduction recipe
- Open an existing MariaDB table in HeidiSQL.
- Open the Data tab.
- Select an existing row.
- Edit the value of a field, for example changing
Value A to Value B.
- Move to another row so that HeidiSQL saves the modification.
- Verify that the first modification is saved correctly.
- Return to the same row and the same field.
- Change the value again, for example from
Value B to Value C.
- Move to another row so that HeidiSQL attempts to save the second modification.
- HeidiSQL displays:
0 rows updated when that should have been 1.
- Press the Reload/Refresh button.
- Edit the same field again.
- The modification is now saved correctly.
Actual behavior
The first modification is saved correctly, but a second modification of the same field fails until the table data is reloaded.
Expected behavior
After successfully saving the first modification, HeidiSQL should update its internal representation of the row so that the same field can be modified again without having to reload the data.
The second modification should be saved normally.
Possible cause
This is only a hypothesis, but it appears that the Data grid may retain the original value of the row after the first update.
Consequently, when HeidiSQL generates the second UPDATE statement, it may use an outdated value in the WHERE clause. MariaDB then finds no row matching that outdated value, and HeidiSQL reports that zero rows were updated.
Reloading the data probably refreshes the stored row values, which would explain why editing works again immediately after pressing Reload.
Why this is important
Direct editing in the Data grid is one of HeidiSQL's main workflows.
Requiring users to reload the data after every modification:
- interrupts normal data-entry work;
- makes repeated corrections unnecessarily slow;
- may cause users to believe that their data was not saved correctly;
- makes direct editing unreliable for frequent database maintenance.
Error/Backtrace
0 rows updated when that should have been 1.
Description
When editing data directly in the Data grid, the first modification of a field is saved correctly.
However, if I return to the same field in the same row and modify it a second time, HeidiSQL fails to save the new value and displays the following error:
The problem is not limited to a particular data type. I have reproduced it with different field types, including VARCHAR, INT, TEXT, etc.
If I press the Reload/Refresh button after the first modification, I can modify the same field again without receiving the error.
This means that, after changing a field, I currently have to reload the table data before I can edit that field a second time.
This is an important issue for users who edit records directly in HeidiSQL, because reloading the data after every modification should not be necessary.
HeidiSQL version and OS
HeidiSQL 12.20.0.7320
Database server version
MariaDB-11.8.5
Reproduction recipe
Value AtoValue B.Value BtoValue C.Actual behavior
The first modification is saved correctly, but a second modification of the same field fails until the table data is reloaded.
Expected behavior
After successfully saving the first modification, HeidiSQL should update its internal representation of the row so that the same field can be modified again without having to reload the data.
The second modification should be saved normally.
Possible cause
This is only a hypothesis, but it appears that the Data grid may retain the original value of the row after the first update.
Consequently, when HeidiSQL generates the second
UPDATEstatement, it may use an outdated value in theWHEREclause. MariaDB then finds no row matching that outdated value, and HeidiSQL reports that zero rows were updated.Reloading the data probably refreshes the stored row values, which would explain why editing works again immediately after pressing Reload.
Why this is important
Direct editing in the Data grid is one of HeidiSQL's main workflows.
Requiring users to reload the data after every modification:
Error/Backtrace