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
Howard Chu
f39d537e2b
ITS#7645 more for TLSProtocolMin
2013-08-07 11:08:09 -07:00
Hallvard Furuseth
74ed1757a4
Silence warnings
2013-08-05 10:01:39 +02:00
Hallvard Furuseth
27435aa5ac
Tweak comments
2013-08-05 09:55:57 +02:00
Hallvard Furuseth
6214423163
Clarify doc: mdb_copy, nested txns, mdb_drop().
...
mdb_copy: Does not copy lockfile. Can trigger file growth.
mdb_txn_begin(): Clarify usage restrictions.
mdb_drop(): State what to do rather than what will be done, since
closing the handle could otherwise be read as happening even at failure.
2013-08-05 09:55:48 +02:00
Howard Chu
0626df2cf1
ITS#7591 fix back-meta missing result msgs
2013-08-02 04:44:57 -07:00
Howard Chu
8e28696f31
ITS#7654 fix implicit declaration warnings
2013-08-02 04:03:05 -07:00
Howard Chu
45792bc592
Merge remote-tracking branch 'origin/mdb.master'
2013-07-31 08:14:39 -07:00
Howard Chu
2cc2574d84
Tweak prev commit again
...
Make sure errors are propagated from init_meta
2013-07-31 08:09:40 -07:00