summaryrefslogtreecommitdiff
path: root/mysql-test/include/concurrent.inc
diff options
context:
space:
mode:
authorunknown <mleich@three.local.lan>2006-08-16 14:58:49 +0200
committerunknown <mleich@three.local.lan>2006-08-16 14:58:49 +0200
commit808237b083fe36ea393b7e05e1f6c78d8213c106 (patch)
tree81f556e3b022838904a67ae5a3d1a96a1e3d439b /mysql-test/include/concurrent.inc
parent829d70d09c1d092f6c507825b75fe45424f0d86a (diff)
downloadmariadb-git-808237b083fe36ea393b7e05e1f6c78d8213c106.tar.gz
This changeset belongs to
WL#3397 Refactoring storage engine test cases (for falcon) It contains also fixes according to code review. Contents: Testcases which were in history dedicated to InnoDB or MyISAM only. Modifications: 1. Shift the main testing code into include/<testing field>.inc Introduce $variables which can be used to omit tests for features which are not supported by certain storage engines. 2. The storage engine to be tested is assigned within the toplevel script (t/<whatever>_<engine>.test) via variable $engine_type and the the main testing code is sourced from include/<testing field>.inc 3. Some toplevel testscripts have to be renamed to - avoid immediate or future namespace clashes - show via filename which storage engine is tested 4. Minor code cleanup like remove trailing spaces, some additional comments .... mysql-test/t/unsafe_binlog_innodb-master.opt: Rename: mysql-test/t/innodb_unsafe_binlog-master.opt -> mysql-test/t/unsafe_binlog_innodb-master.opt mysql-test/r/read_many_rows_innodb.result: Rename: mysql-test/r/innodb-big.result -> mysql-test/r/read_many_rows_innodb.result mysql-test/t/cache_innodb-master.opt: Rename: mysql-test/t/innodb_cache-master.opt -> mysql-test/t/cache_innodb-master.opt mysql-test/t/concurrent_innodb-master.opt: Rename: mysql-test/t/innodb_concurrent-master.opt -> mysql-test/t/concurrent_innodb-master.opt BitKeeper/deleted/.del-index_merge.result: Delete: mysql-test/r/index_merge.result BitKeeper/deleted/.del-index_merge_innodb.result: Delete: mysql-test/r/index_merge_innodb.result BitKeeper/deleted/.del-index_merge_innodb2.result: Delete: mysql-test/r/index_merge_innodb2.result BitKeeper/deleted/.del-index_merge_ror.result: Delete: mysql-test/r/index_merge_ror.result BitKeeper/deleted/.del-index_merge_ror_cpk.result: Delete: mysql-test/r/index_merge_ror_cpk.result mysql-test/r/index_merge_innodb.result: BitKeeper file /home/matthias/Arbeit/mysql-5.1-engines/src-1/mysql-test/r/index_merge_innodb.result mysql-test/t/index_merge_innodb.test: BitKeeper file /home/matthias/Arbeit/mysql-5.1-engines/src-1/mysql-test/t/index_merge_innodb.test mysql-test/t/index_merge_myisam.test: BitKeeper file /home/matthias/Arbeit/mysql-5.1-engines/src-1/mysql-test/t/index_merge_myisam.test mysql-test/include/concurrent.inc: 1. This file contains now the main testing code of the former t/innodb_concurrent.test. 2. It is now sourced by t/concurrent_innodb.test. mysql-test/include/deadlock.inc: 1. This file contains now the main testing code of the former t/innodb-deadlock.test 2. It is now sourced by t/deadlock_innodb.test. mysql-test/include/handler.inc: 1. This file contains now the main testing code of the former t/innodb_handler.test + t/handler.test. 2. It is now sourced by t/handler_myisam.test and t/handler_innodb.test. mysql-test/include/index_merge1.inc: 1. This file contains now the main testing code of the former t/index_merge.test. 2. It is now sourced by t/index_merge_myisam.test. mysql-test/include/index_merge2.inc: 1. This file contains now the main code of t/index_merge_innodb.test. 2. It is sourced by t/index_merge_myisam.test and t/index_merge_innodb.test. mysql-test/include/index_merge_2sweeps.inc: 1. This file contains now the main code of the former t/index_merge_innodb2.test. 2. It is sourced by t/index_merge_myisam.test and t/index_merge_innodb.test. mysql-test/include/index_merge_ror.inc: 1. This file contains now the main code of the former t/index_merge_ror.test. 2. It is sourced by t/index_merge_myisam.test. mysql-test/include/index_merge_ror_cpk.inc: 1. This file contains now the main testing code of the former t/index_merge_ror_cpk.test. 2. It is now sourced by t/index_merge_myisam.test and t/index_merge_innodb.test. mysql-test/include/mix1.inc: 1. This file contains now the main testing code of the t/innodb_mysql.test 2. The name mix1.inc was used because the test contains subtests for different fields. 3. It is sourced by t/innodb_mysql.test. 4. Fixes: - Assign $other_engine_type instead of hardcoded MyISAM. - improve comment - remove redundant subtest - analyze table t4 instead of wrong table t1 - remove not needed "eval set storage_engine = $engine_type;" mysql-test/include/mix2.inc: 1. This file is a copy of the main testing code of the t/innodb.test A copy has to be used, because t/innodb.test is to be maintained by INNOBASE only. 2. The name mix2.inc was used because the test contains subtests for different fields. 3. It is sourced by t/mix2_myisam.test. 4. Fixes: - improved comment - additional "eval SET SESSION STORAGE_ENGINE = $other_engine_type;" at beginning of tests - assign $other_engine_type instead of hardcoded MyISAM or HEAP - assign $other_engine_type where it is needed to preserve test logics - correct logical bugs - improve(extend) "checksum table" test mysql-test/include/query_cache.inc: 1. This file contains now the main testing code of the former t/innodb_cache.test. 2. It is now sourced by t/cache_innodb.test mysql-test/include/read_many_rows.inc: 1. This file contains now the main testing code of the former t/innodb_big.test. 2. It is now sourced by t/read_many_rows_innodb.test. mysql-test/include/rowid_order.inc: 1. This file contains now the main testing code of t/rowid_order_innodb.test. 2. It is now sourced by t/rowid_order_innodb.test. mysql-test/include/unsafe_binlog.inc: 1. This file contains now the main testing code of the former t/innodb_unsafe_binlog.test. 2. It is now sourced by t/unsafe_binlog_innodb.test. mysql-test/r/cache_innodb.result: Updated result mysql-test/r/concurrent_innodb.result: Updated result mysql-test/r/deadlock_innodb.result: Updated result mysql-test/r/handler_innodb.result: Updated result mysql-test/r/handler_myisam.result: Updated result mysql-test/r/index_merge_myisam.result: Updated result mysql-test/r/innodb_mysql.result: Updated result mysql-test/r/mix2_myisam.result: Updated result mysql-test/r/rowid_order_innodb.result: Updated result mysql-test/r/unsafe_binlog_innodb.result: Updated result mysql-test/t/cache_innodb.test: 1. Renaming of t/innodb_cache.test to t/cache_innodb.test 2. Main code is now sourced from include/query_cache.inc. mysql-test/t/concurrent_innodb.test: 1. Renaming of t/innodb_concurrent.test to t/concurrent_innodb.test 2. Main code is now sourced from include/concurrent.inc. Attention: This test fails even in the old version. (BUG#21579). --> added to t/disabled.def mysql-test/t/deadlock_innodb.test: 1. Renaming of t/innodb_deadlock.test to t/deadlock_innodb.test 2. Main code is now sourced from include/deadlock.inc. mysql-test/t/disabled.def: Add the test concurrent_innodb because of BUG#21579 2006-08-11 mleich innodb_concurrent random failures with varying differences mysql-test/t/handler_innodb.test: 1. Renaming of t/innodb_handler.test to t/handler_innodb.test 2. Main code is now sourced from include/handler.inc. include/handler.inc = united code of former t/handler.test and t/innodb_handler.test mysql-test/t/handler_myisam.test: 1. Renaming of t/handler.test to t/handler_myisam.test 2. Main code is now sourced from include/handler.inc. include/handler.inc = united code of former t/handler.test and t/handler_innodb.test. mysql-test/t/innodb_mysql.test: 1. Main code is now sourced from include/mix1.inc. 2. Test was not renamed because t/innodb.test refers to it. mysql-test/t/mix2_myisam.test: New test: MyISAM variant of mix2 ( = t/innodb.test) mysql-test/t/read_many_rows_innodb.test: 1. Renaming of t/innodb_big.test to t/read_many_rows_innodb.test 2. Main code is now sourced from include/read_many_rows.inc. mysql-test/t/rowid_order_innodb.test: Main code is now sourced from t/rowid_order.inc. mysql-test/t/unsafe_binlog_innodb.test: 1. Renaming of t/innodb_unsafe_binlog.test to t/unsafe_binlog_innodb.test 2. Main code is now sourced from include/unsafe_binlog.inc.
Diffstat (limited to 'mysql-test/include/concurrent.inc')
-rw-r--r--mysql-test/include/concurrent.inc357
1 files changed, 357 insertions, 0 deletions
diff --git a/mysql-test/include/concurrent.inc b/mysql-test/include/concurrent.inc
new file mode 100644
index 00000000000..7eee50c52e6
--- /dev/null
+++ b/mysql-test/include/concurrent.inc
@@ -0,0 +1,357 @@
+# include/concurrent.inc
+#
+# Concurrent tests for transactional storage engines, mainly in UPDATE's
+# Bug#3300
+# Designed and tested by Sinisa Milivojevic, sinisa@mysql.com
+#
+# two non-interfering UPDATE's not changing result set
+#
+# The variable
+# $engine_type -- storage engine to be tested
+# has to be set before sourcing this script.
+#
+# Last update:
+# 2006-08-02 ML test refactored
+# old name was t/innodb_concurrent.test
+# main code went into include/concurrent.inc
+#
+
+connection default;
+eval SET SESSION STORAGE_ENGINE = $engine_type;
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1(eta int(11) not null, tipo int(11), c varchar(255));
+connect (thread1, localhost, mysqltest,,);
+connection thread1;
+eval SET SESSION STORAGE_ENGINE = $engine_type;
+insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
+insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
+insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
+insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
+insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
+insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
+insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
+insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
+insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
+insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
+select get_lock("hello",1);
+connect (thread2, localhost, mysqltest,,);
+connection thread2;
+begin;
+send update t1 set eta=1+get_lock("hello",1)*0 where tipo=11;
+sleep 1;
+connection thread1;
+begin;
+update t1 set eta=2 where tipo=22;
+select release_lock("hello");
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+send commit;
+connection thread1;
+select * from t1;
+commit;
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+connection thread1;
+select * from t1;
+connection default;
+drop table t1;
+
+#
+# two UPDATE's running and one changing result set
+#
+#connect (thread1, localhost, mysqltest,,);
+connection thread1;
+create table t1(eta int(11) not null, tipo int(11), c varchar(255));
+insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
+insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
+insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
+insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
+insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
+insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
+insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
+insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
+insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
+insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
+select get_lock("hello",10);
+#connect (thread2, localhost, mysqltest,,);
+connection thread2;
+begin;
+send update t1 set eta=1+get_lock("hello",10)*0 where tipo=1;
+sleep 1;
+connection thread1;
+begin;
+update t1 set tipo=1 where tipo=2;
+select release_lock("hello");
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+send commit;
+connection thread1;
+select * from t1;
+commit;
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+connection thread1;
+select * from t1;
+connection default;
+drop table t1;
+
+
+#
+# One UPDATE and one INSERT .... Monty's test
+#
+
+#connect (thread1, localhost, mysqltest,,);
+connection thread1;
+create table t1 (a int not null, b int not null);
+insert into t1 values (1,1),(2,1),(3,1),(4,1);
+select get_lock("hello2",1000);
+#connect (thread2, localhost, mysqltest,,);
+connection thread2;
+begin;
+send update t1 set b=10+get_lock(concat("hello",a),1000)*0 where
+a=2;
+sleep 1;
+connection thread1;
+insert into t1 values (1,1);
+select release_lock("hello2");
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+send commit;
+connection thread1;
+sleep 1;
+connection thread2;
+reap;
+connection default;
+drop table t1;
+
+#
+# one UPDATE changing result set and SELECT ... FOR UPDATE
+#
+#connect (thread1, localhost, mysqltest,,);
+connection thread1;
+create table t1(eta int(11) not null, tipo int(11), c varchar(255));
+insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
+insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
+insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
+insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
+insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
+insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
+insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
+insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
+insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
+insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
+select get_lock("hello",10);
+#connect (thread2, localhost, mysqltest,,);
+connection thread2;
+begin;
+send select * from t1 where tipo=2 FOR UPDATE;
+sleep 1;
+connection thread1;
+begin;
+select release_lock("hello");
+--error 1205
+update t1 set tipo=1+get_lock("hello",10)*0 where tipo=2;
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+send commit;
+connection thread1;
+commit;
+connection thread2;
+reap;
+select * from t1;
+connection thread1;
+select * from t1;
+connection default;
+drop table t1;
+
+#
+# one UPDATE not changing result set and SELECT ... FOR UPDATE
+#
+#connect (thread1, localhost, mysqltest,,);
+connection thread1;
+create table t1(eta int(11) not null, tipo int(11), c varchar(255));
+insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
+insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
+insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
+insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
+insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
+insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
+insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
+insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
+insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
+insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
+select get_lock("hello",10);
+#connect (thread2, localhost, mysqltest,,);
+connection thread2;
+begin;
+send select * from t1 where tipo=2 FOR UPDATE;
+sleep 1;
+connection thread1;
+begin;
+select release_lock("hello");
+--error 1205
+update t1 set tipo=11+get_lock("hello",10)*0 where tipo=22;
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+send commit;
+connection thread1;
+commit;
+connection thread2;
+reap;
+select * from t1;
+connection thread1;
+select * from t1;
+connection default;
+drop table t1;
+
+#
+# two SELECT ... FOR UPDATE
+#
+#connect (thread1, localhost, mysqltest,,);
+connection thread1;
+create table t1(eta int(11) not null, tipo int(11), c varchar(255));
+insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
+insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
+insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
+insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
+insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
+insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
+insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
+insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
+insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
+insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
+select get_lock("hello",10);
+#connect (thread2, localhost, mysqltest,,);
+connection thread2;
+begin;
+send select * from t1 where tipo=2 FOR UPDATE;
+sleep 1;
+connection thread1;
+begin;
+select release_lock("hello");
+--error 1205
+select * from t1 where tipo=1 FOR UPDATE;
+connection thread2;
+reap;
+select * from t1;
+send commit;
+connection thread1;
+commit;
+connection thread2;
+reap;
+select * from t1;
+connection thread1;
+select * from t1;
+connection default;
+drop table t1;
+
+
+#
+# one UPDATE changing result set and DELETE
+#
+#connect (thread1, localhost, mysqltest,,);
+connection thread1;
+create table t1(eta int(11) not null, tipo int(11), c varchar(255));
+insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
+insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
+insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
+insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
+insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
+insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
+insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
+insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
+insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
+insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
+select get_lock("hello",10);
+#connect (thread2, localhost, mysqltest,,);
+connection thread2;
+begin;
+send delete from t1 where tipo=2;
+sleep 1;
+connection thread1;
+begin;
+select release_lock("hello");
+--error 1205
+update t1 set tipo=1+get_lock("hello",10)*0 where tipo=2;
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+send commit;
+connection thread1;
+commit;
+connection thread2;
+reap;
+select * from t1;
+connection thread1;
+select * from t1;
+connection default;
+drop table t1;
+
+
+#
+# one UPDATE not changing result set and DELETE
+#
+#connect (thread1, localhost, mysqltest,,);
+connection thread1;
+create table t1(eta int(11) not null, tipo int(11), c varchar(255));
+insert into t1 values (7,7, "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa");
+insert into t1 values (8,8, "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb");
+insert into t1 values (10,1,"ccccccccccccccccccccccccccccccccccccccccccc");
+insert into t1 values (20,2,"ddddddddddddddddddddddddddddddddddddddddddd");
+insert into t1 values (30,1,"eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee");
+insert into t1 values (40,2,"fffffffffffffffffffffffffffffffffffffffffff");
+insert into t1 values (50,1,"ggggggggggggggggggggggggggggggggggggggggggg");
+insert into t1 values (60,2,"hhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhhh");
+insert into t1 values (70,1,"iiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiiii");
+insert into t1 values (80,22,"jjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjjj");
+insert into t1 values (90,11,"kkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkkk");
+select get_lock("hello",10);
+#connect (thread2, localhost, mysqltest,,);
+connection thread2;
+begin;
+send delete from t1 where tipo=2;
+sleep 1;
+connection thread1;
+begin;
+select release_lock("hello");
+update t1 set tipo=1+get_lock("hello",10)*0 where tipo=22;
+select * from t1;
+connection thread2;
+reap;
+select * from t1;
+send commit;
+connection thread1;
+commit;
+connection thread2;
+reap;
+select * from t1;
+connection thread1;
+select * from t1;
+connection default;
+sleep 1;
+drop table t1;
+disconnect thread1;
+disconnect thread2;