View Issue Details

IDProjectCategoryView StatusLast Update
0036080FPCDatabasepublic2019-09-17 11:54
ReporterJoeny AngAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityN/A
Status resolvedResolutionfixed 
PlatformallOSallOS Versionall
Product Version3.0.4Product Build 
Target VersionFixed in Version3.3.1 
Summary0036080: WireCompression option in TIBConnection
DescriptionThis patch adds WireCompression option to TIBConnection to enable data compression over the network.
Steps To ReproduceNew functionality
TagsNo tags attached.
Fixed in Revision43025
FPCOldBugId
FPCTarget3.2.0
Attached Files
  • ibconnection-wire-compression.patch (1,500 bytes)
    --- src/packages/fcl-db/src/sqldb/interbase/ibconnection.pp
    +++ src/packages/fcl-db/src/sqldb/interbase/ibconnection.pp
    @@ -60,6 +60,7 @@
         FDatabaseInfo          : TDatabaseInfo;
         FDialect               : integer;
         FBlobSegmentSize       : word; //required for backward compatibilty; not used
    +    FWireCompression       : Boolean;
     
         procedure ConnectFB;
     
    @@ -130,6 +131,7 @@
         property LoginPrompt;
         property Params;
         property OnLogin;
    +    property WireCompression: Boolean read FWireCompression write FWireCompression default False;
       end;
       
       { TIBConnectionDef }
    @@ -187,6 +189,7 @@
       FConnOptions := FConnOptions + [sqSupportParams, sqEscapeRepeat, sqSupportReturning];
       FBlobSegmentSize := 65535; //Shows we're using the maximum segment size
       FDialect := INVALID_DATA;
    +  FWireCompression := False;
       ResetDatabaseInfo;
     end;
     
    @@ -605,6 +608,9 @@
     
     
     procedure TIBConnection.ConnectFB;
    +const
    +  isc_dpb_config = 87;
    +  CStr_WireCompression = 'WireCompression=true';
     var
       ADatabaseName: String;
       DPB: string;
    @@ -620,6 +626,9 @@
          DPB := DPB + chr(isc_dpb_sql_role_name) + chr(Length(Role)) + Role;
       if Length(CharSet) > 0 then
         DPB := DPB + Chr(isc_dpb_lc_ctype) + Chr(Length(CharSet)) + CharSet;
    +  if WireCompression then
    +    DPB := DPB + Chr(isc_dpb_config) + Chr(Length(CStr_WireCompression)) +
    +           CStr_WireCompression;
     
       FSQLDatabaseHandle := nil;
       if HostName <> '' then ADatabaseName := HostName+':'+DatabaseName
    
    

Activities

Joeny Ang

2019-09-17 11:05

reporter  

ibconnection-wire-compression.patch (1,500 bytes)
--- src/packages/fcl-db/src/sqldb/interbase/ibconnection.pp
+++ src/packages/fcl-db/src/sqldb/interbase/ibconnection.pp
@@ -60,6 +60,7 @@
     FDatabaseInfo          : TDatabaseInfo;
     FDialect               : integer;
     FBlobSegmentSize       : word; //required for backward compatibilty; not used
+    FWireCompression       : Boolean;
 
     procedure ConnectFB;
 
@@ -130,6 +131,7 @@
     property LoginPrompt;
     property Params;
     property OnLogin;
+    property WireCompression: Boolean read FWireCompression write FWireCompression default False;
   end;
   
   { TIBConnectionDef }
@@ -187,6 +189,7 @@
   FConnOptions := FConnOptions + [sqSupportParams, sqEscapeRepeat, sqSupportReturning];
   FBlobSegmentSize := 65535; //Shows we're using the maximum segment size
   FDialect := INVALID_DATA;
+  FWireCompression := False;
   ResetDatabaseInfo;
 end;
 
@@ -605,6 +608,9 @@
 
 
 procedure TIBConnection.ConnectFB;
+const
+  isc_dpb_config = 87;
+  CStr_WireCompression = 'WireCompression=true';
 var
   ADatabaseName: String;
   DPB: string;
@@ -620,6 +626,9 @@
      DPB := DPB + chr(isc_dpb_sql_role_name) + chr(Length(Role)) + Role;
   if Length(CharSet) > 0 then
     DPB := DPB + Chr(isc_dpb_lc_ctype) + Chr(Length(CharSet)) + CharSet;
+  if WireCompression then
+    DPB := DPB + Chr(isc_dpb_config) + Chr(Length(CStr_WireCompression)) +
+           CStr_WireCompression;
 
   FSQLDatabaseHandle := nil;
   if HostName <> '' then ADatabaseName := HostName+':'+DatabaseName

Michael Van Canneyt

2019-09-17 11:54

administrator   ~0118097

Added (and added Params detection of the same parameter) , thank you very much for the patch !

Issue History

Date Modified Username Field Change
2019-09-17 11:05 Joeny Ang New Issue
2019-09-17 11:05 Joeny Ang File Added: ibconnection-wire-compression.patch
2019-09-17 11:45 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-09-17 11:45 Michael Van Canneyt Status new => assigned
2019-09-17 11:54 Michael Van Canneyt Status assigned => resolved
2019-09-17 11:54 Michael Van Canneyt Resolution open => fixed
2019-09-17 11:54 Michael Van Canneyt Fixed in Version => 3.3.1
2019-09-17 11:54 Michael Van Canneyt Fixed in Revision => 43025
2019-09-17 11:54 Michael Van Canneyt FPCTarget => 3.2.0
2019-09-17 11:54 Michael Van Canneyt Note Added: 0118097