mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 11:17:57 +08:00
Add LIMIT 1 clause to grid UPDATE queries, to make these safer on tables without sufficient unique key. Fixes issue #2079.
This commit is contained in:
@ -2156,7 +2156,7 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end else
|
end else
|
||||||
Connection.Query('UPDATE '+QuotedDbAndTableName+' SET '+sqlUpdate+' WHERE '+GetWhereClause);
|
Connection.Query('UPDATE '+QuotedDbAndTableName+' SET '+sqlUpdate+' WHERE '+GetWhereClause+' LIMIT 1');
|
||||||
// Reset modification flags
|
// Reset modification flags
|
||||||
for i:=0 to ColumnCount-1 do begin
|
for i:=0 to ColumnCount-1 do begin
|
||||||
Cell := Row[i];
|
Cell := Row[i];
|
||||||
|
Reference in New Issue
Block a user