mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-26 22:00:16 +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 else
|
||||
Connection.Query('UPDATE '+QuotedDbAndTableName+' SET '+sqlUpdate+' WHERE '+GetWhereClause);
|
||||
Connection.Query('UPDATE '+QuotedDbAndTableName+' SET '+sqlUpdate+' WHERE '+GetWhereClause+' LIMIT 1');
|
||||
// Reset modification flags
|
||||
for i:=0 to ColumnCount-1 do begin
|
||||
Cell := Row[i];
|
||||
|
Reference in New Issue
Block a user