]> git.tuebingen.mpg.de Git - paraslash.git/commit
mysql_selector.c: introduce the myslq lock
authorAndre Noll <maan@systemlinux.org>
Sat, 7 Jul 2007 17:11:45 +0000 (19:11 +0200)
committerAndre Noll <maan@systemlinux.org>
Sat, 7 Jul 2007 17:11:45 +0000 (19:11 +0200)
commit843950e7a85730b796bb6238b6e91111f7209c25
treee75d8e1985cd1f21a80453c8bb4cb035f2f7ffd0
parentf0cb2c2e49b4353a998d6fdf823972d2516c5dcf
mysql_selector.c: introduce the myslq lock

This fixes a race condition in para_server:

parent child

real_query
real_query
mysql_store_result

This could cause para_server to hang in case the child process issued
a query which does not yield a result. It's hard to hit though. Fix is
to take the lock before the call to real_query, and release it after
mysql_store_result().

The patch also fixes a format string bug which was introduced by the patch
that switched to my_ulonglong for suitable variables in mysql_selector.c.
These need "%lli".
mysql_selector.c