Skip to Main Content

Berkeley DB Family

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

questions about flags(DB_DBT_MALLOC or 0) in DBT

1025093Jul 15 2013 — edited Jul 24 2013

Hi,

I have several questions about DBT flag, who could help clarify them?

I am clear about flag DB_DBT_MALLOC/DB_DBT_USERMEM, but when I use get without cursors, what the memory to which the pointer stored into the DBT refers if I use flag 0? Do I need to free the memory?

If use cursor get, I see examples in the manual seem always use flag 0. What the memory refers? Is it safe to change the data it refers then put the new data? Do I need to free the memory? Can I use DB_DBT_MALLOC/DB_DBT_USERMEM when use cursor get? Is it ok to use cursor get one record first, then use put to replace this record's data without cursor?

Can you give suggestion when to use flag 0?

Thanks in advance!

Min

This post has been answered by Winter Zhang-Oracle on Jul 23 2013
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 21 2013
Added on Jul 15 2013
4 comments
2,582 views