Commit graph

13 commits

Author SHA1 Message Date
Konstantin Osipov
1ee8a58882 Backport of:
------------------------------------------------------------
revno: 2476.784.3
committer: davi@moksha.local
timestamp: Tue 2007-10-02 21:27:31 -0300
message:
Bug#25858 Some DROP TABLE under LOCK TABLES can cause deadlocks
        
When a client (connection) holds a lock on a table and attempts to
drop (obtain a exclusive lock) on a second table that is already
held by a second client and the second client then attempts to
drop the table that is held by the first client, leads to a
circular wait deadlock. This scenario is very similar to trying to
drop (or rename) a table while holding read locks and are
correctly forbidden.
        
The solution is to allow a drop table operation to continue only
if the table being dropped is write (exclusively) locked, or if
the table is temporary, or if the client is not holding any
locks. Using this scheme prevents the creation of a circular
chain in which each client is waiting for one table that the
next client in the chain is holding.
            
This is incompatible change, as can be seen by number of tests
cases that needed to be fixed, but is consistent with respect to
behavior of the different scenarios in which the circular wait
might happen.
2009-11-20 22:51:12 +03:00
Matthias Leich
f1a55f8fcf Merge 5.0 -> 5.1 2009-02-09 22:00:15 +01:00
Matthias Leich
a63c2e5c30 2. Slice of fix for Bug#42003 tests missing the disconnect of connections <> default
- If missing: add "disconnect <session>"
   - If physical disconnect of non "default" sessions is not finished
     at test end: add routine which waits till this happened
+ additional improvements
  - remove superfluous files created by the test
  - replace error numbers by error names
  - remove trailing spaces, replace tabs by spaces
  - unify writing of bugs within comments
  - correct comments
  - minor changes of formatting
Fixed tests:
  backup
  check
  compress
  grant
  information_schema
  multi_update
  overflow
  packet
  query_cache_not_embedded
  sp-threads
  subselect
  synchronization
  timezone_grant
2009-02-05 21:47:23 +01:00
Davi Arnaut
d94e00a0ed Remove test case for bug 40264.
Dirty close tricky does not work on Windows.
2009-01-28 14:33:33 -02:00
Davi Arnaut
6a834d1f4f Bug#40264: Aborted cached query causes query to hang indefinitely on next cache hit
The problem is that the query cache was storing partial results
if the statement failed when sending the results to the client.
This could cause clients to hang when trying to read the results
from the cache as they would, for example, wait indefinitely for
a eof packet that wasn't saved.

The solution is to always discard the caching of a query that
failed to send its results to the associated client.
2009-01-22 08:28:01 -02:00
Sven Sandberg
78c8bfdddf BUG#37975: wait_for_slave_* should increase the timeout
Problem 1: tests often fail in pushbuild with a timeout when waiting
for the slave to start/stop/receive error.
Fix 1: Updated the wait_for_slave_* macros in the following way:
- The timeout is increased by a factor ten
- Refactored the macros so that wait_for_slave_param does the work for
the other macros.
Problem 2: Tests are often incorrectly written, lacking a
source include/wait_for_slave_to_[start|stop].inc.
Fix 2: Improved the chance to get it right by adding
include/start_slave.inc and include/stop_slave.inc, and updated tests
to use these.
Problem 3: The the built-in test language command
wait_for_slave_to_stop is a misnomer (does not wait for the slave io
thread) and does not give as much debug info in case of failure as
the otherwise equivalent macro
source include/wait_for_slave_sql_to_stop.inc
Fix 3: Replaced all calls to the built-in command by a call to the
macro.
Problem 4: Some, but not all, of the wait_for_slave_* macros had an
implicit connection slave. This made some tests confusing to read,
and made it more difficult to use the macro in circular replication
scenarios, where the connection named master needs to wait.
Fix 4: Removed the implicit connection slave from all
wait_for_slave_* macros, and updated tests to use an explicit
connection slave where necessary.
Problem 5: The macros wait_slave_status.inc and wait_show_pattern.inc
were unused. Moreover, using them is difficult and error-prone.
Fix 5: remove these macros.
Problem 6: log_bin_trust_function_creators_basic failed when running
tests because it assumed @@global.log_bin_trust_function_creators=1,
and some tests modified this variable without resetting it to its
original value.
Fix 6: All tests that use this variable have been updated so that
they reset the value at end of test.
2008-07-10 18:09:39 +02:00
thek@adventure.(none)
8c86e79aa3 Bug#30710 query_cache.test fails on embedded - per-column privs test
The embedded version of the server doesn't use column level grants, and 
the compile directive NO_EMBEDDED_ACCESS_CHECKS should be checked instead of
the redundant HAVE_QUERY_CACHE (which is always the case) to determine if 
column level grants should be compiled or not.
2007-10-16 14:42:42 +02:00
tnurnberg@salvation.intern.azundris.com
655056d32f Bug#16456 RBR: rpl_sp.test expects query to fail, but passes in RBR
Fix tests for new behaviour: an error is thrown if a NON DETERMINISTIC
stored function (SF) is called during statement-based replication (SBR).
2006-11-17 21:30:28 +01:00
msvensson@neptunus.(none)
f39ff057d1 Update tests and result files after running with new mysqltest that better detects problems with test files 2006-10-04 13:09:37 +02:00
bell@book.local
1626c2d9e1 We should prohobit concurent read of inserting file in SP
because it can couse problem with Query cache (BUG#14767)
2006-03-15 19:15:52 +02:00
monty@mysql.com
82b77cdd90 Fixes to embedded server to be able to run tests with it
(Needed for "list of pushes" web page and autopush)
2006-02-24 18:34:15 +02:00
sanja@arthur.local
3b64651683 query_cache_notembedded.test, query_cache_notembedded.result:
postmerge fix
2005-08-11 13:07:08 +03:00
hf@deer.(none)
c396a32f46 Fix for bug #9508 (query_cache test fails)
notembedded-specific part moved to the new test
2005-07-29 17:14:21 +05:00