move function name comment from start of query string to a next whitespace
authorDomas Mituzas <midom@users.mediawiki.org>
Sat, 12 Nov 2005 16:17:01 +0000 (16:17 +0000)
committerDomas Mituzas <midom@users.mediawiki.org>
Sat, 12 Nov 2005 16:17:01 +0000 (16:17 +0000)
simply makes query cache work ;-D

includes/Database.php

index a4a889c..db22009 100644 (file)
@@ -388,7 +388,7 @@ class Database {
 
                # Add a comment for easy SHOW PROCESSLIST interpretation
                if ( $fname ) {
-                       $commentedSql = "/* $fname */ $sql";
+                       $commentedSql = preg_replace("/\s/", " /* $fname */ ", $sql, 1);
                } else {
                        $commentedSql = $sql;
                }