#At file:///Users/pcrews/usr/local/bin/data1/work/id_func/mysql-5.1-bugteam/
2712 Patrick Crews 2008-11-17
Bug#40178 Test main.identity_func failing randomly on Pushbuild
Found that main.completion_type_func was not properly cleaning up after itself.
This was leaving an orphan t1 table in the Innodb data dictionary.
Added SQL to clean up after the test, cleaned up SQL syntax in completion_type_func,
and removed redundant master.opt files for both tests. They use
include/have_innodb.inc, so
a master.opt file is not necessary.
removed:
mysql-test/t/completion_type_func-master.opt
mysql-test/t/identity_func-master.opt
modified:
mysql-test/r/completion_type_func.result
mysql-test/t/completion_type_func.test
mysql-test/t/disabled.def
per-file messages:
mysql-test/t/disabled.def
Bug #37998 has been closed and this test should be re-enabled.
=== modified file 'mysql-test/r/completion_type_func.result'
--- a/mysql-test/r/completion_type_func.result 2008-04-10 13:14:28 +0000
+++ b/mysql-test/r/completion_type_func.result 2008-11-17 21:21:51 +0000
@@ -1,34 +1,34 @@
-drop table if exists t1;
+DROP TABLE IF EXISTS t1;
## Creating new table ##
CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
-name varchar(30)
+name VARCHAR(30)
) ENGINE = INNODB;
'#--------------------FN_DYNVARS_017_01-------------------------#'
## Creating new connection ##
-INSERT into t1(name) values('Record_1');
+INSERT INTO t1(name) VALUES('Record_1');
SET @@autocommit = 0;
-SELECT * from t1;
+SELECT * FROM t1;
id name
1 Record_1
## Setting value of variable to 0 ##
SET @@session.completion_type = 0;
## Here commit & rollback should work normally ##
START TRANSACTION;
-SELECT * from t1;
+SELECT * FROM t1;
id name
1 Record_1
-INSERT into t1(name) values('Record_2');
-INSERT into t1(name) values('Record_3');
-SELECT * from t1;
+INSERT INTO t1(name) VALUES('Record_2');
+INSERT INTO t1(name) VALUES('Record_3');
+SELECT * FROM t1;
id name
1 Record_1
2 Record_2
3 Record_3
-DELETE FROM t1 where id = 2;
-SELECT * from t1;
+DELETE FROM t1 WHERE id = 2;
+SELECT * FROM t1;
id name
1 Record_1
3 Record_3
@@ -37,8 +37,8 @@ SELECT * from t1;
id name
1 Record_1
3 Record_3
-INSERT into t1(name) values('Record_4');
-INSERT into t1(name) values('Record_5');
+INSERT INTO t1(name) VALUES('Record_4');
+INSERT INTO t1(name) VALUES('Record_5');
COMMIT;
'#--------------------FN_DYNVARS_017_02-------------------------#'
SET @@session.completion_type = 2;
@@ -50,12 +50,12 @@ id name
3 Record_3
4 Record_4
5 Record_5
-INSERT into t1(name) values('Record_6');
-INSERT into t1(name) values('Record_7');
+INSERT INTO t1(name) VALUES('Record_6');
+INSERT INTO t1(name) VALUES('Record_7');
COMMIT;
## Inserting rows should give error here because connection should ##
## disconnect after using COMMIT ##
-INSERT into t1(name) values('Record_4');
+INSERT INTO t1(name) VALUES('Record_4');
Got one of the listed errors
## Creating new connection test_con2 ##
SET @@session.completion_type = 2;
@@ -69,8 +69,9 @@ id name
5 Record_5
6 Record_6
7 Record_7
-INSERT into t1(name) values('Record_8');
-INSERT into t1(name) values('Record_9');
+INSERT INTO t1(name) VALUES('Record_8');
+INSERT INTO t1(name) VALUES('Record_9');
ROLLBACK;
-INSERT into t1(name) values('Record_4');
+INSERT INTO t1(name) VALUES('Record_4');
Got one of the listed errors
+DROP TABLE t1;
=== removed file 'mysql-test/t/completion_type_func-master.opt'
--- a/mysql-test/t/completion_type_func-master.opt 2008-04-10 13:14:28 +0000
+++ b/mysql-test/t/completion_type_func-master.opt 1970-01-01 00:00:00 +0000
@@ -1 +0,0 @@
---innodb
=== modified file 'mysql-test/t/completion_type_func.test'
--- a/mysql-test/t/completion_type_func.test 2008-04-16 08:23:07 +0000
+++ b/mysql-test/t/completion_type_func.test 2008-11-17 21:21:51 +0000
@@ -22,7 +22,7 @@
--source include/have_innodb.inc
--disable_warnings
-drop table if exists t1;
+DROP TABLE IF EXISTS t1;
--enable_warnings
#########################
@@ -34,7 +34,7 @@ CREATE TABLE t1
(
id INT NOT NULL auto_increment,
PRIMARY KEY (id),
-name varchar(30)
+name VARCHAR(30)
) ENGINE = INNODB;
--echo '#--------------------FN_DYNVARS_017_01-------------------------#'
@@ -46,27 +46,27 @@ name varchar(30)
connect (test_con1,localhost,root,,);
connection test_con1;
-INSERT into t1(name) values('Record_1');
+INSERT INTO t1(name) VALUES('Record_1');
SET @@autocommit = 0;
-SELECT * from t1;
+SELECT * FROM t1;
--echo ## Setting value of variable to 0 ##
SET @@session.completion_type = 0;
--echo ## Here commit & rollback should work normally ##
START TRANSACTION;
-SELECT * from t1;
-INSERT into t1(name) values('Record_2');
-INSERT into t1(name) values('Record_3');
-SELECT * from t1;
-DELETE FROM t1 where id = 2;
-SELECT * from t1;
+SELECT * FROM t1;
+INSERT INTO t1(name) VALUES('Record_2');
+INSERT INTO t1(name) VALUES('Record_3');
+SELECT * FROM t1;
+DELETE FROM t1 WHERE id = 2;
+SELECT * FROM t1;
START TRANSACTION;
SELECT * from t1;
-INSERT into t1(name) values('Record_4');
-INSERT into t1(name) values('Record_5');
+INSERT INTO t1(name) VALUES('Record_4');
+INSERT INTO t1(name) VALUES('Record_5');
COMMIT;
@@ -80,14 +80,14 @@ SET @@session.completion_type = 2;
--echo ## Here commit should work as COMMIT RELEASE ##
START TRANSACTION;
SELECT * from t1;
-INSERT into t1(name) values('Record_6');
-INSERT into t1(name) values('Record_7');
+INSERT INTO t1(name) VALUES('Record_6');
+INSERT INTO t1(name) VALUES('Record_7');
COMMIT;
--echo ## Inserting rows should give error here because connection should ##
--echo ## disconnect after using COMMIT ##
--Error 2006,2013,1053
-INSERT into t1(name) values('Record_4');
+INSERT INTO t1(name) VALUES('Record_4');
--echo ## Creating new connection test_con2 ##
connect (test_con2,localhost,root,,);
@@ -97,10 +97,15 @@ SET @@session.completion_type = 2;
--echo ## Inserting rows and using Rollback which should Rollback & release ##
START TRANSACTION;
SELECT * from t1;
-INSERT into t1(name) values('Record_8');
-INSERT into t1(name) values('Record_9');
+INSERT INTO t1(name) VALUES('Record_8');
+INSERT INTO t1(name) VALUES('Record_9');
ROLLBACK;
--Error 2006,2013,1053
-INSERT into t1(name) values('Record_4');
+INSERT INTO t1(name) VALUES('Record_4');
+
+connection default;
+disconnect test_con1;
+disconnect test_con2;
+DROP TABLE t1;
=== modified file 'mysql-test/t/disabled.def'
--- a/mysql-test/t/disabled.def 2008-11-04 11:27:21 +0000
+++ b/mysql-test/t/disabled.def 2008-11-17 21:21:51 +0000
@@ -11,5 +11,4 @@
##############################################################################
federated_transactions : Bug#29523 Transactions do not work
csv_alter_table : Bug#33696 2008-01-21 pcrews no .result file - bug allows NULL
columns in CSV tables
-log_tables.test : Bug #37798: main.log_tables fails randomly on
powermacg5 and windows
slow_query_log_func.test : Bug #37962: *_func tests containing sleeps/race
conditions
=== removed file 'mysql-test/t/identity_func-master.opt'
--- a/mysql-test/t/identity_func-master.opt 2008-04-10 13:14:28 +0000
+++ b/mysql-test/t/identity_func-master.opt 1970-01-01 00:00:00 +0000
@@ -1,2 +0,0 @@
---innodb
-
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (patrick.crews:2712) Bug#40178 | Patrick Crews | 17 Nov |