Broken fast index creation

Bug #939485 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
High
Laurynas Biveinis
5.5
Fix Released
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);

Related branches

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-544

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

Other bug subscribers

Remote bug watches

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