[Phplib-trackers] [ phplib-Bugs-473196 ] ac_get_lock() and MySQL
Brought to you by:
nhruby,
richardarcher
|
From: <no...@so...> - 2002-09-25 18:34:32
|
Bugs item #473196, was opened at 2001-10-20 12:25 You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=403611&aid=473196&group_id=31885 Category: Data storage container Group: current CVS Status: Closed Resolution: Duplicate Priority: 5 Submitted By: Andreas Stein (steinas) Assigned to: Chris Johnson (chaska) 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: Chris Johnson (chaska) Date: 2002-09-25 13:34 Message: Logged In: YES user_id=279065 I've closed this report because report #550100 completely covers the situation. ct_sql.inc as written depends on the database being MySQL, and worse, does not even use currently correctly get_lock(name, timeout) syntax. Other databases may not even support this locking idea (Postgres does not, Oracle seems to). ---------------------------------------------------------------------- Comment By: Chris Johnson (chaska) Date: 2002-09-25 13:31 Message: Logged In: YES user_id=279065 I've closed this report because report #550100 completely covers the situation. ct_sql.inc as written depends on the database being MySQL, and worse, does not even use currently correctly get_lock(name, timeout) syntax. Other databases may not even support this locking idea (Postgres does not, Oracle seems to). ---------------------------------------------------------------------- Comment By: nathan hruby (nhruby) Date: 2002-07-02 14:02 Message: Logged In: YES user_id=19736 Please see Bug #550100 for further discussion of ac_get_lock. This is still a valid bug and shoudl be fixed for 7.4-final; however please know that it will most likely be scrapped and/or changed a good bit in the next major release. ---------------------------------------------------------------------- Comment By: Richard Archer (richardarcher) Date: 2002-04-29 05: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: https://sourceforge.net/tracker/?func=detail&atid=403611&aid=473196&group_id=31885 |