[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Clean up lock name in lock messages in DatabaseMysqlBase
jenkins-bot has submitted this change and it was merged. Change subject: Clean up lock name in lock messages in DatabaseMysqlBase .. Clean up lock name in lock messages in DatabaseMysqlBase Change-Id: I9d3eb566f4e4f6d982cbc15df082cf2dd3f9614e --- M includes/libs/rdbms/database/DatabaseMysqlBase.php 1 file changed, 6 insertions(+), 6 deletions(-) Approvals: Krinkle: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 7abfb17..627cad0 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -968,8 +968,8 @@ * @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 @@ * @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 @@ * @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 ) { -- To view, visit https://gerrit.wikimedia.org/r/311882 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I9d3eb566f4e4f6d982cbc15df082cf2dd3f9614e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron SchulzGerrit-Reviewer: Krinkle Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Clean up lock name in lock messages in DatabaseMysqlBase
Aaron Schulz has uploaded a new change for review. https://gerrit.wikimedia.org/r/311882 Change subject: Clean up lock name in lock messages in DatabaseMysqlBase .. Clean up lock name in lock messages in DatabaseMysqlBase Change-Id: I9d3eb566f4e4f6d982cbc15df082cf2dd3f9614e --- M includes/libs/rdbms/database/DatabaseMysqlBase.php 1 file changed, 6 insertions(+), 6 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/82/311882/1 diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index 7abfb17..627cad0 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -968,8 +968,8 @@ * @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 @@ * @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 @@ * @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 ) { -- To view, visit https://gerrit.wikimedia.org/r/311882 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I9d3eb566f4e4f6d982cbc15df082cf2dd3f9614e Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Aaron Schulz___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits