Issue:Titlematch with ignorecase brings no results

From FollowTheScore
Jump to: navigation, search
Description: Using titlematch and ignorecase brings no results when the string to be searched with titlematch is in the beginning of the title OR after a space.
Extension / Version: DPL   /   2.0.1
Type / Status: Bug   /   open

Problem

Using titlematch and ignorecase brings no results when the string to be searched with titlematch is in the beginning of the title OR after a space. The query works normally when ignorecase is not used or when the string to be searched is in the middle of the title:

 <dpl>
 category   = SATB
 titlematch = Tantum ergo%
 ignorecase = true
 </dpl>

 ==> yields no results
 <dpl>
 category   = SATB
 titlematch = %Tantum ergo%
 ignorecase = true
 </dpl>

 ==> yields no results
 <dpl>
 category   = SATB
 titlematch = %antum ergo%
 ignorecase = true
 </dpl>

 ==> Pange lingua - Tantum ergo (Anton Bruckner)
     Pastorales Tantum ergo (Ignaz Reimann)
     Tantum ergo (A-flat major) (Anton Bruckner)
     Tantum ergo (B-Flat Major) (Anton Bruckner)
     etc.
 <dpl>
 category   = SATB
 titlematch = Tantum ergo%
 </dpl>

 ==> Tantum ergo (A-flat major) (Anton Bruckner)
     Tantum ergo (B-Flat Major) (Anton Bruckner)
     etc.

Workaround

Removing the CAST( var AS char) from inside the LOWER() function in lines 2324, 2327, 2342, 2345 of DPLMain.php fixed this problem for me. I don't know why CAST is producing this unexpected behaviour. Capmo (talk) 06:34, 12 April 2013 (CEST)

Obs: I just found a related issue:Ignorecase=yes broken in MediaWiki 1.17.0. Maybe they have reverted their changes in column format for several fields form varbinary back to varchar? I'm using MediaWiki 1.20.3 Capmo (talk) 06:51, 12 April 2013 (CEST)