diff options
author | Michael Widenius <monty@askmonty.org> | 2011-06-06 19:37:33 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-06-06 19:37:33 +0300 |
commit | 29af1aefe914da6aca73498c077f7e37a36d7de4 (patch) | |
tree | f2a7b142440d43b85e87daf4eb475ebca20e17a3 /mysql-test | |
parent | 7e04f7c8fb4954ce47f5520bce59c4c432ceb3cd (diff) | |
parent | 6ae42b75b894b5c8a338536861601f2d6d3db686 (diff) | |
download | mariadb-git-29af1aefe914da6aca73498c077f7e37a36d7de4.tar.gz |
Merge with 5.2 to get bug fixes for thr_lock
Diffstat (limited to 'mysql-test')
-rwxr-xr-x | mysql-test/mysql-test-run.pl | 2 | ||||
-rw-r--r-- | mysql-test/r/lock.result | 10 | ||||
-rw-r--r-- | mysql-test/t/lock.test | 25 |
3 files changed, 36 insertions, 1 deletions
diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 542f1ca9660..e2b2a3c2262 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -4397,7 +4397,7 @@ sub extract_warning_lines ($$) { my @patterns = ( - qr/^Warning:|mysqld: Warning|\[Warning\]/, + qr/^Warning|mysqld: Warning|\[Warning\]/, qr/^Error:|\[ERROR\]/, qr/^==\d+==\s+\S/, # valgrind errors qr/InnoDB: Warning|InnoDB: Error/, diff --git a/mysql-test/r/lock.result b/mysql-test/r/lock.result index 7ec07fb5273..1828a5f11e0 100644 --- a/mysql-test/r/lock.result +++ b/mysql-test/r/lock.result @@ -194,3 +194,13 @@ ERROR HY000: Table 't2' was locked with a READ lock and can't be updated UNLOCK TABLES; DROP TABLE t1,t2; End of 5.1 tests. +create table t1 (a int) engine=myisam; +lock tables t1 write concurrent, t1 as t2 read; +lock tables t1 read local; +unlock tables; +unlock tables; +lock tables t1 read local; +lock tables t1 write concurrent, t1 as t2 read; +unlock tables; +unlock tables; +drop table t1; diff --git a/mysql-test/t/lock.test b/mysql-test/t/lock.test index 30f4d4d6c61..fdacb9c57d4 100644 --- a/mysql-test/t/lock.test +++ b/mysql-test/t/lock.test @@ -245,3 +245,28 @@ UNLOCK TABLES; DROP TABLE t1,t2; --echo End of 5.1 tests. + +# +# Test concurrent lock and read locks +# This gave a warning: +# Warning at 'read lock with old write lock' for lock: 5: +# Found lock of type 8 that is write and read locked. Read_no_write_count: 1 +# +create table t1 (a int) engine=myisam; +lock tables t1 write concurrent, t1 as t2 read; +connect (con1,localhost,root,,); +connection con1; +lock tables t1 read local; +unlock tables; +connection default; +unlock tables; +connection con1; +lock tables t1 read local; +connection default; +lock tables t1 write concurrent, t1 as t2 read; +unlock tables; +connection con1; +unlock tables; +disconnect con1; +connection default; +drop table t1; |