From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp-1.sys.kth.se (smtp-1.sys.kth.se [130.237.32.175]) by krisdoz.my.domain (8.14.5/8.14.5) with ESMTP id q58DcO8A025742 for ; Fri, 8 Jun 2012 09:38:25 -0400 (EDT) Received: from mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) by smtp-1.sys.kth.se (Postfix) with ESMTP id C9C1C1579A5 for ; Fri, 8 Jun 2012 15:38:18 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-1.sys.kth.se ([130.237.32.175]) by mailscan-1.sys.kth.se (mailscan-1.sys.kth.se [130.237.32.91]) (amavisd-new, port 10024) with LMTP id Fu66GDbqjQ8c for ; Fri, 8 Jun 2012 15:38:17 +0200 (CEST) X-KTH-Auth: kristaps [193.10.49.5] X-KTH-mail-from: kristaps@bsd.lv X-KTH-rcpt-to: tech@mdocml.bsd.lv Received: from ctime.hhs.se (ctime.hhs.se [193.10.49.5]) by smtp-1.sys.kth.se (Postfix) with ESMTP id 4DE69156357 for ; Fri, 8 Jun 2012 15:38:15 +0200 (CEST) Message-ID: <4FD20047.1040108@bsd.lv> Date: Fri, 08 Jun 2012 15:38:15 +0200 From: Kristaps Dzonsons User-Agent: Mozilla/5.0 (X11; OpenBSD amd64; rv:5.0) Gecko/20110805 Thunderbird/5.0 X-Mailinglist: mdocml-tech Reply-To: tech@mdocml.bsd.lv MIME-Version: 1.0 To: tech@mdocml.bsd.lv Subject: Re: mandocdb tools, sqlite3, and ohash References: <4FD0C58C.5040104@bsd.lv> <20120607180605.GA295@iris.usta.de> <4FD1D406.9020704@bsd.lv> <20120608122505.GA18779@britannica.bec.de> In-Reply-To: <20120608122505.GA18779@britannica.bec.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit On 06/08/12 14:25, Joerg Sonnenberger wrote: > On Fri, Jun 08, 2012 at 12:29:26PM +0200, Kristaps Dzonsons wrote: >>> 4. Function dbopen with real=0: >>> There seems to be a race, open to symlink attacks, >>> between remove(file) and sqlite3_open(file); >>> some kind of O_EXCL or something might be required. >> >> Fixed---good point. Pity there's no O_TRUNC for sqlite3. > > SQLITE_OPEN_EXCLUSIVE. Yep, that's already in there. I'm going to research the COMMIT blocks more: I don't want to "tune" the database much because I worry about hitting memory barriers in having both the word hashtable and a lot of database commits floating around in memory. If you've any ideas, don't hesitate to share! -- To unsubscribe send an email to tech+unsubscribe@mdocml.bsd.lv