Re: [HACKERS] ecpg PREPARE is not thread safe

2007-09-21 Thread ITAGAKI Takahiro
Michael Meskes <[EMAIL PROTECTED]> wrote: > Right now the prepared statements are not considered connection > specific. I'm not sure whether the standard says anything about this. > But moving this data shoudln't be a major problem. > > > Even if we have some kinds of exclusive controls, current

Re: [HACKERS] ecpg PREPARE is not thread safe

2007-09-21 Thread Michael Meskes
On Fri, Sep 21, 2007 at 11:05:47AM +0900, ITAGAKI Takahiro wrote: > PREPARE statements concurrently in several threads. The cause seems to > be the global variable 'prep_stmts' in ecpg/ecpglib/prepare.c . > It is accessed without any locks. And it is global, right. This has to be fixed, you're rig

[HACKERS] ecpg PREPARE is not thread safe

2007-09-20 Thread ITAGAKI Takahiro
Hi, I encountered segfaults in a multi-threaded ecpg application. It uses PREPARE statements concurrently in several threads. The cause seems to be the global variable 'prep_stmts' in ecpg/ecpglib/prepare.c . It is accessed without any locks. I'm trying to fix it, but there are some approaches to