mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2025-08-06 18:24:26 +08:00
Do not display grid cells as modified if new value is effectively the same as the old one. Especially minimizes INSERTs for "Duplicate row" feature.
This commit is contained in:
@ -1926,11 +1926,16 @@ begin
|
|||||||
CreateUpdateRow;
|
CreateUpdateRow;
|
||||||
EnsureFullRow;
|
EnsureFullRow;
|
||||||
end;
|
end;
|
||||||
|
FCurrentUpdateRow[Column].NewIsNull := Null;
|
||||||
|
if Null then
|
||||||
|
FCurrentUpdateRow[Column].NewText := ''
|
||||||
|
else begin
|
||||||
FCurrentUpdateRow[Column].NewText := NewText;
|
FCurrentUpdateRow[Column].NewText := NewText;
|
||||||
if DataType(Column).Category in [dtcInteger, dtcReal] then
|
if DataType(Column).Category in [dtcInteger, dtcReal] then
|
||||||
FCurrentUpdateRow[Column].NewText := UnformatNumber(FCurrentUpdateRow[Column].NewText);
|
FCurrentUpdateRow[Column].NewText := UnformatNumber(FCurrentUpdateRow[Column].NewText);
|
||||||
FCurrentUpdateRow[Column].NewIsNull := Null;
|
end;
|
||||||
FCurrentUpdateRow[Column].Modified := True;
|
FCurrentUpdateRow[Column].Modified := (FCurrentUpdateRow[Column].NewText <> FCurrentUpdateRow[Column].OldText) or
|
||||||
|
(FCurrentUpdateRow[Column].NewIsNull <> FCurrentUpdateRow[Column].OldIsNull);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user