Comment 5 for bug 989055

Revision history for this message
Peter (Stig) Edwards (thatsafunnyname) wrote :

I created a MTR version of the ruby and bash reproducers. I suspect it could be simplified even more:

# MTR test case:

# https://bugs.launchpad.net/maria/+bug/989055

--disable_warnings
let $h= 200;
while ($h)
{
  eval DROP TABLE IF EXISTS t_$h;
  dec $h;
}
--enable_warnings

--connect(con1,localhost,root,,)
--connect(con2,localhost,root,,)

let $i= 200;
while ($i)
{
  eval CREATE TABLE t_$i ( id INT PRIMARY KEY, a VARCHAR(100), INDEX(a) ) ENGINE=MyISAM;
  dec $i;
}

let $j= 200;
while ($j)
{
  connection con1;
    --send
      eval ALTER TABLE t_$j DISABLE KEYS;
  connection con2;
    --send
      eval SHOW TABLE STATUS LIKE 't_$j';
  connection con1;
    reap;
    --send
      eval ALTER TABLE t_$j ENABLE KEYS;
  connection con1;
    reap;
  connection con2;
    reap;
  dec $j;
}
--connection default
disconnect con1;
disconnect con2;

let $k= 200;
while ($k)
{
  eval SHOW TABLE STATUS LIKE 't_$k';
  dec $k;
}

# Fails because of warnings found in the error log:
# YYMMDD HH:MM:SS [ERROR] mysqld: Table './test/t_XX' is marked as crashed and should be repaired

# End of MTR test case