Icon View Incident Report

Serious Serious
Reported By: Piotr Front
Reported On: 12/14/2011
For: Version 2.06 Build 2
# 3524 Default Values for BLOB/CLOB Columns Can Cause Errors with Remote Sessions

Default values for CLOB columns aren't working properly with remote sessions.

with EDBQuery1 do
   begin
     SQL.Text := 'SELECT * From XMode';
     Open;
     Append;
     FieldByName('Name').AsString := 'x';
     // FieldByName('OptionsJSON').isnull = false!
     FieldByName('OptionsJSON').Clear; //workaround
     //with workaround -> FieldByName('OptionsJSON').isnull = true!
     Post;
     Button2.Caption := FieldByName('OptionsJSON').AsString;
     //should return '{}' instead empty string!
   end;

Table XMode:
CREATE TABLE "XMode"
(
"Id" INTEGER GENERATED ALWAYS AS IDENTITY (START WITH 0, INCREMENT BY 
1) NOT NULL,
"BuildIn" GUID,
"Name" VARCHAR(128) COLLATE "UNI_CI" NOT NULL,
"Descr" VARCHAR(255) COLLATE "UNI_CI",
"Category" INTEGER DEFAULT 0  NOT NULL,
"OptionsJSON" CLOB COLLATE "UNI_CI" DEFAULT '{}'  NOT NULL,
CONSTRAINT "PK_Id" PRIMARY KEY ("Id")
)
VERSION 3.00
READWRITE
UNENCRYPTED
INDEX PAGE SIZE 8192
BLOB BLOCK SIZE 128
PUBLISH BLOCK SIZE 128
PUBLISH COMPRESSION 0
MAX ROW BUFFER SIZE 32768
MAX INDEX BUFFER SIZE 65536
MAX BLOB BUFFER SIZE 32768
MAX PUBLISH BUFFER SIZE 32768!

CREATE INDEX "Idx_Category" ON "XMode" ("Category")!
CREATE INDEX "Idx_BuildIn" ON "XMode" ("BuildIn" COLLATE "UNI_CI")!



Comments Comments
This problem could also cause identity/generated columns in the same row to not be populated correctly. The problem, in general, is a mismatch between the what the remote session thinks is the status of the BLOB column values versus what the EDB Server knows is the status of the BLOB column values, and this is caused by the fact that the BLOB is loaded on the EDB Server due to the default value defined for the BLOB column.

Note: This fix is the cause for the version number increment from 2.06 to 2.07. Also, both the client application and the EDB Server must be updated to 2.07 B1 or higher in order for this fix to be enabled.


Resolution Resolution
Fixed Problem on 12/18/2011 in version 2.07 build 1


Products Affected Products Affected
ElevateDB Additional Software and Utilities
ElevateDB DAC Client-Server
ElevateDB DAC Client-Server with Source
ElevateDB DAC Standard
ElevateDB DAC Standard with Source
ElevateDB DAC Trial
ElevateDB LCL Standard with Source
ElevateDB PHP Standard
ElevateDB PHP Standard with Source
ElevateDB PHP Trial
ElevateDB VCL Client-Server
ElevateDB VCL Client-Server with Source
ElevateDB VCL Standard
ElevateDB VCL Standard with Source
ElevateDB VCL Trial

Image