X-Recipient: archive-cygwin@delorie.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 <dancol@dancol.org>
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@cygwin.com
Subject: Re: Promote sqlite 3.7.13-1 from test status?
References: <announce.5029275C.4040009@etr-usa.com> <502C0B7D.10909@etr-usa.com> <loom.20120816T092134-266@post.gmane.org>
In-Reply-To: <loom.20120816T092134-266@post.gmane.org>
Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enig7C9A836C701A2D3216860F58"
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.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--
