List:Internals« Previous MessageNext Message »
From:Marko Mäkelä Date:January 3 2008 12:40pm
Subject:Re: MySQL uses PRIMARY key when it should? use another index
View as plain text  
On Thu, Jan 03, 2008 at 01:32:51PM +0200, Marko Mäkelä wrote:
> On Wed, Jan 02, 2008 at 07:15:24AM -0800, Rick James wrote:
> > I would be surprised if using t1ba is ever the 'right' way to do the
> > query.  The "(10)" virtually destroys any usefullness of the index.  And
> > since you asked for "a,b", it could really be satisfied in the index.  I
> > do find it puzzling that it says both "PRIMARY" and "Using index".
> 
> Right, the test may have succeeded in the past because of a MySQL bug that
> has been fixed.  But we would like to know where this change was made.
> 
> There still seem to be bugs in fast index creation.  For example, this
> test case results in a table copy, even for a MyISAM table:
> 
> create table t1(a int, b varchar(255), primary key(a,b))
> engine=myisam default charset=utf8;
> create index t1ba on t1(b,a);

Filed as Bug #33650.

	Marko
Thread
MySQL uses PRIMARY key when it should? use another indexVasil Dimov2 Jan
  • RE: MySQL uses PRIMARY key when it should? use another indexRick James2 Jan
    • Re: MySQL uses PRIMARY key when it should? use another indexVasil Dimov3 Jan
    • Re: MySQL uses PRIMARY key when it should? use another indexMarko Mäkelä3 Jan
      • Re: MySQL uses PRIMARY key when it should? use another indexMarko Mäkelä3 Jan
  • Re: MySQL uses PRIMARY key when it should? use another indexJoerg Bruehe4 Jan
  • Re: MySQL uses PRIMARY key when it should? use another indexSergei Golubchik4 Jan