Commit Graph

21028 Commits

Author SHA1 Message Date
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
Howard Chu
d623dc9b39 Merge remote-tracking branch 'origin/mdb.master' 2013-07-30 13:48:01 -07:00
Howard Chu
bc03467040 Fix typo in Win32 branch 2013-07-30 13:44:28 -07:00
Howard Chu
d534e11495 Merge remote-tracking branch 'origin/mdb.master' 2013-07-30 12:51:54 -07:00
Howard Chu
254b77e63d Cleanup prev commit
Loop on copyfd meta write, since pipes may return after partial write.
2013-07-30 12:47:12 -07:00
Howard Chu
eff35fcb2a ITS#7652 fix I/O error checks
partial revert of d6d2638acc and
26a25df5fc

The original code was already tested and working correctly.
2013-07-30 10:22:12 -07:00
Howard Chu
115460ae53 ITS#7645 use ldap_pvt_tls_config for TLSProtocolMin 2013-07-29 07:04:03 -07:00
Philip Guenther
c6cf495247 ITS#7645 more OpenSSL TLS versions 2013-07-29 07:01:15 -07:00
Howard Chu
fbeee4d27f ITS#7645, #5655 TLSProtocolMin docs 2013-07-29 06:50:18 -07:00
Howard Chu
0f4b5bdd88 ITS#5655 cleanup 2013-07-29 06:40:02 -07:00
Philip Guenther
dcf97caf11 ITS#5655 TLS_PROTOCOL_MIN setting 2013-07-29 06:38:27 -07:00
Howard Chu
4f4590f110 Merge remote-tracking branch 'origin/mdb.master' 2013-07-28 17:13:04 -07:00