[Pkg-erlang-devel] Bug#602342: [erlang-odbc] Always fails to connect

Emil Langrock emil.langrock at gmx.de
Wed Nov 3 22:21:18 UTC 2010


Package: erlang-odbc
Version: 1:14.b-dfsg-1
Severity: normal

I have a normal unixodbc installation (no manual configuration) with 
libsqliteodbc. This works perfectly with pyodbc and other programs which uses 
odbc:


>>> import pyodbc
>>>> context = 
pyodbc.connect("Driver=SQLITE3;Database=/var/lib/ejabberd_archive/mod_archive.sqlite3;")
>>> cursor = context.cursor()
>>> t = cursor.execute("select * from archive_messages")
>>> c = t.columns()
>>> c.fetchall()
[('', '', 'archive_collections', 'id', 4, 'INTEGER', 9, 10, 10, 0, 0, None, 
'NULL', 4, None, 16384, 1, 'NO')....


but when I try to use it using erlang then everything falls apart:

> odbc:start().
> 
odbc:connect("Driver=SQLITE3;Database=/var/lib/ejabberd_archive/mod_archive.sqlite3;", 
[{scrollable_cursors, off}]).

=ERROR REPORT==== 3-Nov-2010::22:46:50 ===
ODBC: received unexpected info: {tcp_closed,#Port<0.670>}


=ERROR REPORT==== 3-Nov-2010::22:46:50 ===
** Generic server <0.57.0> terminating 
** Last message in was {#Port<0.668>,{exit_status,139}}
** When Server state == {state,#Port<0.668>,
                               {<0.35.0>,#Ref<0.0.0.109>},
                               <0.35.0>,undefined,on,undefined,undefined,off,
                               connecting,undefined,0,
                               [#Port<0.666>,#Port<0.667>],
                               #Port<0.669>,#Port<0.670>}


The file itself is world read and writeable. So I have no idea why erlang-odbc 
is somewhat special and fails without any usable information.

The sqlite3 file was created using

$ sqlite3 /var/lib/ejabberd_archive/mod_archive.sqlite3

And then pasting the attached sql into it (+ using .exit after that).


--- System information. ---
Architecture: amd64
Kernel:       Linux 2.6.32-5-amd64

Debian Release: squeeze/sid
  500 unstable        ftp.debian.org 
  500 stable          ftp.debian.org

--- Package information. ---
Depends                       (Version) | Installed
=======================================-+-===================
erlang-base          (= 1:14.b-dfsg-1)  | 1:14.b-dfsg-1
 OR erlang-base-hipe  (= 1:14.b-dfsg-1) | 
libc6                          (>= 2.7) | 2.11.2-7
unixodbc                    (>= 2.2.11) | 2.2.14p2-2


Package's Recommends field is empty.

Suggests             (Version) | Installed
==============================-+-===========
erlang                         | 
erlang-manpages                | 
erlang-doc                     | 





-- 
Emil Langrock
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mod_archive_odbc_sqlite3.sql
Type: text/x-sql
Size: 3627 bytes
Desc: not available
URL: <http://lists.alioth.debian.org/pipermail/pkg-erlang-devel/attachments/20101103/c46d882b/attachment.bin>


More information about the Pkg-erlang-devel mailing list