Re: Warning: using a partial-field key prefix in search.

Alexander Keremidarski <[email protected]>
Newsgroups gmane.comp.db.mysql.bugs
Organization MySQL AB
Message-ID <[email protected]>
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Kevin,

Kevin Day wrote:

> Your test script worked for me too, so let me try giving you something
> more specific to try. This also fails with MyISAM tables, but doesn't
> print any warning, there's just 0 rows returned when there should be.
>
> mysql test <test-schema-and-data
>
> mysql> select * from t2 WHERE c=1941 AND s>=0 ORDER BY p DESC;
> Empty set (0.00 sec)
>
> mysql> select * from t2 WHERE c=1941 AND s>=0;
> *snipped out correct results*
> 2655 rows in set (0.07 sec)

I got exactly the same result.

> mysql> alter table t2 drop key cs;

You don't even need to do that! Look:

mysql> select * from t2 WHERE c=1941 AND s>=0 ORDER BY p DESC;
Empty set (0.00 sec)

mysql> select count(*) from t2 WHERE c=1941 AND s>=0 ORDER BY p DESC;
+----------+
| count(*) |
+----------+
|     2655 |
+----------+
1 row in set (0.01 sec)


It is clear this a bug. I would try to find smaller test case and will enter it
into our Bugs database.

Thank you a lot for pointing this to us and for excelent test case.


> -- Kevin

Best regards

- --
  Meet the MySQL Team at User Conference 2004!
  http://www.mysql.com/uc2004/

  For technical support contracts, visit https://order.mysql.com/?ref=msal
    __  ___     ___ ____  __
   /  |/  /_ __/ __/ __ \/ /    Mr. Alexander Keremidarski <[email protected]>
  / /|_/ / // /\ \/ /_/ / /__   MySQL AB, Full-Time Developer
 /_/  /_/\_, /___/\___\_\___/   Sofia, Bulgaria
         <___/  www.mysql.com


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFATJAcNJ1Mo9yetSkRAuONAJ4iOxkDi8lFZpAs1gg0PShbKTvsEgCdEKSh
a7qAnGRWLcJxkxmza2Tbe/4=
=zGbJ
-----END PGP SIGNATURE-----


-- 
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe:    http://lists.mysql.com/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.