You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ignite.apache.org by Igor Sapego <is...@apache.org> on 2020/12/09 15:28:59 UTC

Re: Unixodbc currently not working...

Hi, Wolfgang,

I just wanted to notify that I fixed the issue with ODBC driver returning
the wrong
ODBC version and some other issues: [1]

[1] - https://github.com/apache/ignite/pull/8528

Best Regards,
Igor


On Mon, Nov 30, 2020 at 6:20 PM Ilya Kasnacheev <il...@gmail.com>
wrote:

> Hello!
>
> There may be some issues with ODBC driver but it is generally working and
> stable. I'm not sure why you would need the ODBC_V3 specifically?
>
> Regards,
> --
> Ilya Kasnacheev
>
>
> пн, 30 нояб. 2020 г. в 14:48, Wolfgang Meyerle <
> wolfgang.meyerle@googlemail.com>:
>
>> Quite simple. I'd like to execute SQL queries.
>>
>> As the thin client c++ interface which I'd like to use is not capable in
>> executing SQL queries I have to use unixodbc as a temporary workaround.
>>
>> There are some other issues that popped up in the unixodbc driver from
>> Ignite.
>>
>> Boolean and Double values are currently causing issues.
>> Whenever I have a table column storing the value 12.3456 for example I'm
>> getting 123456 back by using the interface.
>>
>> Boolean values are also an issue as the column table data type doesn't
>> seem to be defined. I'm getting "-7" back which is definitely wrong ;-)
>>
>> Regards,
>>
>> Wolfgang
>>
>>
>> Am 30.11.20 um 10:41 AM schrieb Ilya Kasnacheev:
>> > Hello!
>> >
>> > Maybe the driver is not actually capable of ODBC_V3? Why do you need it?
>> >
>> > Regards,
>> > --
>> > Ilya Kasnacheev
>> >
>> >
>> > пт, 27 нояб. 2020 г. в 19:15, Wolfgang Meyerle
>> > <wolfgang.meyerle@googlemail.com <mailto:
>> wolfgang.meyerle@googlemail.com>>:
>> >
>> >     So,
>> >
>> >     I uploaded a tiny demo project for my two issues:
>> >
>> >     Issue1 states that the odbc interface is reporting it's not capable
>> of
>> >     the ODBC_V3 standard.
>> >
>> >     Issue2 is the one I described where I get linking problems despite
>> that
>> >     the even if you uncomment #LIBS += -lodbcinst in the pro file of
>> the QT
>> >     project.
>> >
>> >     You can find everything here:
>> >     https://filebin.net/5fclxod62xi36gbb
>> >     <https://filebin.net/5fclxod62xi36gbb>
>> >
>> >     Regards,
>> >
>> >     Wolfgang
>> >
>> >     Am 27.11.20 um 4:21 PM schrieb Ilya Kasnacheev:
>> >      > Hello!
>> >      >
>> >      > The workaround for third-party tools is probably
>> >      > LD_PRELOAD=/path/to/libodbcinst.so isql -foo -bar
>> >      >
>> >      > Regards,
>> >      > --
>> >      > Ilya Kasnacheev
>> >      >
>> >      >
>> >      > пт, 27 нояб. 2020 г. в 18:18, Igor Sapego <isapego@apache.org
>> >     <ma...@apache.org>
>> >      > <mailto:isapego@apache.org <ma...@apache.org>>>:
>> >      >
>> >      >     Hi,
>> >      >
>> >      >     Starting from your last question, it's Version3.
>> >      >
>> >      >     Now to the issue you are referring to. It definitely looks
>> like a
>> >      >     bug to me. It's weird
>> >      >     that no one has found it earlier. Looks like no one
>> >     uses SQLConnect?
>> >      >     It is weird that
>> >      >     We do not have a test for that either. Anyway I filed a
>> >     ticket and
>> >      >     going to take a look
>> >      >     at it soon: [1]
>> >      >
>> >      >     As a workaround you can try a solution suggested by Ilya. I
>> >     can not
>> >      >     provide a sound
>> >      >     workaround for third-party tools like isql though.
>> >      >
>> >      >     [1] - https://issues.apache.org/jira/browse/IGNITE-13771
>> >     <https://issues.apache.org/jira/browse/IGNITE-13771>
>> >      >     <https://issues.apache.org/jira/browse/IGNITE-13771
>> >     <https://issues.apache.org/jira/browse/IGNITE-13771>>
>> >      >
>> >      >     Best Regards,
>> >      >     Igor
>> >      >
>> >      >
>> >      >     On Fri, Nov 27, 2020 at 5:43 PM Ilya Kasnacheev
>> >      >     <ilya.kasnacheev@gmail.com <mailto:ilya.kasnacheev@gmail.com
>> >
>> >     <mailto:ilya.kasnacheev@gmail.com
>> >     <ma...@gmail.com>>> wrote:
>> >      >
>> >      >         Hello!
>> >      >
>> >      >         You can link your own binary to libodbcinst, in which
>> >     case the
>> >      >         linking problem should go away. Can you try that?
>> >      >
>> >      >         Regards,
>> >      >         --
>> >      >         Ilya Kasnacheev
>> >      >
>> >      >
>> >      >         пт, 27 нояб. 2020 г. в 17:13, Wolfgang Meyerle
>> >      >         <wolfgang.meyerle@googlemail.com
>> >     <ma...@googlemail.com>
>> >      >         <mailto:wolfgang.meyerle@googlemail.com
>> >     <ma...@googlemail.com>>>:
>> >      >
>> >      >             Hi,
>> >      >
>> >      >             after spending several hours to get the unixodbc
>> >     driver up
>> >      >             and running I
>> >      >             nearly gave up.
>> >      >
>> >      >             However together with the author of unixodbc I was
>> >     able to
>> >      >             find out that
>> >      >             the current odbc driver in Apache Ignite is not
>> >     doeing what
>> >      >             it's
>> >      >             supposed to do.
>> >      >
>> >      >             As soon as I execute the command:
>> >      >             et = SQLConnect(dbc, (SQLCHAR*)DSN, SQL_NTS,
>> >     (SQLCHAR*)"",
>> >      >             SQL_NTS,
>> >      >             (SQLCHAR*)"", SQL_NTS);
>> >      >
>> >      >             I get a crash in my program stating that:
>> >      >             isql: symbol lookup error:
>> >     /usr/local/lib/libignite-odbc.so:
>> >      >             undefined
>> >      >             symbol: SQLGetPrivateProfileString
>> >      >
>> >      >             According to the author of unixodbc this is a
>> >     function which
>> >      >             is called
>> >      >             to find out where to connect to by opening the
>> >     /etc/odbc.ini
>> >      >             file an
>> >      >             looking for the DSN provided by the parameter.
>> >      >
>> >      >
>> >      >             I compiled the Apache Ignite odbc connector exactly
>> as
>> >      >             stated in the
>> >      >             manual. However an ldd on the
>> >      >             /usr/local/lib/libignite-odbc.so does not
>> >      >             show me a dependency on the odbcinst.so as stated by
>> >     the author.
>> >      >
>> >      >             So it seems that the configure script for the
>> >     compilation is
>> >      >             broken somehow.
>> >      >
>> >      >             I installed unixodbc-dev on my ubuntu box so that
>> >     shouldn't
>> >      >             be the problem.
>> >      >
>> >      >             Digging down into the cmake script it seems that it
>> also
>> >      >             correctly
>> >      >             detects the installed unixodbc-dev installation.
>> >      >
>> >      >             But the dependency to the odbcinst.so is missing.
>> >      >
>> >      >
>> >      >             Hopefully someone can help.
>> >      >
>> >      >             In the meantime I'm using the SQLDriverConnect
>> >     routine which
>> >      >             is not
>> >      >             dependent on the SQLGetPrivateProfileString. That
>> >     works but
>> >      >             it just a
>> >      >             dirty workaround and shouldn't be the final solution.
>> >      >
>> >      >             Which ODBC Version is implemented in the code?
>> >      >
>> >      >             Version2 or Version3?
>> >      >
>> >      >             Reagards,
>> >      >
>> >      >             Wolfgang
>> >      >
>> >      >
>> >      >
>> >
>>
>