MySQL reentrant queries ?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

MySQL reentrant queries ?

Damien Pollet
Hi,

I'm using Mysql-Driver from Universes. It seems that
queries/connections are not reentrant, eg it's not possible to do
another query with the same connection while processing the resultset
of another one, something like

"select * form articles" do: [:each |
       "select tag from articles_tags where article_id = 42"
]

If I do this I get "Error: Invalid query XXXX blahblah" with blahblah
being some row contents from the outer query (eg article content), and
completely unrelated to the inner query which accesses a different
table.

I've rewritten my code to create a new JdmConnection at each inner
query and this way it works. Is this a bug, or was I using it the
wrong way ?

--
Damien Pollet
type less, do more [ | ] http://typo.cdlm.fasmz.org

Reply | Threaded
Open this post in threaded view
|

Re: MySQL reentrant queries ?

Herbert König
Hello Damien,

DP> I've rewritten my code to create a new JdmConnection at each inner
DP> query and this way it works. Is this a bug, or was I using it the
DP> wrong way ?

it's a few years I started using mysql and I remember reading this in
the docs.

So for me every query needs its own connection.


Cheers

Herbert                            mailto:[hidden email]