From: Ann W. Harrison Date: December 4 2008 4:26pm Subject: Re: Please review fox for bug#34479 List-Archive: http://lists.mysql.com/falcon/255 Message-Id: <493804A8.9090304@mysql.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset=UTF-8 Content-Transfer-Encoding: 7BIT Lars, > > Actually there is only one test that fails: > > CREATE TABLE t1 (a char(4) CHARACTER SET utf8 COLLATE utf8_turkish_ci, > KEY (a)); > INSERT INTO t1 VALUES ('abc'), ('abc '), ('abcd'); > SELECT count(*) FROM t1 WHERE a like 'abc%'; > count(*) > -3 > +1 > > That's odd - it does look as if we're requiring that the % sign match at least one character. That's wrong. In the immortal prose of the SQL standard: 3) If the i-th substring of PCV is an arbitrary string specifier, then the i-th substring of MCV is any sequence of 0 (zero) or more characters. (PCV is the pattern character string, an "arbitrary string specifier" is a "%" and MCV is the character string being examined.) This may not be an index problem. Best, Ann