Skip site navigation (1) Skip section navigation (2)

Re: Threading crash using ODBC

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: markw <markw(at)mohawksoft(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: Threading crash using ODBC
Date: 2002-11-16 03:43:51
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc
markw wrote:
> Here's what  I have:
> I have an application with 1 main thread and a number of worker threads.
> At startup, I allocate a number of ODBC connections.
> I have an internal queue that is protected by a mutex.
> When one of the worker threads wants to use the database, it gets an un
> occupied SQL connection from the queue.
> At startup, I can execte a query just fine. When I try to execute a
> query from one of the worker threads, I get a core dump.
> I am using UNIX ODBC and the PostgreSQL driver, as shipped with RedHat 7.3.
> The stack trace looks like this:
> 0  0x402fba4c in CC_send_query () from /usr/lib/
> (gdb) where
> #0  0x402fba4c in CC_send_query () from /usr/lib/
> #1  0x40314842 in SC_execute () from /usr/lib/
> #2  0x40304c45 in PG_SQLExecute () from /usr/lib/
> #3  0x40304c6b in SQLExecute () from /usr/lib/
> #4  0x402a13f4 in SQLExecute () from /usr/lib/
> #5  0x40023d6f in MSqlODBC::ExecResult (this=0x806bfd4,
>     sql=0x4037f83c "select value, timeout from msession_sessions where
> session = '2b7atuahma6u9igcorr7c6q8ld7ne86o'") at modbcsql.cpp:360

It's the driver provided by unixODBC itself.
Please inquire unixODBC team about it.
Or try the (maybe) thread-safe driver on *nix
recently provided at

Hiroshi Inoue

In response to


pgsql-odbc by date

Next:From: markwDate: 2002-11-16 04:21:28
Subject: Re: Threading crash using ODBC
Previous:From: Hiroshi InoueDate: 2002-11-15 23:38:19
Subject: Re: PostgreSQL+ Beta bug?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group