Last modified: 2012-12-03 23:26:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T44598, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 42598 - Database: $fname should also be logged for BEGIN/COMMIT queries.
Database: $fname should also be logged for BEGIN/COMMIT queries.
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Database (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: 1.21.0 release
Assigned To: Krinkle
: code-update-regression
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-12-01 10:45 UTC by Krinkle
Modified: 2012-12-03 23:26 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Krinkle 2012-12-01 10:45:54 UTC
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 );
Comment 1 Krinkle 2012-12-01 10:53:47 UTC
Change-Id: I48dc8b3f68a6764327b4b1a8f7c06c59a25a31bb
Comment 2 Krinkle 2012-12-03 23:26:17 UTC
Landed in master.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links