mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
TDBQuery.HasFullData: Additional test if column name contains a known LEFT or SUBSTR function. Fixes #1850, at least if the original column names are provided by the library.
This commit is contained in:
@@ -9406,8 +9406,15 @@ begin
|
||||
FConnection.Log(lcInfo, 'HasFullData: RowNum:'+RecNo.ToString+
|
||||
' ColumnNames['+i.ToString+']:'+ColumnNames[i]+
|
||||
' ColumnOrgNames['+i.ToString+']:'+ColumnOrgNames[i]+
|
||||
' NumChars:'+NumChars.ToString
|
||||
' NumChars:'+NumChars.ToString+
|
||||
' ColumnLengths('+i.ToString+'):'+ColumnLengths(i).ToString
|
||||
);}
|
||||
if ColumnNames[i].StartsWith('LEFT', True) or ColumnNames[i].StartsWith('SUBSTR', True) then begin
|
||||
// This works at least in MySQL, and fixes issue #1850 where NumChars is > 256 when text contains emojis.
|
||||
// MSSQL does not provide the original column names with function calls like LEFT(..)
|
||||
Result := False;
|
||||
Break;
|
||||
end;
|
||||
if (NumChars <= GRIDMAXDATA) and (NumChars >= GRIDMAXDATA / SizeOf(Char)) then begin
|
||||
Result := False;
|
||||
Break;
|
||||
|
||||
Reference in New Issue
Block a user