Howard Chu
c22a7d98ec
Update caveats now that mdb_reader_check exists
2013-08-20 17:37:53 -07:00
Howard Chu
50ab5bb1ed
Cleanup comments in prev commit
2013-08-19 14:25:13 -07:00
Howard Chu
0c86184bae
More fixes for prev commit
2013-08-19 13:54:17 -07:00
Howard Chu
eaa3469736
Fix 34f832faee
...
Lock ordering issues
2013-08-19 04:28:05 -07:00
Howard Chu
f947f789f3
Fix prev commit
...
Hardcoded number of queues was leftover from preliminary
work. Use connection_pool_queues.
2013-08-18 21:15:30 -07:00
Howard Chu
34f832faee
Multiple queues per threadpool
2013-08-16 19:04:49 -07:00
Howard Chu
f230503b10
Tweak mutex acquisition
...
Slightly reduce held time.
2013-08-16 18:58:39 -07:00
Howard Chu
9121a473de
Merge remote-tracking branch 'origin/mdb.master'
2013-08-16 06:44:58 -07:00
Howard Chu
214e9ed07d
Silence warnings
2013-08-14 09:57:25 -07:00
Hallvard Furuseth
82b27c09c9
Tweak ITS#7615 fix: Obey strict-aliasing rules.
...
Do not access a long long as an array of longs.
2013-08-14 15:21:59 +02:00
Howard Chu
5b2bfec3b4
More for 907b9d4877
...
op.o_extra is only used with threading
2013-08-14 03:51:29 -07:00
Howard Chu
2b7237bdcf
Merge remote-tracking branch 'origin/mdb.master'
2013-08-13 13:35:46 -07:00
Howard Chu
76f0a02485
ITS#7664 better fix
...
For RDONLY, don't get lockfile until we know datafile exists.
Also, don't try to create a new datafile for me_mfd if someone
deleted it after we got me_fd.
2013-08-13 13:12:47 -07:00
Howard Chu
a77ffaaa5d
Revert "ITS#7664 delete lockfile if there is no environment"
...
This reverts commit 8725838409
.
2013-08-13 13:05:32 -07:00
Howard Chu
beca9bbb15
Merge remote-tracking branch 'origin/mdb.master'
2013-08-13 11:36:50 -07:00
Howard Chu
8725838409
ITS#7664 delete lockfile if there is no environment
2013-08-13 11:34:32 -07:00
Howard Chu
cec27aa517
Fix prev commit
2013-08-12 15:04:51 -07:00
Howard Chu
907b9d4877
Fixes for threaded indexer
...
Works now, but still 2x slower. Leave disabled.
2013-08-12 14:50:54 -07:00
Howard Chu
c740cbc1e5
Merge remote-tracking branch 'origin/mdb.master'
2013-08-12 12:49:24 -07:00
Howard Chu
eaeeecc3b2
Fix uninit'd mem ref in mdb_page_split
...
Don't compare cursors beyond their depth. (detected by valgrind)
2013-08-12 12:43:42 -07:00
Howard Chu
6e9762f9e7
Merge remote-tracking branch 'origin/mdb.master'
2013-08-11 17:27:17 -07:00
Howard Chu
6ecee1cbf9
Tweak NODUPDATA flag check
...
Should allow for the possibility of future flag combos.
2013-08-11 17:25:00 -07:00
Howard Chu
76c8fd5c6c
Merge remote-tracking branch 'origin/mdb.master'
2013-08-11 17:18:20 -07:00
Howard Chu
5a5d33ff33
Fix obscure MDB_MULTIPLE bug
...
If a key has a single existing value, and then a put (MDB_MULTIPLE)
is done where the first of the multiple values matches the existing
value, the put would return SUCCESS without writing any of the
values. Fixed to loop to the next value as intended.
2013-08-11 17:15:03 -07:00
Howard Chu
ab44974baf
Merge remote-tracking branch 'origin/mdb.master'
2013-08-10 16:20:47 -07:00
Howard Chu
76f8b77e36
Point to mdb.c for docs on macros in Makefile
2013-08-10 16:19:44 -07:00
Howard Chu
634dcb507e
Merge remote-tracking branch 'origin/mdb.master'
2013-08-10 05:05:57 -07:00
Howard Chu
64f06d5acc
ITS#7662 cleanup reader txn in mdb_entry_get()
2013-08-10 05:05:16 -07:00
Hallvard Furuseth
9c49ef1d71
Avoid compiling debug args with C90 compilers.
...
Use double DPRINTF() parenthesis, so varargs macros are not needed.
Parenthesize MDB_DEBUG, in case the user defines it as foo || bar.
2013-08-10 13:50:10 +02:00
Hallvard Furuseth
76d31573a4
Refuse ops on bad txns
2013-08-10 13:23:30 +02:00
Hallvard Furuseth
9beea541e1
Replace EINVALs with generalized MDB_INCOMPATIBLE.
...
Also check xcursor instead of DUPSORT, it's slightly briefer.
2013-08-10 13:23:30 +02:00
John Hewson
ef899fe84e
ITS#7656 fix install target
2013-08-10 04:13:24 -07:00
Salvador Ortiz
86551828ab
ITS#7660 Add mdb_txn_env to API
2013-08-10 04:06:16 -07:00
Hallvard Furuseth
5645812f41
mdb_txn_commit(): Always commit if MDB_TXN_SPILLS.
...
Checking dirty_list was insufficient after a spill
with no named databases and no positioned cursors.
2013-08-10 12:29:45 +02:00
Salvador Ortiz
92eb220184
ITS#7661 mdb_dbi_flags(): Allow main DBI
2013-08-10 09:42:19 +02:00
Howard Chu
19737680d1
ITS#7659 add directoryString compatible syntaxes
...
countryString and telephoneNumber were missing
2013-08-09 10:08:09 -07:00
Howard Chu
968a2872dd
Merge remote-tracking branch 'origin/mdb.master'
2013-08-09 09:07:14 -07:00
Salvador Ortiz
335f0e4cee
mdb_del must ignore data if db not opened with MDB_DUPSORT
2013-08-09 09:05:44 -07:00
Howard Chu
e766d02f67
Merge remote-tracking branch 'origin/mdb.master'
2013-08-09 08:46:47 -07:00
Howard Chu
1ac3c8308f
Add mdb_env_get_maxkeysize()
2013-08-09 04:51:33 -07:00
Hallvard Furuseth
1ecd86b14c
Replace unpredictable EINVAL error returns.
...
Return EINVAL only for simple programmer errors.
2013-08-09 13:05:14 +02:00
Hallvard Furuseth
22c104c5d7
Re-fix reader-pid code
2013-08-09 12:54:42 +02:00
Hallvard Furuseth
38b11b1de1
mdb_cursorpages_mark: Mark current txn and no more.
...
Ignore parent txn cursors since it is the current txn's dirty_list
which will be flushed. But check the current txn also when clearing,
since cursors can have pages which are dirty in a parent.
Check !mc_xcursor instead of !MDB_DUPSORT. Equivalent for valid
data, but a bit safer if the sub-DB flags are corrupt.
2013-08-08 19:57:52 +02:00
Hallvard Furuseth
2bd5d8102e
Fix mdb_ovpage_free() vs. spill.
...
Ensure me_pghead has room before removing from spill/dirty list.
Don't return pages to me_pghead in nested txns, use mt_free_pgs.
2013-08-08 19:57:52 +02:00
Hallvard Furuseth
c3547e81f3
Fix page spilling when MDB_WRITEMAP.
...
mdb_page_spill(): Don't binary-search the unsorted dirty_list.
mdb_page_flush(): Don't overwrite unprocessed dirty_list items.
2013-08-08 19:57:51 +02:00
Hallvard Furuseth
ee5ba85565
Set MDB_TXN_ERROR when inconsistent txn state
2013-08-08 19:57:51 +02:00
Hallvard Furuseth
ffd2287b55
Factor out MDB_env.
2013-08-08 19:54:54 +02:00
Hallvard Furuseth
d66739f947
MDB_LOCK_VERSION -> MDB_LOCK_FORMAT.
...
Pid locking needs a different lockfile-version: MDB_env's with and
without pid locking must not coexist, they can sabotage each other.
Store MDB_LOCK_FORMAT = (version | "use locking" flag) instead.
2013-08-08 19:43:04 +02:00
Hallvard Furuseth
1878213092
Fix mdb_reader_pid().
...
Treat unexpected errors as "don't know". Invert Pidcheck return
value, so nonzero including error codes = "the process may exist".
On Windows: Catch exited but still existing processes. Handle
undefined PROCESS_QUERY_LIMITED_INFORMATION.
On Unix: don't trust F_GETLK error to leave the input alone,
the fcntl() doc seems unclear.
2013-08-08 19:43:04 +02:00
Howard Chu
636c2d2a29
Use proper printf format on Windows
2013-08-07 12:42:46 -07:00