Bug #39980 main.events_restart_phase* depend on each other = do not clean up
Submitted: 10 Oct 2008 15:49 Modified: 4 Mar 2009 21:11
Reporter: Matthias Leich Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Tests: Server Severity:S3 (Non-critical)
Version:5.1+ OS:Any
Assigned to: CPU Architecture:Any

[10 Oct 2008 15:49] Matthias Leich
Description:
Just some examples which illustrate the issue:
----------------------------------------------
./mysql-test-run --check-testcases events_restart_phase1
=======================================================
TEST                           RESULT         TIME (ms)
-------------------------------------------------------
--- var/tmp/check-master0.result
+++ var/tmp/check-master0.reject
@@ -251,6 +251,7 @@
 show databases;
 Database
 information_schema
+events_test
 mysql
 test

@@ -335,7 +336,7 @@
 CREATE TABLE `event` (
   `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
   `name` char(64) NOT NULL DEFAULT '',
-  `body` longblob NOT NULL,
+  `body` longtext CHARACTER SET utf8 COLLATE utf8_bin,
   `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
   `execute_at` datetime DEFAULT NULL,
   `interval_value` int(11) DEFAULT NULL,

--- var/tmp/check-master0.result
+++ var/tmp/check-master0.reject
@@ -251,6 +251,7 @@
 show databases;
 Database
 information_schema
+events_test
 mysql
 test

@@ -335,7 +336,7 @@
 CREATE TABLE `event` (
   `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
   `name` char(64) NOT NULL DEFAULT '',
-  `body` longblob NOT NULL,
+  `body` longtext CHARACTER SET utf8 COLLATE utf8_bin,
   `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
   `execute_at` datetime DEFAULT NULL,
   `interval_value` int(11) DEFAULT NULL

./mysql-test-run events_restart_phase2
...
=======================================================
TEST                           RESULT         TIME (ms)
-------------------------------------------------------
main.events_restart_phase2     [ fail ]

mysqltest: At line 4: query 'use events_test' failed: 1049: Unknown database 'events_test'

This bug in testcase architecture has in the moment
most probably nearly no impact on the outcome of
Pushbuild.
But significant problems will come up
- extreme likely if MTR runs with the option
  "--reorder"
  "--reorder" accelerates the execution of testsuites
- likely if someone defines its own sequence of tests
  and this sequence contains events_bugs

How to repeat:
See above

Suggested fix:
We have here a situation where a fixed order of
test execution
   main.events_restart_phase1
   main.events_restart_phase2
   main.events_restart_phase3
is required.

This is an uncomfortable architecture if somebody
has to fix one of these tests. But there are some
checks where we cannot avoid such an architecture
because of the limited capabilities of our tools
(Example: Upgrade/Downgrade testsuite in
mysql-test-extra-<version trees).

The main failure here is to mix such tests into
a huge testsuite ("main") where
- IMHO > 90% of all tests do not have such dependencies
  (nobody expects them)
- sooner or later runs of MTR will/should contain
  the option "--reorder"
  -> Reorder the tests so that server restarts
     can be optimized away

Suggested fix:
Either
- put these tests into their own testsuite and
  document that MTR runs with "--reorder" might
  cause failures because there are dependencies
  between the tests
- try to remove the dependencies between these tests
[19 Dec 2008 20:54] Matthias Leich
AFAIK this problem is mostly or complete fixed within the
Replication tree.
It requires the new version of MTR.
So please check this tree first before doing anything.
[4 Mar 2009 21:11] Matthias Leich
2009-03-04 main, rpl and bugteam trees
version 5.1 and 6.0
-------------------
The tests events_restart_phase1 till
events_restart_phase3 are replaced
by events_restart which unites all
of them.

This means this problem does no more exist.
It was most probably removed by
revid: sp1r-msvensson@shellback.(none)-20080409074320-53953
comment: Mereg events_restart_phase* to events_restart