Adding new debugging toolbar
[lhc/web/wiklou.git] / includes / db / Database.php
index 6945ceb..3037769 100644 (file)
@@ -840,9 +840,13 @@ abstract class DatabaseBase implements DatabaseType {
                        throw new MWException( 'Tainted query found' );
                }
 
+               $queryId = MWDebug::query( $sql, $fname, $isMaster );
+
                # Do the query and handle errors
                $ret = $this->doQuery( $commentedSql );
 
+               MWDebug::queryTime( $queryId );
+
                # Try reconnecting if the connection was lost
                if ( false === $ret && $this->wasErrorReissuable() ) {
                        # Transaction is gone, like it or not