Page MenuHomePhabricator

Database: $fname should also be logged for BEGIN/COMMIT queries.
Closed, ResolvedPublic

Description

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


Version: unspecified
Severity: normal

Details

Reference
bz42598