OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
we know what is causing now: InnoDB: Warning: using a partial-field key prefix

From: Brady Brown (bradyflatirontek.com)
Date: Fri Jul 01 2005 - 16:44:39 CDT


Hi,

We have inquired about this warning before, but now that we have
upgraded to 4.1, we know which query/table is causing these frequent
warnings:

050701 17:19:34 InnoDB: Warning: using a partial-field key prefix in
search.
InnoDB: index `rp_id` of table `as_imp/roundrobin_pub`. Last data field
length 5 bytes,
InnoDB: key ptr now exceeds key end by 4 bytes.
InnoDB: Key value in the MySQL format:
  len 6; hex 000500000001; asc ;

mysql> show create table roundrobin_pub\G
*************************** 1. row ***************************
        Table: roundrobin_pub
Create Table: CREATE TABLE `roundrobin_pub` (
   `roundrobin_id` int(3) unsigned default NULL,
   `publication_id` int(5) unsigned default NULL,
   UNIQUE KEY `rp_id` (`roundrobin_id`,`publication_id`),
   KEY `publication_id` (`publication_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

The query causing the warning is

SELECT MIN(publication_id) FROM roundrobin_pub WHERE roundrobin_id=31;

which should be able to use the rp_id key shouldn't it?

The result returned is fine, but what modifications should I implement
to squelch the warnings?

Thanks,

Brady

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql