jenkins-bot has submitted this change and it was merged.
Change subject: Expose more information about BasicDbStorage queries
......................................................................
Expose more information about BasicDbStorage queries
The debug bar for mediawiki transports the queries to the frontend by
encoding them to json. Because our queries contain binary values json's
friendly utf-8 only requirement is nice enough to turn the query string
into null. This adds a little bit more information so we at least know
what table was being queried.
Change-Id: Ia40a9fe015f043528b876ab7b5e380ef8a661c76
---
M includes/Data/ObjectManager.php
1 file changed, 4 insertions(+), 4 deletions(-)
Approvals:
Bsitu: Looks good to me, approved
jenkins-bot: Verified
diff --git a/includes/Data/ObjectManager.php b/includes/Data/ObjectManager.php
index b768b72..2dc8b88 100644
--- a/includes/Data/ObjectManager.php
+++ b/includes/Data/ObjectManager.php
@@ -624,7 +624,7 @@
$res = $this->dbFactory->getDB( DB_MASTER )->insert(
$this->table,
$row,
- __METHOD__
+ __METHOD__ . " ({$this->table})"
);
if ( $res ) {
return $row;
@@ -645,7 +645,7 @@
}
$dbw = $this->dbFactory->getDB( DB_MASTER );
// update returns boolean true/false as $res
- $res = $dbw->update( $this->table, $updates,
UUID::convertUUIDs( $pk ), __METHOD__ );
+ $res = $dbw->update( $this->table, $updates,
UUID::convertUUIDs( $pk ), __METHOD__ . " ({$this->table})" );
// $dbw->update returns boolean true/false as $res
// we also want to check that $pk actually selected a row to
update
return $res && $dbw->affectedRows();
@@ -661,7 +661,7 @@
throw new PersistenceException( 'Row has null primary
key: ' . implode( $missing ) );
}
$dbw = $this->dbFactory->getDB( DB_MASTER );
- $res = $dbw->delete( $this->table, UUID::convertUUIDs( $pk ),
__METHOD__ );
+ $res = $dbw->delete( $this->table, UUID::convertUUIDs( $pk ),
__METHOD__ . " ({$this->table})" );
return $res && $dbw->affectedRows();
}
@@ -683,7 +683,7 @@
$this->table,
'*',
UUID::convertUUIDs( $attributes ),
- __METHOD__,
+ __METHOD__ . " ({$this->table})",
$options
);
if ( ! $res ) {
--
To view, visit https://gerrit.wikimedia.org/r/98010
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia40a9fe015f043528b876ab7b5e380ef8a661c76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>
Gerrit-Reviewer: Bsitu <[email protected]>
Gerrit-Reviewer: jenkins-bot
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits