From 87157b7b44ca39576ec3131785927ac71d2c0c6a Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Tue, 20 Sep 2016 17:25:58 -0700 Subject: [PATCH] Clean up lock name in lock messages in DatabaseMysqlBase Change-Id: I9d3eb566f4e4f6d982cbc15df082cf2dd3f9614e --- includes/libs/rdbms/database/DatabaseMysqlBase.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 7abfb171f7..627cad029f 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -968,8 +968,8 @@ abstract class DatabaseMysqlBase extends DatabaseBase { * @since 1.20 */ public function lockIsFree( $lockName, $method ) { - $lockName = $this->addQuotes( $this->makeLockName( $lockName ) ); - $result = $this->query( "SELECT IS_FREE_LOCK($lockName) AS lockstatus", $method ); + $encName = $this->addQuotes( $this->makeLockName( $lockName ) ); + $result = $this->query( "SELECT IS_FREE_LOCK($encName) AS lockstatus", $method ); $row = $this->fetchObject( $result ); return ( $row->lockstatus == 1 ); @@ -982,8 +982,8 @@ abstract class DatabaseMysqlBase extends DatabaseBase { * @return bool */ public function lock( $lockName, $method, $timeout = 5 ) { - $lockName = $this->addQuotes( $this->makeLockName( $lockName ) ); - $result = $this->query( "SELECT GET_LOCK($lockName, $timeout) AS lockstatus", $method ); + $encName = $this->addQuotes( $this->makeLockName( $lockName ) ); + $result = $this->query( "SELECT GET_LOCK($encName, $timeout) AS lockstatus", $method ); $row = $this->fetchObject( $result ); if ( $row->lockstatus == 1 ) { @@ -1004,8 +1004,8 @@ abstract class DatabaseMysqlBase extends DatabaseBase { * @return bool */ public function unlock( $lockName, $method ) { - $lockName = $this->addQuotes( $this->makeLockName( $lockName ) ); - $result = $this->query( "SELECT RELEASE_LOCK($lockName) as lockstatus", $method ); + $encName = $this->addQuotes( $this->makeLockName( $lockName ) ); + $result = $this->query( "SELECT RELEASE_LOCK($encName) as lockstatus", $method ); $row = $this->fetchObject( $result ); if ( $row->lockstatus == 1 ) { -- 2.20.1