Bug #18617 mysql-test-run.pl, partially wrong handling of option "start-dirty"
Submitted: 29 Mar 2006 15:11 Modified: 11 May 2006 17:25
Reporter: Matthias Leich Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Command-line Clients Severity:S3 (Non-critical)
Version:4.1 OS:Any
Assigned to: Jim Winstead CPU Architecture:Any

[29 Mar 2006 15:11] Matthias Leich
Description:
The option "start-dirty" should do nothing different than "start-and-exit",
except that the cleanup within data directories and the recreation
of databases is omitted. That means "start-dirty" should use any already
existing databases/tables/users ...
Last year the position of the main "start-and-exit" actions was
shifted, but it was forgotten to also shift the "start-dirty" actions.
Also several actions of the mtr_timer processes where introduced
and/or modified, but "start-dirty" was not treated like "start-and-exit".

AFAIR the semantics of the "start-and-exit" is similar to the basic
preparation steps as if it is intended to execute the assigned
testcase, except that the testcase itself will be not executed
(phase where mysqltest runs) and the server will be kept running.

  Example: ./mysql-test-run.pl <some options> <testcase> \
                 "start-and-exit"
    1. stop a probably already running server
    2. cleanup of data directory
    3. install default databases "mysql" and "test"
    4. start the server by using a probably existing t/<testcase>.opt
    5. start the mtr_timer processes
    6. simply exit 

"start-dirty" should do the same but omit 2. and 3.

The current "start-dirty" behaviour shows some minor problems 
around the handling of <testcase>.opt files and probably around
the handling of the mtr_timers.
I do not know of any existing test or test currently in implementation
which suffers from these problems. 
But of course every attempt to start a server via "start-dirty" with 
use of an opt file belonging to a certain testcase will produce 
unexpected effects.
I fear also that future improvements of mysql-test-run.pl will
take care of "start-and-exit", but forget to maintain "start-dirty".
The result could be, that testsuites like Upgrade/Downgrade which
depend on a correct working "start-dirty" will be broken.

My environment:
   - Intel PC with Linux(SuSE 9.3)
   - MySQL compiled from source
         Version 5.1 last ChangeSet@1.2243.2.1, 2006-03-28
         Version 5.0 last ChangeSet@1.2084, 2006-03-13
         Version 4.1 last ChangeSet@1.2471, 2006-02-03

How to repeat:
N/A

Suggested fix:
I think it is sufficient to repair "start-dirty" for MySQL versions >= 5.0.
[21 Apr 2006 2:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/5238
[1 May 2006 16:03] Jim Winstead
Fixed in 5.0.22 and 5.1.10.
[11 May 2006 17:25] Paul DuBois
No changelog entry needed.