#At file:///export/home/tmp/je159969/mysql/bzr-repos/mysql-6.0-falcon-suites/ based on revid:john.embretsen@stripped
2916 John H. Embretsen 2008-11-20
Fix for Bug#35503 - falcon_bug_34351_C.test times out on Pushbuild.
Reducing loop count inside procedure from 10k to 5k in both falcon_bug_34351_A
and falcon_bug_34251_C, as per Kevin Lewis' recommendations.
Test case running time is effectively cut in half by doing this.
Also adding new -big versions of those tests, running 20k iterations, in case
the bug is not triggered by 5k iterations in the non-big version.
These tests need to be run using the --big-test option of mysql-test-run.pl.
On slower machines one might have to increase the test case timeout as well,
e.g. --testcase-timeout=30 for a timeout of 30 minutes.
added:
mysql-test/suite/falcon/r/falcon_bug_34351_A-big.result
mysql-test/suite/falcon/r/falcon_bug_34351_C-big.result
mysql-test/suite/falcon/t/falcon_bug_34351_A-big.test
mysql-test/suite/falcon/t/falcon_bug_34351_C-big.test
modified:
mysql-test/suite/falcon/r/falcon_bug_34351_A.result
mysql-test/suite/falcon/r/falcon_bug_34351_C.result
mysql-test/suite/falcon/t/falcon_bug_34351_A.test
mysql-test/suite/falcon/t/falcon_bug_34351_C.test
per-file messages:
mysql-test/suite/falcon/r/falcon_bug_34351_A-big.result
Result file for (new) -big version of falcon_bug_34351_A test.
mysql-test/suite/falcon/r/falcon_bug_34351_A.result
Decreased number of iterations in while loop inside procedure (from 10k to 5k) in order to prevent Pushbuild timeouts. Also added cleanup of table t1.
mysql-test/suite/falcon/r/falcon_bug_34351_C-big.result
Result file for (new) -big version of falcon_bug_34351_C test.
mysql-test/suite/falcon/r/falcon_bug_34351_C.result
Decreased number of iterations in while loop inside procedure (from 10k to 5k) in order to prevent Pushbuild timeouts.
mysql-test/suite/falcon/t/falcon_bug_34351_A-big.test
New -big version of falcon_bug_34351_A test. This test is currently running 4 times as many iterations per procedure call as the non-big version. Thus, this test case is more likely to trigger the bug (if there is a regression) than the original test case.
mysql-test/suite/falcon/t/falcon_bug_34351_A.test
Decreased number of iterations in while loop inside procedure (from 10k to 5k) in order to prevent Pushbuild timeouts. Also added cleanup of table t1.
mysql-test/suite/falcon/t/falcon_bug_34351_C-big.test
New -big version of falcon_bug_34351_C test. This test is currently running 4 times as many iterations per procedure call as the non-big version. Thus, this test case is more likely to trigger the bug (if there is a regression) than the original test case.
mysql-test/suite/falcon/t/falcon_bug_34351_C.test
Decreased number of iterations in while loop inside procedure (from 10k to 5k) in order to prevent Pushbuild timeouts.
=== added file 'mysql-test/suite/falcon/r/falcon_bug_34351_A-big.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_34351_A-big.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_A-big.result 2008-11-20 15:58:23 +0000
@@ -0,0 +1,43 @@
+*** Bug #34351_A ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+# Establish connection conn1 (user = root)
+SET @@autocommit = 1;
+# Switch to connection default
+SET @@autocommit = 1;
+CREATE TABLE t1 (
+t1_autoinc INTEGER NOT NULL AUTO_INCREMENT,
+t1_uuid CHAR(36),
+PRIMARY KEY (t1_autoinc), KEY (t1_uuid)
+) ENGINE = Falcon;
+CREATE PROCEDURE p1 ()
+begin
+DECLARE my_count INT DEFAULT 0;
+DECLARE my_uuid CHAR(36) DEFAULT 0;
+while my_count < 20000 do
+SET my_uuid = UUID();
+START TRANSACTION;
+INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
+DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
+COMMIT;
+SET my_count = my_count + 1;
+end while;
+end//
+# Send call p1() to the server but do not pull the results
+CALL p1();
+# Switch to connection conn1
+CALL p1();
+# Switch to connection default
+# Pull the results of the preceeding call p1()
+# Send call p1() to the server but do not pull the results
+CALL p1();
+# Switch to connection conn1
+CALL p1();
+# Switch to connection default
+# Pull the results of the preceeding call p1()
+SELECT count(*) FROM t1;
+count(*)
+0
+DROP PROCEDURE p1;
+DROP TABLE t1;
=== modified file 'mysql-test/suite/falcon/r/falcon_bug_34351_A.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_34351_A.result 2008-03-05 20:25:44 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_A.result 2008-11-20 15:58:23 +0000
@@ -15,7 +15,7 @@ CREATE PROCEDURE p1 ()
begin
DECLARE my_count INT DEFAULT 0;
DECLARE my_uuid CHAR(36) DEFAULT 0;
-while my_count < 10000 do
+while my_count < 5000 do
SET my_uuid = UUID();
START TRANSACTION;
INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
@@ -40,3 +40,4 @@ SELECT count(*) FROM t1;
count(*)
0
DROP PROCEDURE p1;
+DROP TABLE t1;
=== added file 'mysql-test/suite/falcon/r/falcon_bug_34351_C-big.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_34351_C-big.result 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_C-big.result 2008-11-20 15:58:23 +0000
@@ -0,0 +1,39 @@
+*** Bug #34351_C-big ***
+SET @@storage_engine = 'Falcon';
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+# Establish connection conn1 (user = root)
+SET @@autocommit = 1;
+# Switch to connection default
+SET @@autocommit = 1;
+CREATE TABLE t1 (
+t1_autoinc INTEGER NOT NULL AUTO_INCREMENT,
+t1_uuid CHAR(36),
+PRIMARY KEY (t1_autoinc), key(t1_uuid)
+) ENGINE = Falcon;
+CREATE PROCEDURE p1 ()
+begin
+DECLARE my_count INT DEFAULT 0;
+DECLARE my_uuid CHAR(36) DEFAULT 0;
+SET FALCON_CONSISTENT_READ=OFF;
+while my_count < 20000 do
+SET my_uuid = UUID();
+INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
+DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
+SET my_count = my_count + 1;
+end while;
+end//
+# Send call p1() to the server but do not pull the results
+CALL p1();
+# Switch to connection conn1
+CALL p1();
+# Switch to connection default
+# Pull the results of the preceeding call p1()
+# Send call p1() to the server but do not pull the results
+CALL p1();
+# Switch to connection conn1
+CALL p1();
+# Switch to connection default
+# Pull the results of the preceeding call p1()
+DROP PROCEDURE p1;
+DROP TABLE t1;
=== modified file 'mysql-test/suite/falcon/r/falcon_bug_34351_C.result'
--- a/mysql-test/suite/falcon/r/falcon_bug_34351_C.result 2008-09-28 08:07:30 +0000
+++ b/mysql-test/suite/falcon/r/falcon_bug_34351_C.result 2008-11-20 15:58:23 +0000
@@ -16,7 +16,7 @@ begin
DECLARE my_count INT DEFAULT 0;
DECLARE my_uuid CHAR(36) DEFAULT 0;
SET FALCON_CONSISTENT_READ=OFF;
-while my_count < 10000 do
+while my_count < 5000 do
SET my_uuid = UUID();
INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
=== added file 'mysql-test/suite/falcon/t/falcon_bug_34351_A-big.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_34351_A-big.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_A-big.test 2008-11-20 15:58:23 +0000
@@ -0,0 +1,101 @@
+--source include/have_falcon.inc
+--source include/big_test.inc
+#
+# Bug #34351: Update Conflict on non-overlapping transactions.
+#
+# Test A-big: Running loop of 20 000 iterations inside procedure.
+# Original test ran 10k iterations but could potentially time
+# out in Pushbuild (automatic testing). Original test
+# (falcon_bug_24351_A.test) changed to run the loop 5k times
+# per procedure call instead.
+#
+# This test works because the INSERT and DELETE are in the same
+# transaction and so the INSERT is not seen by other transactions.
+#
+--echo *** Bug #34351_A ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+--echo # Establish connection conn1 (user = root)
+connect (conn1,localhost,root,,);
+SET @@autocommit = 1;
+
+--echo # Switch to connection default
+connection default;
+SET @@autocommit = 1;
+
+CREATE TABLE t1 (
+ t1_autoinc INTEGER NOT NULL AUTO_INCREMENT,
+ t1_uuid CHAR(36),
+ PRIMARY KEY (t1_autoinc), KEY (t1_uuid)
+) ENGINE = Falcon;
+
+# declare continue handler for sqlexception
+
+delimiter //;
+CREATE PROCEDURE p1 ()
+begin
+ DECLARE my_count INT DEFAULT 0;
+ DECLARE my_uuid CHAR(36) DEFAULT 0;
+ while my_count < 20000 do
+ SET my_uuid = UUID();
+ START TRANSACTION;
+ INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
+ DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
+ COMMIT;
+ SET my_count = my_count + 1;
+ end while;
+end//
+delimiter ;//
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
+
+--echo # Send call p1() to the server but do not pull the results
+--send CALL p1()
+
+--echo # Switch to connection conn1
+connection conn1;
+--real_sleep 1
+CALL p1();
+
+--echo # Switch to connection default
+connection default;
+--echo # Pull the results of the preceeding call p1()
+--reap
+--echo # Send call p1() to the server but do not pull the results
+--real_sleep 1
+--send CALL p1()
+
+--echo # Switch to connection conn1
+connection conn1;
+--real_sleep 1
+CALL p1();
+
+--echo # Switch to connection default
+connection default;
+--echo # Pull the results of the preceeding call p1()
+--reap
+
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+# Checking row count is not applicable here.
+SELECT count(*) FROM t1;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+DROP PROCEDURE p1;
+DROP TABLE t1;
=== modified file 'mysql-test/suite/falcon/t/falcon_bug_34351_A.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_34351_A.test 2008-03-05 20:25:44 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_A.test 2008-11-20 15:58:23 +0000
@@ -38,7 +38,7 @@ CREATE PROCEDURE p1 ()
begin
DECLARE my_count INT DEFAULT 0;
DECLARE my_uuid CHAR(36) DEFAULT 0;
- while my_count < 10000 do
+ while my_count < 5000 do
SET my_uuid = UUID();
START TRANSACTION;
INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
@@ -90,3 +90,4 @@ SELECT count(*) FROM t1;
# --- Final cleanup --- #
# ----------------------------------------------------- #
DROP PROCEDURE p1;
+DROP TABLE t1;
=== added file 'mysql-test/suite/falcon/t/falcon_bug_34351_C-big.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_34351_C-big.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_C-big.test 2008-11-20 15:58:23 +0000
@@ -0,0 +1,101 @@
+--source include/have_falcon.inc
+--source include/big_test.inc
+
+#
+# Bug #34351: Update Conflict on non-overlapping transactions
+# This test works because it uses FALCON_CONSISTENT_READ=OFF
+#
+# Test C-big: Running loop of 20 000 iterations inside procedure.
+# Original test ran 10k iterations but would sometimes time
+# out in Pushbuild (automatic testing) - Bug#35503.
+#
+# Original test (falcon_bug_24351_C.test) changed to run the
+# loop 5k times per procedure call instead, hoping that it
+# would still be able to detect a regression.
+# This -big test was created as an extra precaution, in
+# case 5k iterations is not enough.
+#
+#
+--echo *** Bug #34351_C-big ***
+
+# ----------------------------------------------------- #
+# --- Initialisation --- #
+# ----------------------------------------------------- #
+let $engine = 'Falcon';
+eval SET @@storage_engine = $engine;
+
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+DROP PROCEDURE IF EXISTS p1;
+--enable_warnings
+
+--echo # Establish connection conn1 (user = root)
+connect (conn1,localhost,root,,);
+SET @@autocommit = 1;
+
+--echo # Switch to connection default
+connection default;
+SET @@autocommit = 1;
+
+CREATE TABLE t1 (
+ t1_autoinc INTEGER NOT NULL AUTO_INCREMENT,
+ t1_uuid CHAR(36),
+ PRIMARY KEY (t1_autoinc), key(t1_uuid)
+) ENGINE = Falcon;
+
+delimiter //;
+CREATE PROCEDURE p1 ()
+begin
+ DECLARE my_count INT DEFAULT 0;
+ DECLARE my_uuid CHAR(36) DEFAULT 0;
+ SET FALCON_CONSISTENT_READ=OFF;
+ while my_count < 20000 do
+ SET my_uuid = UUID();
+ INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
+ DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
+ SET my_count = my_count + 1;
+ end while;
+end//
+delimiter ;//
+
+# ----------------------------------------------------- #
+# --- Test --- #
+# ----------------------------------------------------- #
+
+--echo # Send call p1() to the server but do not pull the results
+--send CALL p1()
+
+--echo # Switch to connection conn1
+connection conn1;
+--real_sleep 1
+CALL p1();
+
+--echo # Switch to connection default
+connection default;
+--echo # Pull the results of the preceeding call p1()
+--reap
+--echo # Send call p1() to the server but do not pull the results
+--real_sleep 1
+--send CALL p1()
+
+--echo # Switch to connection conn1
+connection conn1;
+--real_sleep 1
+CALL p1();
+
+--echo # Switch to connection default
+connection default;
+--echo # Pull the results of the preceeding call p1()
+--reap
+
+# ----------------------------------------------------- #
+# --- Check --- #
+# ----------------------------------------------------- #
+# Checking row count is not applicable here.
+#SELECT count(*) FROM t1;
+
+# ----------------------------------------------------- #
+# --- Final cleanup --- #
+# ----------------------------------------------------- #
+DROP PROCEDURE p1;
+DROP TABLE t1;
=== modified file 'mysql-test/suite/falcon/t/falcon_bug_34351_C.test'
--- a/mysql-test/suite/falcon/t/falcon_bug_34351_C.test 2008-09-28 08:07:30 +0000
+++ b/mysql-test/suite/falcon/t/falcon_bug_34351_C.test 2008-11-20 15:58:23 +0000
@@ -37,7 +37,7 @@ begin
DECLARE my_count INT DEFAULT 0;
DECLARE my_uuid CHAR(36) DEFAULT 0;
SET FALCON_CONSISTENT_READ=OFF;
- while my_count < 10000 do
+ while my_count < 5000 do
SET my_uuid = UUID();
INSERT INTO t1 (t1_uuid) VALUES (my_uuid);
DELETE FROM t1 WHERE t1_uuid IN (my_uuid);
| Thread |
|---|
| • bzr commit into mysql-6.0-falcon-team branch (john.embretsen:2916) Bug#35503 | John H. Embretsen | 20 Nov |