[Phplib-trackers] [ phplib-Bugs-473196 ] ac_get_lock() and MySQL
Brought to you by:
nhruby,
richardarcher
|
From: <no...@so...> - 2002-04-29 10:35:54
|
Bugs item #473196, was opened at 2001-10-21 03:25 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=473196&group_id=31885 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Andreas Stein (steinas) Assigned to: Nobody/Anonymous (nobody) Summary: ac_get_lock() and MySQL Initial Comment: file: ct_sql.inc object: ct_sql method: ac_get_lock() function ac_get_lock() { if ( "" != $this->database_lock_semaphore ) { $query = sprintf("SELECT get_lock('%s')", $this- >database_lock_semaphore); while ( ! $this->db->query($query)) { $t = 1 + time(); while ( $t > time() ) { ; } } } } for MySQL the SQL statement should be: "SELECT GET_LOCK(str, time_out)" or "SELECT GET_LOCK(str, 0)" $db->query($query) is always true even if lock state is false ---------------------------------------------------------------------- >Comment By: Richard Archer (richardarcher) Date: 2002-04-29 20:35 Message: Logged In: YES user_id=279311 What happens if MySQL isn't the underlying database? This is so broken that the only way I can see to fix it is to delete all the code from this function and abolish session/application locks! I've posted another bug outlining a possible long-term fix. ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=403611&aid=473196&group_id=31885 |