SET STORAGE_ENGINE = Falcon;
#
# Mantis bug #136: Error "Duplicate key name"
# http://bugs.mysql.com/19733
#
--echo *** Bug #136 ***
--disable_warnings
DROP TABLE IF EXISTS tp;
DROP PROCEDURE IF EXISTS pp;
--enable_warnings

CREATE TABLE tp (s1 int);

delimiter |;
CREATE PROCEDURE pp ()
begin 
  declare v int default 0;
  while v < 100 do 
    select v; 
    create index i on tp (s1);
    drop index i on tp; 
    set v = v + 1; 
  end while; 
end|

call pp()|


# Final cleanup
DROP TABLE tp//
DROP PROCEDURE pp//

delimiter ;|
