EBernhardson has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/98010


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(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/Flow 
refs/changes/10/98010/1

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: newchange
Gerrit-Change-Id: Ia40a9fe015f043528b876ab7b5e380ef8a661c76
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Flow
Gerrit-Branch: master
Gerrit-Owner: EBernhardson <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to