Percona Server with XtraDB

Broken fast index creation

Reported by Laurynas Biveinis on 2012-02-23
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server
High
Laurynas Biveinis
5.5
High
Laurynas Biveinis

Bug Description

Upstream bug 54330 was not fixed in 5.5 (that 5.5 claims to have it fixed is upstream bug 64432).

CREATE TABLE t1 (
       id BIGINT(20) AUTO_INCREMENT PRIMARY KEY,
       bar BIGINT(20)
) ENGINE=InnoDB;

--disable_query_log
SET @old_autocommit=@@AUTOCOMMIT;
SET AUTOCOMMIT=0;
let $1= 515641;
while ($1)
{
  eval INSERT INTO t1 (bar) VALUES (NULL);
  dec $1;
}
let $1= 2031;
while ($1)
{
  eval INSERT INTO t1 (bar) VALUES ($1);
  dec $1;
}
COMMIT;
SET AUTOCOMMIT=@old_autocommit;
--enable_query_log

SELECT COUNT(*) FROM t1;

ALTER TABLE t1 ADD INDEX baz (bar);

# With the bug present this will differ from the SELECT above!
SELECT COUNT(*) FROM t1 FORCE INDEX (baz);

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.