mariadb/mysql-test/collections
Alexander Nozdrin c784ee2782 Patch for Bug#52356: query_cache_debug fails on Linux.
There were two problems here:
  1. misleading error message
  2. abusing KILL QUERY in the test case

1. The server reported "'DELETE FROM t1' failed: 1689: Wait on a lock was
aborted due to a pending exclusive lock", while the proper error message
should be "'DELETE FROM t1' failed: 1317: Query execution was interrupted".

The problem is that the server has two different flags for
signalling that a query is being killed: THD::killed and
mysys_var::abort. The test case triggers a race: sometimes
mysys_var::abort is set earlier than THD::killed. That leads
to the following situation:

  - thr_lock() checks mysys_var::abort and returns error status,
    since mysys_var::abort is set;

  - the caller (mysql_lock_tables()) gets an error from thr_lock(),
    but THD::killed is not set, so it decides that thr_lock() couldn't
    get a lock due to a pending exclusive lock.

This is a known issue with the server and it's not going to be fixed soon.

5.5 differs from 5.1 here as follows: when thr_lock() returns an error:
  - 5.1 continues trying thr_lock() until success;
  - 5.5 propagates the error

2. The test case uses KILL QUERY is a highly concurent environment.

The fix is to wait for the dying statement to rest in peace before
executing another DELETE FROM t1.
2010-04-30 16:12:41 +04:00
..
default.daily Enable ndb and rpl_ndb test suites in daily builds. 2010-03-15 19:43:26 +03:00
default.experimental Patch for Bug#52356: query_cache_debug fails on Linux. 2010-04-30 16:12:41 +04:00
default.push Moved the ndb related tests out of the per-push pb2 run to the daily pb2 run. 2010-03-02 14:43:21 +02:00
default.weekly Enable one test case for weekly builds. 2010-01-25 19:12:25 +03:00
mysql-next-mr.push Enable sys_vars and perfschema test suites 2010-01-18 15:01:11 +03:00
mysql-trunk.push Enable sys_vars and perfschema test suites 2010-01-18 15:01:11 +03:00
README bug#42888: Add collections of test runs to make it both configurable and 2009-02-24 11:42:11 +01:00
README.experimental Bug #44979 Enhance MTR --experimental to support platform qualifier 2009-08-13 15:29:19 +02:00
test-bt Remove backslashes used as line continuation characters : makes scripts unusable under Windows. 2010-01-20 00:56:54 +01:00
test-bt-debug Remove backslashes used as line continuation characters : makes scripts unusable under Windows. 2010-01-20 00:56:54 +01:00
test-bt-debug-fast Added collections for the "test-bt" test targets 2010-01-19 17:14:25 +01:00
test-bt-fast Remove backslashes used as line continuation characters : makes scripts unusable under Windows. 2010-01-20 00:56:54 +01:00

This directory contains collections of test runs that we run during our
integration and release testing. Each file contains zero or more lines,
with one invocation of mysql-test-run.pl on each. These invocations are
written so that, with the assumption that perl is in your search path,
any collection can run as a shell script or a batch file, with the parent
mysql-test directory being the current working directory.

During integration testing, we choose the collection to run by following
these steps:

1) We choose the extension to look for, based on these rules:
   - If we're running a per-push test, we choose ".push" as the extension.
   - If we're running a daily test, we choose ".daily" as the extension.
   - If we're running a weekly test, we choose ".weekly" as the extension.

2) If there is a collection that has the same name as the branch we're
   testing plus the extension as determined in step 1, we choose that
   collection.

3) If the branch is unknown or we have removed all characters from it
   and still not found a matching collection, we choose the name "default"
   plus the extension determined in step 1. If there is no such file,
   we give up and don't test anything at all.

4) If we haven't found a collection yet, we remove the last character from 
   the branch name and go back to step 2.

5) The commands from the collection are run line by line via execv() or
   similar system calls. They are not run as a shell script. Shell 
   expansions are not guaranteed to work and most likely won't.