X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-7.6 required=5.0 tests=AWL,BAYES_00,KHOP_PGP_SIGNED,KHOP_THREADED,RP_MATCHES_RCVD,SPF_HELO_PASS X-Spam-Check-By: sourceware.org Message-ID: <50A71D4D.7000409@dancol.org> Date: Fri, 16 Nov 2012 21:14:53 -0800 From: Daniel Colascione User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2 MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Re: Promote sqlite 3.7.13-1 from test status? References: <502C0B7D DOT 10909 AT etr-usa DOT com> In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7C9A836C701A2D3216860F58" X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com --------------enig7C9A836C701A2D3216860F58 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 8/16/2012 12:41 AM, Achim Gratz wrote: > $ sqlite3 > SQLite version 3.7.13 2012-06-11 02:05:22 > Enter ".help" for instructions > Enter SQL statements terminated with a ";" > sqlite> CREATE TEMP TABLE two (id INTEGER NOT NULL, name CHAR(64) NOT NUL= L ); > Error: unable to open database file > sqlite> >=20 > Since I can't reproduce the problem in the debugger anymore, it will be > difficult to impossible to find out what's causing this (at least for me)= . Just > like the problem with TortoiseSVN these are indications IMHO that there's= a race > somewhere between calls from the Cygwin DLL and Windows file locking func= tions. > I can't rule out BLODA either. I found the problem: sqlite is trying to create temporary files in the Wind= ows directory. It's doing that because the internal "getTempname" function is scanning the Windows environment table for TMP and TEMP, and (because Cygwin hasn't synchronized the Windows environment with the Cygwin one) doesn't fi= nd a temporary directory, falling back to C:\Windows. You don't see the problem = under the debugger or under strace because both tools synchronize the Windows environment with the Cygwin one before starting SQLite. You can work around the problem by synchronizing the environment yourself u= sing cygwin_internal (CW_SYNC_WINENV) or by explicitly telling SQLite where it s= hould store its temporary files using 'PRAGMA temp_store_directory=3D"/tmp";'. --------------enig7C9A836C701A2D3216860F58 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (Cygwin) Comment: Using GnuPG with undefined - http://www.enigmail.net/ iEYEARECAAYFAlCnHVAACgkQ17c2LVA10Vv/JQCgn7WnynwXC/cWoeYu8zDHBs9k 6AQAoMCL2kaGb0zy+qVs56csumOibdKv =/SVL -----END PGP SIGNATURE----- --------------enig7C9A836C701A2D3216860F58--