From 3446199d8e421da02a5546f439ee76b368594700 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 4 Mar 2003 12:22:35 +0200 Subject: Fixed bug in LOCK TABLE + DROP TABLE when other thread was waiting for a table that was locked bug not droped client/mysqltest.c: Fixed bug that comments did a ping include/thr_lock.h: Added function to abort a lock for a specific thread mysql-test/mysql-test-run.sh: Fixed where mysqltest traces are put mysql-test/r/lock_multi.result: Test for LOCK TABLE + DROP TABLE bug mysql-test/t/lock_multi.test: Test for LOCK TABLE + DROP TABLE bug mysys/thr_lock.c: Added function to abort a lock for a specific thread sql/handler.cc: Indentation cleanup sql/lock.cc: Added function to abort a lock for a specific thread sql/mysql_priv.h: Added function to abort a lock for a specific thread sql/mysqld.cc: Use automatic recover even with --safe --- mysql-test/t/lock_multi.test | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) (limited to 'mysql-test/t/lock_multi.test') diff --git a/mysql-test/t/lock_multi.test b/mysql-test/t/lock_multi.test index 792ae956e2a..0295fca29e7 100644 --- a/mysql-test/t/lock_multi.test +++ b/mysql-test/t/lock_multi.test @@ -6,8 +6,9 @@ # -- source include/not_embedded.inc -drop table if exists t1; -#test to see if select will get the lock ahead of low priority update +drop table if exists t1,t2; + +# test to see if select will get the lock ahead of low priority update connect (locker,localhost,root,,); connect (reader,localhost,root,,); @@ -48,3 +49,22 @@ reap; connection reader; reap; drop table t1; + +# +# Test problem when using locks on many tables and droping a table that +# is to-be-locked by another thread +# + +connection locker; +create table t1 (a int); +create table t2 (a int); +lock table t1 write, t2 write; +connection reader; +send insert t1 select * from t2; +connection locker; +drop table t2; +connection reader; +--error 1146 +reap; +connection locker; +drop table t1; -- cgit v1.2.1