r81215 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r81214‎ | r81215 | r81216 >
Date:22:12, 30 January 2011
Author:reedy
Status:ok (Comments)
Tags:
Comment:
Remove usage of $dbw->escapeLike in RenameDbPrefix (per bug 270042)
Modified paths:
  • /trunk/phase3/maintenance/renameDbPrefix.php (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/renameDbPrefix.php
@@ -65,7 +65,7 @@
6666 $count = 0;
6767
6868 $dbw = wfGetDB( DB_MASTER );
69 - $res = $dbw->query( "SHOW TABLES LIKE '" . $dbw->escapeLike( $old ) . "%'" );
 69+ $res = $dbw->query( "SHOW TABLES " . $dbw->buildLike( $old, $dbw->anyString() ) );
7070 foreach ( $res as $row ) {
7171 // XXX: odd syntax. MySQL outputs an oddly cased "Tables of X"
7272 // sort of message. Best not to try $row->x stuff...

Follow-up revisions

RevisionCommit summaryAuthorDate
r81216Remove usage of $dbr->escapeLike (per bug 270042)reedy22:12, 30 January 2011
r814111.17: MFT r81186, r81187, r81197, r81209, r81210, r81211, r81215, r81238, r81...catrope20:23, 2 February 2011

Comments

#Comment by MZMcBride (talk | contribs)   22:14, 30 January 2011

Bug 27042, too.

Status & tagging log