Skip Menu |
 

This queue is for tickets about the DBD-SQLite CPAN distribution.

Report information
The Basics
Id: 7106
Status: resolved
Priority: 0/
Queue: DBD-SQLite

People
Owner: Nobody in particular
Requestors: rt-cpan-lazlo [...] studio-nibble.com
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 1.00
Fixed in: (no value)



Subject: UNIX-style filesystem paths not recognized under cygwin
Download (untitled) / with headers
text/plain 1.7k
ENVIRONMENT: - Windows XP Home SP1 - uname -a: CYGWIN_NT-5.1 SLEEPWALK 1.5.10(0.116/4/2) 2004-05-25 22:07 i686 unknown unknown Cygwin - Perl v5.8.2 built for cygwin-thread-multi-64int, installed via cygwin setup.exe - DBD::SQLite 1.00, built under cygwin /bin/tcsh using "perl -MCPAN -e shell" with command "install DBD::SQLite". BEHAVIOR: - DBI->connect fails when database is specified with a UNIX-style file path (e.g., "/tmp/dbfile.db"). - DBI->connect succeeds when database is specified with a DOS-style file path (e.g., "D:\cygwin\tmp\dbfile.db") or with no path information ("dbfile.db"). NOTES: - I have confirmed that dbitest.db is created in specified location when DOS-style path is used and not created when UNIX-style path is used. UNIX-style paths should be valid when run under cygwin. SAMPLE CODE: #!/bin/perl use DBI; use strict; foreach my $dbfile (qw(dbitest.db d:\cygwin\tmp\dbitest.db /tmp/dbitest.db)) { my $data_source = "dbi:SQLite:$dbfile"; print "Opening data source '$data_source'\n"; my $dbh = DBI->connect($data_source, "", "") || die $DBI::errstr; print "Opened $dbfile\n"; print "SQLite version $dbh->{sqlite_version}\n"; $dbh->disconnect; print "Closed $dbfile\n\n"; } SAMPLE OUTPUT: % ./dbitest.pl Opening data source 'dbi:SQLite:dbitest.db' Opened dbitest.db SQLite version 3.0.2 Closed dbitest.db Opening data source 'dbi:SQLite:d:\cygwin\tmp\dbitest.db' Opened d:\cygwin\tmp\dbitest.db SQLite version 3.0.2 Closed d:\cygwin\tmp\dbitest.db Opening data source 'dbi:SQLite:/tmp/dbitest.db' DBI connect('/tmp/dbitest.db','',...) failed: unable to open database file(1) at dbdimp.c line 57 at /home/Ernie/dbitest.pl line 12 unable to open database file(1) at dbdimp.c line 57 at /home/Ernie/dbitest.pl line 12.
Download (untitled) / with headers
text/plain 237b
Can you open unix-style paths under cygwin using the sqlite commandline client? Looks more like a problem with the sqlite library rather than DBD::SQLite, but DBD::SQLite could certainly correct the issue (wrong solution if you ask me)
Download (untitled) / with headers
text/plain 359b
*** Warning: whitespace characters in the current directory path (/cygdrive/c/Documents and Settings/root/Application Data/.cpanplus/5.8.7/build/DBD-SQLite-1.09) may cause problems Please note the following message that is posted across the screen when DBD::SQLite is installed. Whitespace characters in the current name still screw up some Cygwin programs.
This is believed to now be working. Resolving this ticket.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.