From 780b92ada9afcf1d58085a83a0b9e6bc982203d1 Mon Sep 17 00:00:00 2001 From: Lorry Tar Creator Date: Tue, 17 Feb 2015 17:25:57 +0000 Subject: Imported from /home/lorry/working-area/delta_berkeleydb/db-6.1.23.tar.gz. --- lang/csharp/src/SecondaryBTreeDatabase.cs | 49 +++++++++++++++++-------------- 1 file changed, 27 insertions(+), 22 deletions(-) (limited to 'lang/csharp/src/SecondaryBTreeDatabase.cs') diff --git a/lang/csharp/src/SecondaryBTreeDatabase.cs b/lang/csharp/src/SecondaryBTreeDatabase.cs index b685747d..b89f66df 100644 --- a/lang/csharp/src/SecondaryBTreeDatabase.cs +++ b/lang/csharp/src/SecondaryBTreeDatabase.cs @@ -1,7 +1,7 @@ /*- * See the file LICENSE for redistribution information. * - * Copyright (c) 2009, 2012 Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2009, 2015 Oracle and/or its affiliates. All rights reserved. * */ using System; @@ -54,13 +54,13 @@ namespace BerkeleyDB { /// /// /// If is set, the operation - /// will be implicitly transaction protected. Note that transactionally - /// protected operations on a datbase object requires the object itself + /// is implicitly transaction protected. Transactionally + /// protected operations on a database object requires the object itself /// be transactionally protected during its open. /// /// /// - /// The name of an underlying file that will be used to back the + /// The name of an underlying file used to back the /// database. In-memory databases never intended to be preserved on disk /// may be created by setting this parameter to null. /// @@ -85,18 +85,18 @@ namespace BerkeleyDB { /// object that created it, in circumstances where doing so is safe. If /// is null and /// is non-null, the database can be - /// opened by other threads of control and will be replicated to client + /// opened by other threads of control and be replicated to client /// sites in any replication group. /// /// /// If is set, the operation - /// will be implicitly transaction protected. Note that transactionally - /// protected operations on a datbase object requires the object itself + /// is implicitly transaction protected. Transactionally + /// protected operations on a database object requires the object itself /// be transactionally protected during its open. /// /// /// - /// The name of an underlying file that will be used to back the + /// The name of an underlying file used to back the /// database. In-memory databases never intended to be preserved on disk /// may be created by setting this parameter to null. /// @@ -127,15 +127,15 @@ namespace BerkeleyDB { /// /// /// If is null, but - /// is set, the operation will - /// be implicitly transaction protected. Note that transactionally - /// protected operations on a datbase object requires the object itself - /// be transactionally protected during its open. Also note that the + /// is set, the operation + /// is implicitly transaction protected. Transactionally + /// protected operations on a database object requires the object itself + /// be transactionally protected during its open. The /// transaction must be committed before the object is closed. /// /// /// - /// The name of an underlying file that will be used to back the + /// The name of an underlying file used to back the /// database. In-memory databases never intended to be preserved on disk /// may be created by setting this parameter to null. /// @@ -168,20 +168,20 @@ namespace BerkeleyDB { /// object that created it, in circumstances where doing so is safe. If /// is null and /// is non-null, the database can be - /// opened by other threads of control and will be replicated to client + /// opened by other threads of control and be replicated to client /// sites in any replication group. /// /// /// If is null, but - /// is set, the operation will - /// be implicitly transaction protected. Note that transactionally - /// protected operations on a datbase object requires the object itself - /// be transactionally protected during its open. Also note that the + /// is set, the operation + /// is implicitly transaction protected. Transactionally + /// protected operations on a database object requires the object itself + /// be transactionally protected during its open. The /// transaction must be committed before the object is closed. /// /// /// - /// The name of an underlying file that will be used to back the + /// The name of an underlying file used to back the /// database. In-memory databases never intended to be preserved on disk /// may be created by setting this parameter to null. /// @@ -230,18 +230,23 @@ namespace BerkeleyDB { #region Callbacks private static int doDupCompare( - IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p) { + IntPtr dbp, IntPtr dbt1p, IntPtr dbt2p, IntPtr locp) { DB db = new DB(dbp, false); DBT dbt1 = new DBT(dbt1p, false); DBT dbt2 = new DBT(dbt2p, false); + if (locp != IntPtr.Zero) + locp = IntPtr.Zero; return ((SecondaryBTreeDatabase)(db.api_internal)).DupCompare( DatabaseEntry.fromDBT(dbt1), DatabaseEntry.fromDBT(dbt2)); } - private static int doCompare(IntPtr dbp, IntPtr dbtp1, IntPtr dbtp2) { + private static int doCompare(IntPtr dbp, + IntPtr dbtp1, IntPtr dbtp2, IntPtr locp) { DB db = new DB(dbp, false); DBT dbt1 = new DBT(dbtp1, false); DBT dbt2 = new DBT(dbtp2, false); + if (locp != IntPtr.Zero) + locp = IntPtr.Zero; SecondaryBTreeDatabase tmp = (SecondaryBTreeDatabase)db.api_internal; return tmp.compareHandler( @@ -325,7 +330,7 @@ namespace BerkeleyDB { } /// - /// If false, empty pages will not be coalesced into higher-level pages. + /// If false, empty pages are not coalesced into higher-level pages. /// public bool ReverseSplit { get { -- cgit v1.2.1