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