Bug #21221 Test "innodb_handler" fails because a table is not dropped
Submitted: 21 Jul 2006 17:53 Modified: 7 Nov 2007 15:52
Reporter: Joerg Bruehe Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: Tests Severity:S7 (Test Cases)
Version:4.1.21 OS:Linux (Linux (x86) static)
Assigned to: Matthias Leich CPU Architecture:Any

[21 Jul 2006 17:53] Joerg Bruehe
Description:
Release build of 4.1.21

Effect is specific to the RPM build on host "build".

Symptom:
=====
innodb_handler                 [ fail ]

Errors are (from /PATH/mysqltest-time) :
mysqltest: At line 11: query 'create table t1 (a int, b char(10), key a(a), key b(a,b)) engine=innodb' failed: 1050: Table 't1' already exists
(the last lines may be the most important ones)
=====

This is the first test failure in that run, so the initial state should be as clean as usual.

Extract from the test file:
=====
      1 -- source include/have_innodb.inc
      2
      3 #
      4 # test of HANDLER ...
      5 #
      6
      7 --disable_warnings
      8 drop table if exists t1,t2;
      9 --enable_warnings
     10
     11 create table t1 (a int, b char(10), key a(a), key b(a,b)) engine=innodb;
     12 insert into t1 values
    ... ...
=====

How to repeat:
Detected when running the test suite.
[7 Nov 2007 15:52] Matthias Leich
Thank you for your bug report.

1. There is no bug within the test itself because there is 
   drop table if exists t1,t2;
   before the
   create table t1 ....

   I also made some experiments which showed that
   whatever (no table,t1,t2,t1 and t2) of the tables exists
   drop table if exists t1,t2;
   will remove them all.

2. I was unable to reproduce the problem with
   mysql-4.1-build ChangeSet@1.2684.1.6, 2007-10-25
   compile-pentium-debug-max

So I can only assume that the observed problem was
a temporary failure caused by whatever problem.

One thing which surprises me, is that the problem
happened most probably during a "make test",
"make test-bt" or similar. That means there were
several tests containing "drop table if exists ..."
executed and getting a "pass" before "innodb_handler"
started and failed. Why ?
[7 Nov 2007 17:19] Joerg Bruehe
1) I agree to the remark about the test being correct,
   otherwise I would have spotted it myself
(and the error would not have occurred on one platform only).

2) I am not surprised it could not be reproduced on any developer machine,
   as it occurred (in the build) on that one peculiar platform only:
A Linux (x86) still using glibc 2.2 with a patch to support many threads.
It would be some very queer chance to have a bug show up on that platform only
but *not* be related to its special properties.

3) If I had had an explanation why only this "drop table" did not achieve
   the desired effect, I would have written it.

4) I checked the build logs of later builds (4.1.22 and 4.1.23) of that host,
   and neither showed the problem.
Also, no other host had it (expected).
So "Can't repeat" is the appropriate status.