Skip to content

Commit 93e6904

Browse files
committed
Test Plan updated for Blob text string optmisation
1 parent 25b6c13 commit 93e6904

File tree

6 files changed

+1014
-113
lines changed

6 files changed

+1014
-113
lines changed

changelog

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
FBINTF Change Log version (1.4-5 Build 1238) Mon, 20 Jan 2025 11:45:29 +0000
22

33
1. TSQLParam.Clear now resets the SQL Type (if it was changed when setting the param)
4-
and zeroes the data if not nullable - otherwise parameter value is null.
4+
and zeroes the data if not nullable - otherwise parameter value is set to null.
55

66
2. TSQLParam.InternalSetString now clears the param before setting the value (also see above).
7+
This avoids problems arising from re-using a prepared query and Blob text string optimisation.
78

89
3. When IStatement.Prepare is executed the underlying data structures are freed and then
910
re-created thus ensuring that there are no "left overs" from a previous use.

client/FBSQLData.pas

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -871,10 +871,10 @@ procedure TSQLVarData.SetString(aValue: AnsiString);
871871
FVarString := aValue;
872872
if SQLType = SQL_BLOB then
873873
begin
874-
if GetDefaultTextSQLType = SQL_TEXT then
874+
if (GetDefaultTextSQLType = SQL_TEXT) and not GetStatement.HasBatchMode then
875875
SetMetaSize(Length(aValue)*GetCharSetWidth)
876876
else
877-
SetMetaSize(Length(aValue))
877+
SetMetaSize(GetAttachment.GetInlineBlobLimit) {Otherwise batch mode can be limited by first string assigned to var}
878878
end;
879879
if CanChangeMetaData then
880880
SetSQLType(GetDefaultTextSQLType,0);

0 commit comments

Comments
 (0)