summaryrefslogtreecommitdiff
path: root/mysql-test/suite/federated/federated_server.test
diff options
context:
space:
mode:
authorLuis Soares <luis.soares@sun.com>2009-01-22 14:07:58 +0100
committerLuis Soares <luis.soares@sun.com>2009-01-22 14:07:58 +0100
commit727707ac52a0c3bb2fc72b50db7a2cc832502249 (patch)
treef2fc55df37f1d28e0bb80fc8a7e94524c911099b /mysql-test/suite/federated/federated_server.test
parentc2a4f3901bf592443f78de739e0d3dddb0b268a5 (diff)
downloadmariadb-git-727707ac52a0c3bb2fc72b50db7a2cc832502249.tar.gz
BUG#40143 federated.federated_server fails sporadically in pushbuild
The original goal of the test, as reported on BUG #25721, is to check whether a deadlock happens or not when concurrently CREATING/ALTERING/DROPPING the same server. For that a procedure (p1) is created that runs the exact same CREATE/ALTER/DROP statements for 10K iterations and two different connections (threads - t1 and t2) call p1 concurrently. At the end of the 10K iterations, the test checks if there was errors while running the loop (SELECT e >0). The problem is that In some cases it may happen that one thread, t1, gets scheduled to execute with just enough time to complete the iteration and never bumps into the other thread t2. Meaning that t1 will never run into an SQL exception. On the other hand, the other thread, t2, may run into t1 and never issue any/part of its own statements because it will throw an SQLEXCEPTION. This is probably the case for failures where only one value differs. Furthermore, there is a third scenario: both threads are scheduled to run interleaved for each iteration (or even one thread completes all iterations before the other starts). In this case, both will succeed without any error. This is probably the case for the failure that reports two different values. This patch addresses the failure in pushbuild by removing the error counting and the printout (SELECT > 0) at the end of the test. A timeout should occur if the error that the test is checking surfaces.
Diffstat (limited to 'mysql-test/suite/federated/federated_server.test')
-rw-r--r--mysql-test/suite/federated/federated_server.test4
1 files changed, 1 insertions, 3 deletions
diff --git a/mysql-test/suite/federated/federated_server.test b/mysql-test/suite/federated/federated_server.test
index 4b8d51a60f4..ec952d071f2 100644
--- a/mysql-test/suite/federated/federated_server.test
+++ b/mysql-test/suite/federated/federated_server.test
@@ -305,9 +305,8 @@ delimiter //;
create procedure p1 ()
begin
DECLARE v INT DEFAULT 0;
- DECLARE e INT DEFAULT 0;
DECLARE i INT;
- DECLARE CONTINUE HANDLER FOR SQLEXCEPTION SET e = e + 1;
+ DECLARE CONTINUE HANDLER FOR SQLEXCEPTION BEGIN END;
SET i = sleep(5);
WHILE v < 10000 do
CREATE SERVER s
@@ -317,7 +316,6 @@ begin
DROP SERVER s;
SET v = v + 1;
END WHILE;
- SELECT e > 0;
END//
delimiter ;//
connection other;