3 messages in com.mysql.lists.bugsfunctions INSTR & LOCATE (case sensit...
FromSent OnAttachments
Eric Koh10 Jun 2002 00:43 
Michael Widenius10 Jun 2002 03:44 
Sergei Golubchik10 Jun 2002 06:59 
Subject:functions INSTR & LOCATE (case sensitivity)
From:Eric Koh (eric@jobsfactory.com)
Date:06/10/2002 12:43:44 AM
List:com.mysql.lists.bugs

Hi,

The document suggests that the string functions INSTR and LOCATE are case-insensitive. However it does not seem to be so. Did I interpret your documentation wrongly?

I tested the below on a few different versions of MySQL-3.23 on linux (rpm), all with the same results.

Best Regards Eric Koh

------------------------------------------

How-To-Repeat:

mysql> select instr('foobarbar', 'bar'); +---------------------------+ | instr('foobarbar', 'bar') | +---------------------------+ | 4 | +---------------------------+

mysql> select instr('foobarbar', 'Bar'); +---------------------------+ | instr('foobarbar', 'Bar') | +---------------------------+ | 0 | +---------------------------+

mysql> select instr('Foobarbar', 'foo'); +---------------------------+ | locate('bar','foobarbar') | +---------------------------+ | 0 | +---------------------------+