![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
hello all, I'm new to Berkeley DB...so I have some question about BDB. 1.Should I use Transaction handle when 2 threads are running(one is read-only, one is write-only). I don't need to keep a consistency. If you are going to have 2 thread with a reader and writer then you |
|
2.I write following example code.. DB * m_dbHandle; DBC * cur; DBT key, data; m_dbHandle->cursor(m_dbHandle, NULL, &cur, 0); memset(&key, 0, sizeof(DBT)); memset(&data, 0, sizeof(DBT)); key.data = &somekeydata; key.size = sizeof(somekeydata); cur->c_get(cur, &key, &value, DB_SET); <<----here..error occurred. Is some mistake exist? DBENV option is DB_CREATE | DB_INIT_LOCK | DB_THREAD | DB_INIT_MPOOL ; DB option is DB_THREAD | DB_CREATE; what can i do ? Thanks for your answer ^^ |
#3
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |