Package: unixodbc
Version: 2.2.11-9
Severity: important

The combination of unixodbc, libmyodbc and r-cran-rodbc works nicely on 
a couple of i386 (debian unstable) and one amd64 (debian stable) boxes.

On this machine, I am running pure amd64 unstable, and I get a very
strange behavior with ODBC connections to my local mysql database:

A php test script

        <?php
        $dbh = odbc_connect('cytotox', 'cytotox', 'cytotox') or 
die(odbc_errormsg() );
        ?>

just segfaults. strace ends with

        a_family=AF_INET, sin_port=htons(3306),
        sin_addr=inet_addr("127.0.0.1")}, 16) = 0
        setsockopt(3, SOL_IP, IP_TOS, [53983375223947272], 4) = 0
        setsockopt(3, SOL_TCP, TCP_NODELAY, [53983375223947265], 4) = 0
        setsockopt(3, SOL_SOCKET, SO_KEEPALIVE, [-6000514326958440447], 4) = 0
        read(3, "A\0\0\0\n5.0.18-Debian_8-log\0,\0\0\0>?b"..., 16384) = 69
        stat("/usr/share/mysql/charsets/Index.xml", {st_mode=S_IFREG|0644,
        st_size=18171, ...}) = 0
        open("/usr/share/mysql/charsets/Index.xml", O_RDONLY) = 4
        read(4, "<?xml version=\'1.0\' encoding=\"ut"..., 18171) = 18171
        close(4)                                = 0
        write(3, "[EMAIL PROTECTED]"...,
        73) = 73
        read(3, "\1\0\0\2\376", 16384)          = 5
        write(3, "[EMAIL PROTECTED]", 13)      = 13
        read(3, "\7\0\0\4\0\0\0\2\0\0\0", 16384) = 11
        --- SIGSEGV (Segmentation fault) @ 0 (0) ---
        +++ killed by SIGSEGV +++

An R test script 

        library(RODBC)
        channel <- odbcConnect("cytotox",uid="cytotox",
                pwd="cytotox")
        odbcGetInfo(channel)
        query <- "select plates from plates"
        tables <- sqlQuery(channel,query,errors=TRUE)
        tables
        odbcGetErrMsg(channel)
        odbcClose(channel)

shows an error message if the SQL Query can not be executed because of 
an unknown column name:

        > tables <- sqlQuery(channel,query,errors=TRUE)
        > tables
        [1] "[RODBC] ERROR: Could not SQLExecDirect"                            
                                               
        [2] "S0022 1054 [unixODBC][MySQL][ODBC 3.51
        Driver][mysqld-5.0.18-Debian_8-log]Unknown column 'plates' in 'field
        list'"

but if I use the correct column name, it returns an empty set 

        > query <- "select plate from plates"
        >  tables <- sqlQuery(channel,query,errors=TRUE)
        >  tables
        character(0)
        > odbcGetErrMsg(channel)
        character(0)

although the same query issued with the mysql command line client (and
same username and password) gives 1202 rows.

I don't know how to debug this. Any comments welcome!

Johannes Ranke
        

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'testing')
Architecture: amd64 (x86_64)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.13.4-stiller1
Locale: [EMAIL PROTECTED], [EMAIL PROTECTED] (charmap=ISO-8859-15)

Versions of packages unixodbc depends on:
ii  libc6                         2.3.6-1    GNU C Library: Shared libraries an
ii  libltdl3                      1.5.22-2   A system independent dlopen wrappe
ii  libreadline5                  5.1-6      GNU readline and history libraries
ii  odbcinst1debian1              2.2.11-9   Support library and helper program

unixodbc recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to