An "unable to open database file" error that has nothing to do with opening database file

classic Classic list List threaded Threaded
26 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Re: An "unable to open database file" error that has nothing to do with opening database file

margave
Addendum: I ran "file" on sqlite3.exe ...

On computer B (where sqlite3 works): PE32 executable (console) Intel 80386, for MS Windows
On computer A (where it does not):   PE32+ executable (console) x86-64, for MS Windows
Reply | Threaded
Open this post in threaded view
|

Re: An "unable to open database file" error that has nothing to do with opening database file

Jan Nijtmans
In reply to this post by margave
2013/12/15 margave <[hidden email]>:
> I noticed that the sqlite3.exe file on computer A has a different cksum than
> the one on computer B. (Seems odd! The Cygwin installer shows the same
> version on both!)
Which version? SQLite 3.8.2-2?
Apparently, you are running Cygwin on A and
Cygwin64 on B. SQLite is compiled with
exactly the same source-code on Cygwin
and Cygwin64, but with a different compiler.
So this suggests it isn't a problem in SQLite
but either in the compiler (unlikely), ore in
cygwin1.dll. Hard to tell without some more
information.

You could try "sqlite3 <dbfile> -vfs win32-longpath"
which uses the win32 API in stead of the cygwin
API to open the file. Does this make a difference?

Regards,
        Jan Nijtmans
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: An "unable to open database file" error that has nothing to do with opening database file

Kees Nuyt
In reply to this post by margave
On Sun, 15 Dec 2013 07:28:52 -0800 (PST), margave <[hidden email]> wrote:

>Addendum: I ran "file" on sqlite3.exe ...
>
>On computer B (where sqlite3 works): PE32 executable (console) Intel 80386,
>for MS Windows
>On computer A (where it does not):   PE32+ executable (console) x86-64, for
>MS Windows

Well, something is not completely the same.

I'd start with examining :

* Exact windows version (start/computer/system properties)
* Exact cygwin version
* Package choices in cygwin
* sqlite3 --version
* Security properties of the database file
        (roperties / security / advanced / etc.)

Remark: Do you know that concurrent access to sqlite files
on network shared filesystems is not safe?

--
Groet, Cordialement, Pozdrawiam, Regards,

Kees Nuyt

_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: An "unable to open database file" error that has nothing to do with opening database file

margave
Well, I gave up on sqlite inside of Cygwin.

I found a standalone sqlite3.exe that does not depend upon (or install with) Cygwin.
It's from http://www.sqlite.org
One executable, no .dlls ... and it just runs, no problems.
Reply | Threaded
Open this post in threaded view
|

Re: An "unable to open database file" error that has nothing to do with opening database file

Jan Nijtmans
2013/12/17 margave <[hidden email]>:
> Well, I gave up on sqlite inside of Cygwin.
>
> I found a standalone sqlite3.exe that does not depend upon (or install with)
> Cygwin.
> It's from http://www.sqlite.org
> One executable, no .dlls ... and it just runs, no problems.

For most situation, indeed this .exe should work fine. Still
I'm sure that Jari Aalto (Cygwin's fossil maintainer) will be
interested to know what's the problem. I regularly
compile Fossil on Cygwin, and I don't see the problems you
mention.

Anyway, Thanks for your report!
            Jan Nijtmans
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Reply | Threaded
Open this post in threaded view
|

Re: An "unable to open database file" error that has nothing to do with opening database file

Jan Nijtmans
In reply to this post by margave
2013/12/17 margave <[hidden email]>:
> Well, I gave up on sqlite inside of Cygwin.
>
> I found a standalone sqlite3.exe that does not depend upon (or install with)
> Cygwin.
> It's from http://www.sqlite.org
> One executable, no .dlls ... and it just runs, no problems.

I think I know what's the problem: The SQLite version included
in Fossil 1.27 had a bug in the calculation of the temp path:
It should be "/tmp/etilqs....." but the slash was missing, so
actual temporary files were named "/tmpetilqs.....". Whether
it works or not depends on your rights on the '/' directory.

Workaround: Create a dummy directory "foo" inside
/tmp, and set the SQLITE_TMPDIR environment
variable to "/tmp/foo". Then temporary files should
be created in the right directory (even though the name
is not right) which should make it work.

This SQLite bug is already fixed here:
       <http://www.sqlite.org/src/info/830629d31d>
so next fossil version should be OK.

Thanks!
        Jan Nijtmans
_______________________________________________
sqlite-users mailing list
[hidden email]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
12