Skip to content

Commit 0c4522d

Browse files
committed
Support for isc_spb_prp_nolinger (DNET-645).
1 parent 3dadb06 commit 0c4522d

File tree

3 files changed

+23
-0
lines changed

3 files changed

+23
-0
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient.Tests/FbServicesTests.cs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -396,6 +396,16 @@ public void TraceTest()
396396
Assert.AreNotEqual(-1, sessionId);
397397
}
398398

399+
[Test]
400+
public void NoLingerTest()
401+
{
402+
var configurationSvc = new FbConfiguration();
403+
404+
configurationSvc.ConnectionString = BuildServicesConnectionString(FbServerType, Compression, true);
405+
406+
configurationSvc.NoLinger();
407+
}
408+
399409
[Test, Explicit]
400410
public void StatisticsWithEncryptedTest()
401411
{

Provider/src/FirebirdSql.Data.FirebirdClient/Common/IscCodes.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ internal static class IscCodes
437437
// Option Flags
438438
public const int isc_spb_prp_activate = 0x0100;
439439
public const int isc_spb_prp_db_online = 0x0200;
440+
public const int isc_spb_prp_nolinger = 0x0400;
440441

441442
#endregion
442443

Provider/src/FirebirdSql.Data.FirebirdClient/Services/FbConfiguration.cs

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,18 @@ public void SetAccessMode(bool readOnly)
196196
Close();
197197
}
198198

199+
public void NoLinger()
200+
{
201+
StartSpb = new ServiceParameterBuffer();
202+
StartSpb.Append(IscCodes.isc_action_svc_properties);
203+
StartSpb.Append(IscCodes.isc_spb_dbname, Database);
204+
StartSpb.Append(IscCodes.isc_spb_options, IscCodes.isc_spb_prp_nolinger);
205+
206+
Open();
207+
StartTask();
208+
Close();
209+
}
210+
199211
byte FbShutdownOnlineModeToIscCode(FbShutdownOnlineMode mode)
200212
{
201213
switch (mode)

0 commit comments

Comments
 (0)