1<!--"$Id: 3.0.55.html,v 1.5 2007/05/17 18:17:18 bostic Exp $ (Sleepycat) $Date: 2007/05/17 18:17:18 $"-->
2<html>
3<head>
4<title>The Berkeley DB Package: DB 3.0.55 Change Log</title>
5<meta name="description" content="Berkeley DB: A database programmatic toolkit.">
6<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods">
7</head>
8<body bgcolor=white>
9
10<h3 align=center>Berkeley DB 3.0.55 Change Log</h3>
11
12<h3>Database On-Disk Format Changes:</h3>
13<ol>
14<li>The on-disk Btree/Recno format has changed from version 6 to version
157, and the on-disk Hash format has changed from version 5 to version 6.
16For information on upgrading database formats, see section 3.3, "Upgrading
17databases" in the Berkeley DB Reference Guide
18</ol>
19
20<h3>Major New Features:</h3>
21<ol>
22<li>A new Access Method has been added to Berkeley DB: the Queue Access
23Method.  The Queue Access Method is similar to the Recno Access Method,
24but is implemented to provide significantly higher-concurrency
25queue-oriented append and consume operations.
26<li>Berkeley DB now supports multiple databases (subdatabases) per
27physical file.
28<li>Berkeley DB now supports standard POSIX pthread, UI thread and Solaris
29LWP mutexes.
30<li>Database creation and removal are now optionally transaction protected.
31<li>Berkeley DB now includes a complete Tcl API.
32<li>Berkeley DB now optionally creates dynamic shared libraries.
33</ol>
34
35<h3>Interface Changes:</h3>
36<ol>
37<li>The Berkeley DB interfaces have been reworked in the 3.0.55 release
38for two reasons.  The goals were as follows: to make the Berkeley DB
39structures opaque so future releases of Berkeley DB can be binary
40compatible with each other, provide enhanced error checking and reporting
41during Berkeley DB environment and database configuration and creation,
42provide configurability throughout the lifetime of the environment and
43database, and to make the Berkeley DB interfaces consistent across the
44C++, C and Java APIs.
45
46<p>
47While the C API changes are extensive, they are also simple to understand.
48No functionality was removed.  The changes required comparatively few
49modifications to the C++ and Java APIs, mostly limited to moving methods
50among classes and the addition of a new flag value to a few interfaces.
51For specific instructions on upgrading Berkeley DB 2.X applications to
52this release, see the "Upgrading Berkeley DB 2.X.X applications to
53Berkeley DB 3.0" chapter in the Berkeley DB Reference Guide.
54
55<p>
56The following individual changes are all part of this larger change.
57
58<h4>Function changes:</h4>
59<ol type=a>
60<li>The db_appinit and db_appexit functions have been replaced by the
61db_env_create function and the DBENV-&gt;open and DBENV-&gt;close methods.  The
62db_open function has been removed, replaced by the db_create function and
63the DB-&gt;open method.  Berkeley DB environments are now created using the
64db_env_create function followed by methods on the handle it returns.
65Berkeley DB databases are now created using the db_create function
66followed by methods on the handle it returns.
67
68<li>The lock_open, lock_close and lock_unlink functions have been
69replaced by the db_env_create function and the DBENV-&gt;open, DBENV-&gt;close
70and DBENV-&gt;remove methods.  The remaining lock subsystem functions now
71take a DBENV handle as their first argument instead of a DB_LOCKTAB
72handle.
73
74<li>The log_open, log_close and log_unlink functions have been replaced
75by the db_env_create function and the DBENV-&gt;open, DBENV-&gt;close and
76DBENV-&gt;remove methods.  The remaining log subsystem functions now take a
77DBENV handle as their first argument instead of a DB_LOG handle.
78
79<li>The memp_open, memp_close and memp_unlink functions have been replaced
80by the db_env_create function and the DBENV-&gt;open, DBENV-&gt;close and
81DBENV-&gt;remove methods.  The remaining shared memory buffer pool functions
82now take a DBENV handle as their first argument instead of a DB_MPOOL
83handle.
84
85<li>The txn_open, txn_close and txn_unlink functions have been replaced
86by the db_env_create function and the DBENV-&gt;open, DBENV-&gt;close and
87DBENV-&gt;remove methods.  The remaining transaction subsystem functions now
88take a DBENV handle as their first argument instead of a DB_TXNMGR handle.
89
90<li>The db_jump_set and db_value_set functions have been replaced by
91methods on the DBENV handle.
92
93<li>The db_xa_open routine has been replaced by a new flag, DB_XA_CREATE,
94which is passed to the db_create function.
95
96</ol>
97
98<h4>DBENV structure changes:</h4>
99<ol type=a>
100
101<li>The db_errcall, db_errfile, db_errpfx and db_paniccall fields of the
102DBENV structure have been deprecated and their functionality replaced by
103the DBENV-&gt;set_errcall, DBENV-&gt;set_errfile, DBENV-&gt;set_errpfx and
104DBENV-&gt;set_paniccall methods.
105
106<li>The db_verbose field of the DBENV structure has been replaced by the
107DBENV-&gt;set_verbose method.
108
109<li>The lk_conflicts, lk_detect, lk_max and lk_modes fields of the DBENV
110structure have been replaced by the DBENV-&gt;set_lk_conflicts,
111DBENV-&gt;set_lk_detect and DBENV-&gt;set_lk_max methods.
112
113<li>The lg_max field of the DBENV structure has been replaced by the
114DBENV-&gt;set_lg_max method.
115
116<li>The mp_mmapsize and mp_size fields of the DBENV structure have been
117replaced by the DBENV-&gt;set_cachesize and DBENV-&gt;set_mp_mmapsize methods.
118
119<li>The tx_info, tx_max and tx_recover fields of the DBENV structure have
120been replaced by the DBENV-&gt;set_tx_max and DBENV-&gt;set_tx_recover methods.
121
122<li>The (unused) DBENV-&gt;db_lorder field has been deleted.
123</ol>
124
125<h4>DB structure changes:</h4>
126<ol type=a>
127
128<li>The byteswapped field of the DB structure has been replaced by the
129DB-&gt;get_byteswapped method.
130
131<li>The db_errcall, db_errfile, db_errpfx and db_paniccall fields of the
132DB structure have been deprecated and their functionality replaced by the
133DB-&gt;set_errcall, DB-&gt;set_errfile, DB-&gt;set_errpfx and DB-&gt;set_paniccall
134methods.
135
136<li>The type field of the DB structure has been replaced by the
137DB-&gt;get_type method.
138</ol>
139
140<h4>DBINFO structure changes:</h4>
141<ol type=a>
142
143<li>The bt_compare field of the DB structure has been replaced by the
144DB-&gt;set_bt_compare method.
145
146<li>The bt_minkey field of the DB structure has been replaced by the
147DB-&gt;set_bt_minkey method.
148
149<li>The bt_prefix field of the DB structure has been replaced by the
150DB-&gt;set_bt_prefix method.
151
152<li>The db_cachesize field of the DB structure has been replaced by the
153DB-&gt;set_cachesize method.
154
155<li>The db_lorder field of the DB structure has been replaced by the
156DB-&gt;set_lorder method.
157
158<li>The db_malloc field of the DB structure has been replaced by the
159DB-&gt;set_malloc method.
160
161<li>The db_pagesize field of the DB structure has been replaced by the
162DB-&gt;set_pagesize method.
163
164<li>The dup_compare field of the DB structure has been replaced by the
165DB-&gt;set_dupcompare method.
166
167<li>The flags field of the DB structure has been replaced by the
168DB-&gt;set_flags method.
169
170<li>The h_ffactor field of the DB structure has been replaced by the
171DB-&gt;set_h_ffactor method.
172
173<li>The h_hash field of the DB structure has been replaced by the
174DB-&gt;set_h_hash method.
175
176<li>The h_nelem field of the DB structure has been replaced by the
177DB-&gt;set_h_nelem method.
178
179<li>The re_delim field of the DB structure has been replaced by the
180DB-&gt;set_re_delim method.
181
182<li>The re_len field of the DB structure has been replaced by the
183DB-&gt;set_re_len method.
184
185<li>The re_pad field of the DB structure has been replaced by the
186DB-&gt;set_re_pad method.
187
188<li>The re_source field of the DB structure has been replaced by the
189DB-&gt;set_re_source method.
190</ol>
191
192<p>
193<li>The use of the POSIX EAGAIN error return to indicate deadlock has been
194replaced with the Berkeley DB specific error DB_LOCK_DEADLOCK.  Note: this
195change could potentially cause subtle errors.  Programs must be updated or
196the Berkeley DB distribution altered for programs to run correctly.  See
197the "Upgrading Berkeley DB 2.X.X applications to Berkeley DB 3.0" chapter
198in the Berkeley DB Reference Guide for more information.
199
200<li>The DB_RMW flag to the DB-&gt;cursor method has been renamed to be
201DB_WRITECURSOR (note, this change is applicable only to the Berkeley DB
202Concurrent Data Store product).
203
204<li>The DB_LOCK structure is no longer a simple integer value.  For this
205reason, the DB_LOCK argument to the lock_put interface has been changed
206to be a reference to a DB_LOCK structure instead of the DB_LOCK structure
207itself.
208
209<li>The db_home argument to the environment creation function
210(historically db_appinit, now DBENV-&gt;open) now overrides the DB_HOME
211environment variable; this is necessary so that the -h option to the
212various Berkeley DB utilities can override the user's environment.
213
214<li>A mode argument was added to the environment creation function
215(historically db_appinit, now DBENV-&gt;open) to allow applications to
216specify the mode of files created in the Berkeley DB environment.
217
218<li>The DB_LOCKDOWN flag was added to enable applications to attempt to
219lock shared memory regions into physical memory.
220
221</ol>
222
223<h3>General Environment Changes:</h3>
224<ol>
225
226<li>A new flag has been added to the DBENV-&gt;open method, DB_SYSTEM_MEM.
227This flag causes Berkeley DB to attempt to allocate memory for its shared
228regions from system shared memory.  This flag supports functionality
229similar to that previously provided by the DB_REGION_ANON and
230DB_REGION_NAME flags to the db_value_set interface.
231
232<li>A new flag has been added to the DBENV-&gt;open method, DB_PRIVATE.  This
233flag causes Berkeley DB to attempt to allocate memory for its shared
234regions from the heap and to assume that only inter-thread mutexes are
235required, and not inter-process ones as well.  This flag is a superset of
236the functionality previously provided by the DB_MPOOL_PRIVATE flag to the
237memp_open interface.
238
239<li>There is a new DBENV method, DBENV-&gt;remove, that removes entire
240Berkeley DB environments.
241
242<li>There are two new methods, DBENV-&gt;set_feedback and DB-&gt;set_feedback,
243that allow applications to specify a callback function that is to be
244called with periodic progress updates on various Berkeley DB operations.
245
246<li>There is a new DBENV method, DBENV-&gt;set_recovery_init, that allows
247applications to install application-specific recovery functions before
248Berkeley DB performs recovery.
249
250<li>There is a new DBENV method, DBENV-&gt;set_verbose, that allows
251applications to request verbose information from the Berkeley DB library.
252
253<li>The Berkeley DB 3.0.55 release includes enhanced functionality for
254reporting Berkeley DB returned errors.  There are two new DBENV methods,
255DBENV-&gt;err and DBENV-&gt;errx, and two new DB methods, DB-&gt;err and DB-&gt;errx,
256which allow applications to format and report Berkeley DB error returns
257using any of the historic output channels.  There is an additional
258function, db_strerror, which is a superset of the ANSI C standard strerror
259function, providing error strings for both the Berkeley DB errors and
260underlying system errors.
261
262<li>There is a new DBENV method, DBENV-&gt;set_lg_bsize, that allows
263applications to specify the size of the in-memory log buffer.
264
265<li>Reduce the number of file descriptors used to support fcntl locking
266from one-per-region to a single one.
267
268<li>Rename the filesystem representations of the Berkeley DB library's
269shared regions.
270
271<li>Rename temporary files created by Berkeley DB from just a printable
272representation of the process ID to "BDB" followed by a printable
273representation of the process ID.
274
275<li>Return an error if environment interfaces called without initial
276environment configuration.
277
278<li>Fix a bug where Concurrent Data Store accepted incorrect flags,
279for example, DB_RECOVERY.
280
281<li>Fix a bug where specifying any one-character directory in the
282db_config argument or other related configuration interface would fail.
283
284<li>Fix a bug where recovery could fail if only a single checkpoint
285had ever been written.
286
287<li>Fix a bug where threads could race when regions were grown.  Because
288there exist systems where mutexes cannot be unmapped and then remapped
289back into application memory, the functionality to grow regions has been
290removed from the Berkeley DB 3.0.55 release.  This means that selecting a
291correct initial region size (for example, based on the number of active
292transactions) is more important than before.  To facilitate this, region
293high-water marks have been added to the region statistics where
294appropriate.
295
296</ol>
297
298<h3>General Access Method Changes:</h3>
299<ol>
300
301<li>There is a new DB method, DB-&gt;remove, that deletes a database in a
302transaction-protected operation.
303
304<li>There is a new DB method, DB-&gt;upgrade, that upgrades the on-disk
305format of an underlying database.
306
307<li>There is a new DB method, DB-&gt;set_realloc, that allows applications
308to specify a local memory reallocation function similarly to the
309previously available DB-&gt;set_malloc functionality.
310
311<li>The DB-&gt;open method supports a new flag, DB_EXCL, which behaves
312similarly to the POSIX O_EXCL system open call flag.
313
314<li>The Berkeley DB 3.0.55 release includes enhanced functionality for
315reporting Berkeley DB returned errors.  There are two new DBENV methods,
316DBENV-&gt;err and DBENV-&gt;errx, and two new DB methods, DB-&gt;err and DB-&gt;errx,
317which allow applications to format and report Berkeley DB error returns
318using any of the historic output channels.  There is an additional
319function, db_strerror, which is a superset of the ANSI C standard strerror
320function, providing error strings for both the Berkeley DB errors and
321underlying system errors.
322
323<li>The last two arguments to the DB-&gt;join method were reversed for
324consistency with the rest of the Berkeley DB interfaces taking cursor
325references and flags arguments.
326
327<li>A cursor duplication method has been added to the DBcursor handle.
328This method can be used to duplicate a cursor's transaction and locker
329ID, and, optionally, to duplicate its position in the database.  This
330change adds useful functionality, and more importantly makes it possible
331to write
332applications that both use locking without transactions and have multiple
333cursors in the same thread of control.
334
335<li>There is a new DBT structure flag, DB_DBT_REALLOC, that allows
336threaded applications to re-use a single piece of memory for
337multiple Berkeley DB retrievals, similarly to the DB_DBT_MALLOC flag.
338
339<li>Enhance in-memory databases so that operations on them may be
340transaction protected.  Fix a bug where specifying logging and
341transactions on an in-memory database could cause a core dump.
342
343<li>Change Berkeley DB recovery to not undo operations performed by
344logged, but not transaction protected operations.
345
346<li>Change Berkeley DB to no longer generate new locker IDs for every
347cursor in non-threaded environments to greatly reduce the possibility
348of self-deadlock.
349
350<li>Change the "dbopen" function in the Berkeley DB 1.85 compatibility
351API to "__dbopen185" so that we don't collide with the C library where
352the C library is version 1.85.
353
354<li>Fix multiple bugs where joins did not correctly work in the presence
355of unsorted duplicates or duplicate duplicates.
356
357<li>Fix an erroneous error message by removing diagnostic code which assumed
358that closing a cursor closed all locks held by the cursor locker ID.
359
360<li>Fix a bug in the default overflow comparison routine such that if the
361overflow comparison test failed because we ran out of key bytes, but were
362also on the last page of the overflow item, we would return equality even
363though there were remaining bytes in the overflow item.
364
365<li>Fix a bug where read-only databases were registered with the logging
366subsystem, causing Berkeley DB recovery to open and close them.
367
368<li>Fix a bug where it was (remotely) possible for a file registered with
369the logging subsystem to be incorrectly evaluated as not logging changes.
370
371<li>Fix a bug where the DBcursor-&gt;c_close method didn't correctly release
372locks in the Berkeley DB Concurrent Data Store product.
373
374<li>Fix a bug where the read-modify-write flag was set in the DB-&gt;put
375method when the database was not configured for locking.
376
377<li>Fix two bugs where the DB-&gt;join and DB-&gt;put methods assumed that the
378only possible error was DB_NOTFOUND, thus failing to return deadlock
379errors to the application.
380
381<li>Fix a bug where illegal flags to the DB-&gt;cursor method weren't caught.
382
383<li>Fix a bug where illegal flags to the DBcursor-&gt;c_get method weren't
384caught.
385
386<li>Fix a bug where the DB_NEXT_DUP flag could be specified with an
387uninitialized cursor.
388
389<li>Fix a bug where the DB-&gt;sync and DB-&gt;close methods did not return the
390DB_INCOMPLETE error if it occurred.
391
392<li>Fix a bug where off-page duplicate splits could cause cursors to be
393mis-positioned.
394
395<li>Fix a bug where partial puts of fixed-length records could cause
396data corruption.
397
398<li>Fix a set of potential bugs where the OSF/1 and gcc compilers will
399use instructions requiring alignment on unaligned data.
400
401<li>Fix multiple bugs with large numbers of duplicate records including
402large numbers of duplicate duplicate records.
403
404</ol>
405
406<h3>Btree Access Method Changes:</h3>
407<ol>
408
409<li>The on-disk Btree/Recno format has changed from version 6 to version 7,
410required due to a change in the database metadata page.
411
412<li>The Btree cursor routines have been rewritten to use the new cursor
413duplicate functionality.  This fixed a couple of bugs where specific
414sequences of database operations could cause the cursor to become
415mis-positioned in the database and made it less likely that similar bugs
416can be introduced in the future.
417
418<li>Applications may now optionally turn off reverse-splitting in Btree
419databases.
420
421<li>Btree split operations have been reworked to acquire the metadata page
422lock last, and only if the split is going to succeed.  This significantly
423increases the possible level of concurrency in small databases.
424
425<li>Fix a bug where database corruption could occur if enough threads
426writing to a small database all schedule page splits.
427
428<li>Fix a bug where the DB_SET_RANGE option could return an already
429deleted on-page duplicate record to the application.
430
431<li>Fix a bug where an application could core dump if deadlock occurred
432during cursor close.
433
434<li>Fix a bug where applications with high-concurrency requirements could
435encounter races.
436
437<li>Fix a bug where read serializability was incorrect.
438
439<li>Fix a bug where records of the wrong endian-ness were not correctly
440imported.
441
442<li>Fix a bug where an application's cursor could be mis-positioned if
443a split failed unexpectedly.
444
445<li>Fix a bug where the DB_SET_RECNO, DB_SET and DB_GET_BOTH flags
446could potentially return inexact matches under some circumstances.
447
448<li>Fix a bug where searches could potentially leave pages in the
449database locked.
450
451<li>Fix a bug where deleted records could potentially be left in the
452database after all cursors were closed.
453
454<li>Fix a bug where deleting the last duplicate entry on a page could
455cause an application core dump.
456
457<li>Fix a bug where a page lock could be incorrectly discarded when
458moving through on-page duplicate items.
459
460<li>Fix a bug where retrieval of a specific duplicate data item could
461cause a core dump.
462
463<li>Fix a bug where DB_CURRENT could erroneously release the cursor's
464page lock.
465
466<li>Fix a bug where the DB-&gt;del interface to a Btree database could leave
467a cursor mis-positioned under some circumstances.
468
469<li>Fix a memory leak when using the DB-&gt;del interface to delete records.
470
471<li>Fix a bug where specifying the DB_DBT_PARTIAL flag and a dbt.off value
472when creating a new record included garbage in the record.
473
474<li>Fix a bug where Btree statistics did not correctly account for
475overflow and off-page duplicate pages.
476
477<li>Fix a bug where Btree statistics could fail and leave database
478pages locked.
479
480<li>Fix a bug where page LSNs could be lost during recovery of a page
481split.
482
483<li>Fix a bug where empty pages in big-endian databases were not
484always correctly converted.
485
486<li>Fix a bug where previously deleted records could be accessed on
487the page, leading to potentially incorrect behavior.
488
489<li>Fix a bug where on-page duplicates could be corrupted when reading
490non-native-endian databases.
491
492</ol>
493
494<h3>Hash Access Method Changes:</h3>
495<ol>
496
497<li>The on-disk Hash format has changed from version 5 to version 6,
498required due to a change in the database metadata page.
499
500<li>In order to allow hash databases as subdatabases, hash will allocate
501groups of contiguous pages.  This may cause some hash databases to appear
502much larger than they actually are (that is, they will be sparse files).
503
504<li>Statistics, returned by the DB-&gt;stat method, have been added to the
505Hash Access Method.
506
507<li>Fix a bug where initial access of a duplicate data item could cause
508future access of other items to fail.
509
510<li>Fix a bug where puts or deletes could cause cursors on the same page to
511reference incorrect entries.
512
513<li>Fix a bug where partial gets from on-page duplicates could be wrong.
514
515<li>Fix a set of bugs where error paths could lead to application failure.
516
517<li>Fix a set of bugs where cursors could be mis-positioned after operations
518on off-page duplicates or off-page duplicates could be stored in incorrect
519sorted order.
520
521<li>Fix a bug where overwriting duplicate items could fail.
522
523<li>Fix a bug where an error return value could be overwritten when
524releasing the metadata page.
525
526</ol>
527
528<h3>Queue Access Method Changes:</h3>
529None.
530
531<h3>Recno Access Method Changes:</h3>
532<ol>
533
534<li>Support read-only backing source files for Recno databases.
535
536<li>Fix a bug where accessing the backing source filename could find
537incorrect information or cause a core dump.
538
539<li>Fix a bug where the length of fixed-length Recno records were not
540correctly byte-swapped during database load.
541
542<li>Fix a set of related bugs where the DB_DBT_PARTIAL flag was
543incorrectly handled when manipulating fixed-length records.
544
545<li>Fix a bug where the key created by the DB_AFTER and DB_BEFORE operations
546was not correctly returned.
547
548<li>Fix a set of related bugs where certain sequences of operations could
549leave application cursors mis-positioned.
550
551<li>Fix a bug where deleting the last record in a database could leave an
552application cursor mis-positioned.
553
554<li>Fix a bug where DB_APPEND returned an error instead of appending to
555the database.
556
557<li>Fix a bug where specifying the DB_CURRENT, DB_FIRST or DB_NEXT flags
558could fail because insufficient records had been read from the backing file.
559
560<li>Fix a bug where page splits could result in an incorrect previous
561page pointer.
562
563<li>Fix a bug where the DB_GET_BOTH flag was permitted for Recno, which
564does not support it.
565
566</ol>
567
568<h3>C++ API Changes:</h3>
569<ol>
570<li>Remove the DbLockTab, DbLog, DbMpool and DbTxnMgr classes, moving
571their methods to the DbEnv class.
572
573<li>Replace the set_error_model method with the DB_CXX_NO_EXCEPTIONS flag
574to the DbEnv class constructor.
575
576<li>Added constructor with a single flag argument for DbEnv and Db.
577Added (nonstatic) open methods to DbEnv, Db.
578
579<li>Methods (such as DbLock::put) that used to have a DbMpool, DbLockTab,
580DbLog, or DbTxnMgr pointer argument, now take a DbEnv pointer argument.
581
582<li>Added DbEnv::set_feedback(), DbEnv::set_recovery_init().
583
584<li>Added DbEnv::strerror(), DbEnv::err(), DbEnv::errx()
585
586<li>Added BtrecExample, a Btree record example.
587
588<li>Fix a bug where the error model was not set before the initial
589environment was opened.
590
591</ol>
592
593<h3>Java API Changes:</h3>
594<ol>
595
596<li>Remove the DbLockTab, DbLog, DbMpool and DbTxnMgr classes, moving
597their methods to the DbEnv class.
598
599<li>Added constructor with a single flag argument for DbEnv and Db.
600Added (nonstatic) open methods to DbEnv, Db.
601
602<li>Methods (such as DbLock.put) that used to have a DbMpool, DbLockTab,
603DbLog or DbTxnMgr argument, now take a DbEnv argument.
604
605<li>Added DbEnvFeedback, DbRecoverInit interfaces that are used as 'callbacks'
606with DbEnv.set_feedback(), DbEnv.set_recovery_init().
607
608<li>Added DbEnv.strerror(), DbEnv.err(), DbEnv.errx()
609
610<li>Added DbDeadlockException, DbMemoryException classes to allow catching of
611more specific errors.
612
613<li>Added DbHashStat class.
614
615<li>Added BtrecExample, a Btree record example.
616
617<li>Updated AccessExample to illustrate technique of subclassing from Dbt
618to handle arbitrary data types, in this case to create a StringDbt class.
619
620</ol>
621
622<h3>Tcl API Changes:</h3>
623None.
624
625<h3>XA Resource Manager Changes:</h3>
626<ol>
627<li>Fix a bug where it was possible to specify both JOIN and RESUME to
628the XA start interface.
629
630<li>Fix a bug where the current txn ID was not invalidated after
631commit/prepare/abort, as the resource manager process does not call
632xa_end.
633
634<li>Fix a bug where the TMRESUME and TMONEPHASE flags were incorrectly
635checked in the xa_start interface.
636
637</ol>
638
639<h3>Locking Subsystem Changes:</h3>
640<ol>
641
642<li>The lock_detect interface has been modified to optionally return a
643count of the number of deadlocks broken.
644
645<li>The lock_detect routine has been modified to break as many deadlocks
646as possible during each run instead of returning after breaking a single
647deadlock.
648
649<li>The lock subsystem lock_put and lock_vec calls will no longer return
650DB_LOCK_NOTHELD or EACCES errors under any circumstances to indicate that
651a lock was held by another locker.
652
653<li>The lock_stat function now returns the following additional information:
654<ul><ol type=a>
655<li>st_lock_id: The last allocated lock ID.
656<li>st_maxnlockers: The maximum lockers at any one time.
657</ol></ul>
658The lock_stat function no longer returns the following information:
659<ul><ol type=a>
660<li>st_magic: The magic number that identifies a file as a lock file.
661<li>st_numobjs: The number of unique objects locked.
662<li>st_refcnt: The number of references to the region.
663<li>st_version: The version of the lock file type.
664</ol></ul>
665
666<li>Lock IDs are now allowed to wrap, rather than being limited to two
667billion.
668
669<li>Fix a bug in lock detection where it was possible to lose track of
670lockers.
671
672<li>Fix a bug where all locks held on an object were not necessarily
673released when DB_LOCK_PUT_OBJ was requested.
674
675<li>Fix a bug where the lock subsystem did not detect a lock conflict if
676there was no transaction.
677
678<li>Fix a bug where lock_detect could treat the DB_LOCK_OLDEST and
679DB_LOCK_YOUNGEST flags as semantically equivalent.
680
681<li>Fix a bug where locks waiting on an aborted lock were not correctly
682promoted at the time of the abort.
683
684<li>Fix a bug where committing a child that held no locks was treated
685as an error.
686
687<li>Fix a bug where deadlock detection was done incorrectly in the case
688of transactions with nested children.
689
690<li>Fix a bug where parent transactions which had never obtained locks
691were incorrectly handled when child transactions committed.
692
693<li>Fix a bug where the library could dump core if multiple deadlock
694detectors were running simultaneously.
695
696</ol>
697
698<h3>Logging Subsystem Changes:</h3>
699<ol>
700
701<li>The log_register function no longer takes a DBTYPE argument.
702
703<li>Open log files with the Windows FILE_FLAG_WRITE_THROUGH flag
704on Windows systems that support it.
705
706<li>Make verbose message "Finding last valid log LSN" optional based
707on the DBENV-&gt;set_verbose method.
708
709<li>Modify log to not attempt to allocate unreasonably large buffers
710when reading garbage from the log.
711
712<li>Modify log_register to re-use file identifiers to avoid running
713out in applications that repeatedly open and close files.
714
715<li>The log_stat function now returns the following additional information:
716<ul><ol type=a>
717<li>st_lg_bsize: The in-memory log record cache size.
718<li>st_wcount: The number of times the log has been written to disk.
719<li>st_wcount_fill: The number of times the log has been written to disk
720because the in-memory log record cache filled up.
721</ol></ul>
722The log_stat function no longer returns the following information:
723<ul><ol type=a>
724<li>st_refcnt: The number of references to the region.
725</ol></ul>
726
727<li>Fix a bug where the last-known-LSN-on-disk wasn't being set correctly,
728causing the next log_flush call to decide not to flush the current
729contents of the buffer to disk, and losing the recovery checkpoint record.
730
731<li>Fix a bug where recovery was not returning the next-to-last checkpoint,
732rather it always returned the last checkpoint.
733
734<li>Fix a number of related bugs in file registry, that could lead to
735crashes during recovery in applications that repeatedly created, opened
736and closed files.
737</ol>
738
739<h3>Buffer Pool Subsystem Changes:</h3>
740<ol>
741
742<li>The Berkeley DB 3.0.55 release still limits the buffer pool to a 4GB
743cache.  However, the method for setting the Berkeley DB buffer cache size,
744DBENV-&gt;set_cachesize, has been changed to allow applications to specify
745cache sizes larger than 4GB, in preparation for relaxing that limitation.
746In addition, applications may specify that multiple pieces of shared
747memory are to be used to create the cache, for architectures that do not
748support 4GB chunks of contiguous shared memory.
749
750<li>Add a new semantic for memp_sync, if the LSN argument is NULL, flush
751the entire buffer cache.
752
753<li>The DB_MPOOL_PRIVATE flag to the db_appinit and memp_open functions
754has been removed, replaced by the DB_PRIVATE flag to the DBENV-&gt;open
755method.
756
757<li>The memp_stat function no longer returns the following information:
758<ul><ol type=a>
759<li>st_refcnt: The number of references to the region.
760</ol></ul>
761
762<li>Allow for OS-specific functions that preallocate pages in files since
763non-POSIX systems (read as "Windows") will give you garbage in the middle
764of a file (let's talk about security).
765
766<li>Fix a bug where transaction checkpoint could pin down the entire
767buffer cache, starving requests for new buffers.
768
769<li>Fix a bug where systems with large POSIX pthread structures could
770allocate too little memory for the default pool.
771
772<li>Fix a bug where highly concurrent systems could end up with incorrect
773buffers-to-flush counts during cache syncs.
774
775<li>Fix a bug where the wrong page number could be used when allocating
776new pages.
777
778</ol>
779
780<h3>Transaction Subsystem Changes:</h3>
781<ol>
782
783<li>The txn_begin function now takes a flag parameter.  This allows
784specification of synchronous or asynchronous log flushing behavior on a
785per-transaction basis during begin.  Applications may also specify a flag
786that causes Berkeley DB to return an error immediately if any lock is
787unavailable, rather than waiting for the lock.
788
789<li>The txn_commit function now takes a flag parameter.  This allows
790specification of synchronous or asynchronous log flushing behavior on a
791per-transaction basis during commit.
792
793<li>The txn_stat function now returns the following additional information:
794<ul><ol type=a>
795<li>st_maxnactive: The maximum number of active transactions at any one time.
796<li>parentid: The st_txnarray structure includes a new field, parentid,
797which is the transaction ID of the parent transaction (or 0, if no
798parent).
799</ol></ul>
800The txn_stat function no longer returns the following information:
801<ul><ol type=a>
802<li>st_refcnt: The number of references to the region.
803</ol></ul>
804
805<li>Do not complain about "missing files" during recovery if no operations
806were performed on the file.
807
808<li>Free the recovery dispatch table after recovery has completed.
809
810<li>Fix a bug where it was possible to overwrite the checkpoint LSN
811during checkpoint.
812
813<li>Fix a bug where an uncommitted child TXN was not committed when its
814parent TXN committed.
815
816<li>Fix a bug where nested transactions could be undone in an incorrect
817order in the presence of parents making modifications to pages already
818modified by the child.
819</ol>
820
821<h3>Utility Changes:</h3>
822<ol>
823
824<li>Change the output of the db_dump utility to support subdatabases.
825The db_load utility supports both the old and new input formats of
826the db_dump utility.
827
828<li>Add the -k option to the db_dump utility to support dumping Queue and
829Recno databases without altering their key values.
830
831<li>Add the -l and -s options to the db_dump utility to support
832subdatabases.
833
834<li>Modify the -d option to the db_dump utility to support different
835output formats as part of recovery testing.
836
837<li>Modify the -N option for utilities supporting it to not only not
838acquire Berkeley DB mutexes, but to also ignore any other potentially
839fatal errors or corruption.
840
841<li>Add the -e option to db_stat, to display per-environment statistics.
842
843<li>Add the -s options to the db_stat utility to support subdatabases.
844
845<li>The db_stat utility will now print out page or record numbers when
846displaying lock information for locks obtained by the access methods.
847
848<li>Fix a bug where db_stat could drop core if called incorrectly.
849
850<li>Fix a bug where db_recover would force regions to be created at the
851default size instead of the size requested by the application.
852
853<li>Fix bugs where the db_checkpoint and db_deadlock utilities incorrectly
854wrote their process IDs to their log files.
855
856<li>Fix bugs where some of the Berkeley DB provided utilities had
857inconsistent POSIX signal handling.  Block SIGPIPE on applicable systems
858in case the utility output is being piped to another process.
859</ol>
860
861<h3>Configuration, Documentation, Portability and Build Changes:</h3>
862
863<ol>
864
865<li>The documentation has been extensively rewritten and enhanced, in
866particular, the Berkeley DB Reference Guide has been completed.
867
868<li>The University of California, Berkeley copyright clause relating to
869acknowledgement within advertising materials has been deleted from the
870Berkeley DB copyrights.
871
872<li>Berkeley DB now optionally builds dynamic shared libraries, see the
873--enable-dynamic configuration option for more information.
874
875<li>Add support on Windows for sharing files in system-specific way
876supporting the new DB_SYSTEM_MEM.
877
878<li>The Windows/3.1 support has been removed from the distribution.
879
880<li>Java support has been integrated in the project file that is part of
881the Visual C++ workspace.
882
883<li>Java support has been integrated into the standard build Makefile.
884
885<li>Changed DLL names to use conventions like libdb30d.dll.  Debug vs.
886release libraries and different release numbered libraries can now be
887distinguished.
888
889<li>The Solaris/Sparc V9 platform has 8-byte dev_t, ino_t and time_t
890values, which required the database file unique ID to be rewritten.
891
892<li>The configuration include file for Berkeley DB has been renamed from
893"config.h" to "db_config.h" to minimize the potential for name collision
894with other packages.
895
896<li>Some C++ operator=() methods that did not have a return type now have
897return type void.
898
899<li>Allow for different JNI's implementation of AttachCurrentThread().
900
901<li>Multiple changes to make it easier for applications to use the
902Berkeley DB recovery infrastructure to accomplish recovery of their
903own objects.
904
905<li>Separate out the Berkeley DB distribution script that creates the log
906marshalling/unmarshalling layer source code so that it can be called
907separately by application-specific logging code.
908
909<li>Add a file to the build_unix subdirectory, some Linux releases have
910archive exploders that will not extract directories containing only
911symbolic links.
912
913<li>The external variable errno support has been extracted out of the main
914library source code, and is now encapsulated in a single source file.
915
916<li>Rename the getlong() subroutine to __db_getlong() to eliminate a
917potential namespace collision.
918
919<li>Replace all "int" file descriptors with system-independent file
920handle structures.
921
922<li>The db_jump_set interface has be replaced with methods on the DBENV
923handle.
924
925<li>The db_value_set interface has be replaced with methods on the DBENV
926handle.
927
928<li>The Berkeley DB test suite has been rewritten to match the new Tcl API,
929and a large number of new tests have been added.
930
931<li>All SCCS Ids yanked to 11.X and copyrights updated to include 1999.
932
933<li>Add Gcc/Alpha assembly mutex support.
934
935<li>Add guard-byte support for allocated memory when DIAGNOSTIC #defined.
936
937<li>Fix a bug in ndbm compatibility API code to correct for the O_WRONLY flag.
938
939<li>Fix a bug in the OS layer where the return of the lseek() call could
940be cast to an int.
941
942</ol>
943
944</body>
945</html>
946