summaryrefslogtreecommitdiff
path: root/mysql-test/t/delayed.test
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-12-03 23:08:27 +0300
committerKonstantin Osipov <kostja@sun.com>2009-12-03 23:08:27 +0300
commitcd155be564a6e42c3a08781ba0d30458e241cdf0 (patch)
tree6434d16875915e179a140a010c01bc095562ddc8 /mysql-test/t/delayed.test
parentf9f2bd193f934c8e2904688335f5103472391b1b (diff)
downloadmariadb-git-cd155be564a6e42c3a08781ba0d30458e241cdf0.tar.gz
Backport of:
------------------------------------------------------------ revno: 3035.4.1 committer: Davi Arnaut <Davi.Arnaut@Sun.COM> branch nick: 39897-6.0 timestamp: Thu 2009-01-15 12:17:57 -0200 message: Bug#39897: lock_multi fails in pushbuild: timeout waiting for processlist The problem is that relying on the "Table lock" thread state in its current position to detect that a thread is waiting on a lock is race prone. The "Table lock" state change happens before the thread actually tries to grab a lock on a table. The solution is to move the "Table lock" state so that its set only when a thread is actually going to wait for a lock. The state change happens after the thread fails to grab the lock (because it is owned by other thread) and proceeds to wait on a condition. This is considered part of work related to WL#4284 "Transactional DDL locking" Warning: this patch contains an incompatible change. When waiting on a lock in thr_lock.c, the server used to display "Locked" processlist state. After this patch, the state is "Table lock". The new state was actually intended to be display since year 2002, when Monty added it. But up until removal of thd->locked boolean member, this state was ignored by SHOW PROCESSLIST code. mysql-test/r/lock_multi.result: A style fix. mysql-test/r/sp-threads.result: Changed output of SHOW PROCESSLIST (new wait state). mysql-test/t/lock_multi.test: Use a more accurate state description when waiting inside thr_lock.c. mysql-test/t/lock_sync.test: Use a more accurate state description when waiting inside thr_lock.c. mysql-test/t/multi_update.test: Use a more accurate state description when waiting inside thr_lock.c. mysql-test/t/query_cache_28249.test: Use a more accurate state description when waiting inside thr_lock.c. mysql-test/t/sp_notembedded.test: Use a more accurate state description when waiting inside thr_lock.c. mysql-test/t/status.test: Use a more accurate state description when waiting inside thr_lock.c. mysys/thr_lock.c: Update thread state while waiting for a table lock. sql/lock.cc: State change was moved inside thr_lock.c.
Diffstat (limited to 'mysql-test/t/delayed.test')
-rw-r--r--mysql-test/t/delayed.test2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/t/delayed.test b/mysql-test/t/delayed.test
index ee658d70d16..86311784b6a 100644
--- a/mysql-test/t/delayed.test
+++ b/mysql-test/t/delayed.test
@@ -307,7 +307,7 @@ connection update;
connection default;
let $wait_condition=
select count(*) = 1 from information_schema.processlist
- where command = "Delayed insert" and state = "upgrading lock";
+ where command = "Delayed insert" and state = "Table lock";
--source include/wait_condition.inc
connect (select,localhost,root,,);
--echo connection: select