Skip to content

Commit

Permalink
Support for isc_spb_prp_nolinger (DNET-645).
Browse files Browse the repository at this point in the history
  • Loading branch information
cincuranet committed Sep 4, 2018
1 parent 3dadb06 commit 0c4522d
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 0 deletions.
Expand Up @@ -396,6 +396,16 @@ public void TraceTest()
Assert.AreNotEqual(-1, sessionId);
}

[Test]
public void NoLingerTest()
{
var configurationSvc = new FbConfiguration();

configurationSvc.ConnectionString = BuildServicesConnectionString(FbServerType, Compression, true);

configurationSvc.NoLinger();
}

[Test, Explicit]
public void StatisticsWithEncryptedTest()
{
Expand Down
Expand Up @@ -437,6 +437,7 @@ internal static class IscCodes
// Option Flags
public const int isc_spb_prp_activate = 0x0100;
public const int isc_spb_prp_db_online = 0x0200;
public const int isc_spb_prp_nolinger = 0x0400;

#endregion

Expand Down
Expand Up @@ -196,6 +196,18 @@ public void SetAccessMode(bool readOnly)
Close();
}

public void NoLinger()
{
StartSpb = new ServiceParameterBuffer();
StartSpb.Append(IscCodes.isc_action_svc_properties);
StartSpb.Append(IscCodes.isc_spb_dbname, Database);
StartSpb.Append(IscCodes.isc_spb_options, IscCodes.isc_spb_prp_nolinger);

Open();
StartTask();
Close();
}

byte FbShutdownOnlineModeToIscCode(FbShutdownOnlineMode mode)
{
switch (mode)
Expand Down

0 comments on commit 0c4522d

Please sign in to comment.