-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Simetrical wrote:
On Tue, Apr 8, 2008 at 6:40 PM,
<aaron(a)svn.wikimedia.org> wrote:
Log Message:
-----------
Don't set $this->pattern unless it is allowed
- $this->pattern = $pattern;
$ns = $title->getNamespace();
if( $pattern && !$wgMiserMode ) {
# use escapeLike to avoid expensive search patterns like
't%st%'
$safetitle = $this->mDb->escapeLike( $title->getDBkey()
);
$this->mConds['log_namespace'] = $ns;
$this->mConds[] = "log_title LIKE
'$safetitle%'";
+ $this->pattern = $pattern;
} else {
Does this need to look at $wgMiserMode at all? A prefix search should
be fine efficiency-wise.
Not when limiting and ordering the results by timestamp -- using a
prefix for the title means you can't use the timestamp portion of the
page_timestamp index.
Your result set based on the title prefix is ordered first by the
complete title, and has to be filesorted into timestamp order so you can
box off the requested date range and display it in order.
- -- brion vibber (brion @
wikimedia.org)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (Darwin)
Comment: Using GnuPG with Mozilla -
http://enigmail.mozdev.org
iEYEARECAAYFAkf8+eIACgkQwRnhpk1wk44qTwCbBNppksPhk+eL5E58vC6HdbMM
kr8AoITQiRD6woDtYvD8wHdWBj16ZD8K
=fwJ+
-----END PGP SIGNATURE-----