⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 logrec.so

📁 berkeley db 4.6.21的源码。berkeley db是一个简单的数据库管理系统
💻 SO
字号:
m4_comment([$Id: logrec.so,v 10.31 2004/08/05 14:16:56 bostic Exp $])m4_ref_title(Access Methods,    Logical record numbers,    logical @record numbers,    am_conf/select, am_conf/pagesize)m4_p([dnlThe m4_db Btree, Queue and Recno access methods can operate on logicalrecord numbers.  Record numbers are 1-based, not 0-based, that is, thefirst record in a database is record number 1.])m4_p([dnlIn all cases for the Queue and Recno access methods, and when callingthe Btree access method using the m4_ref(dbh_get) and m4_refT(dbc_get)swith the m4_ref(DB_SET_RECNO) flag specified, the m4_arg(data) field ofthe key m4_ref(Dbt) must be a pointer to a memory location of typem4_arg(db_recno_t), as typedef'd in the standard m4_db include file.The m4_arg(size) field of the key m4_ref(Dbt) should be the size of thattype (for example, "sizeof(db_recno_t)" in the C programming language).The m4_arg(db_recno_t) type is a 32-bit unsigned type, which limits thenumber of logical records in a Queue or Recno database, and the maximumlogical record which may be directly retrieved from a Btree database,to 4,294,967,295.])m4_p([dnlRecord numbers in Recno databases can be configured to run in eithermutable or fixed mode: mutable, where logical record numbers change asrecords are deleted or inserted, and fixed, where record numbers neverchange regardless of the database operation.  Record numbers in Queuedatabases are always fixed, and never change regardless of the databaseoperation.  Record numbers in Btree databases are always mutable, andas records are deleted or inserted, the logical record number for otherrecords in the database can change.  Seem4_link(M4RELDIR/ref/am_conf/renumber, Logically renumbering records)for more information.])m4_p([dnlWhen appending new data items into Queue databases, record numbers wraparound.  When the tail of the queue reaches the maximum record number,the next record appended will be given record number 1.  If the head ofthe queue ever catches up to the tail of the queue, m4_db will returnthe system error EFBIG.  Record numbers do not wrap around when appendingnew data items into Recno databases.])m4_p([dnlConfiguring Btree databases to support record numbers can severely limitthe throughput of applications with multiple concurrent threads writingthe database, because locations used to store record counts often becomehot spots that many different threads all need to update.  In the caseof a Btree supporting duplicate data items, the logical record numberrefers to a key and all of its data items, as duplicate data items arenot individually numbered.])m4_p([dnlThe following is an example function that reads records from standardinput and stores them into a Recno database.  The function then uses acursor to step through the database and display the stored records.])include(ref/am_conf/logrec.cs)m4_page_footer

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -