Hello

On Tue, 21 Aug 2007 13:38:55 -0400
Frédéric Brière <[EMAIL PROTECTED]> wrote:

> Package: mysql-server-5.0
> Version: 5.0.45-1
> Severity: normal
> 
>   CREATE TABLE foo (
>       flavor ENUM('vanilla', 'chocolate') NOT NULL,
>       number INT UNSIGNED NOT NULL,
>       INDEX (flavor, number)
>   );
> 
>   EXPLAIN SELECT * FROM foo WHERE flavor = CAST('1' AS UNSIGNED)\G
>   [...]
>       key: flavor
>       ref: const
> 
>   EXPLAIN SELECT * FROM foo WHERE flavor = 0+'1'\G
>   [...]
>       key: flavor
>       ref: NULL
> 
> 
> Shouldn't 0+'1' be cast as a constant int, thus matching the index? 

Hm, don't know :-)

If you want a quick answer, try filing a bug report on bugs.mysql.com
as this is not Debian specific and you would else have to wait for me
to find free time to do exactly the same.
Please write the MySQL bug number into the Debian bug report if you do so.

bye,

-christian-

Reply via email to