https://bugzilla.wikimedia.org/show_bug.cgi?id=42598

       Web browser: ---
             Bug #: 42598
           Summary: Database: $fname should also be logged for
                    BEGIN/COMMIT queries.
           Product: MediaWiki
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: code-update-regression
          Severity: normal
          Priority: Unprioritized
         Component: Database
        AssignedTo: [email protected]
        ReportedBy: [email protected]
                CC: [email protected]
    Classification: Unclassified
   Mobile Platform: ---


While debugging a problem with uncommitted queries in a maintenance script I
noticed that the /* $fname .. */ comments are not added to these queries.

the Database::begin, Database::doBegin methods do pass it around, and callers
also provide it. However Database::query messes up by relying on the presence
of whitespace in the sql string:

> $commentedSql = preg_replace( '/\s/', " /* $fname $userName */ ", $sql, 1 );

-- 
Configure bugmail: https://bugzilla.wikimedia.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

_______________________________________________
Wikibugs-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikibugs-l

Reply via email to