summaryrefslogtreecommitdiff
path: root/include/thr_lock.h
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2009-12-02 23:47:23 +0300
committerKonstantin Osipov <kostja@sun.com>2009-12-02 23:47:23 +0300
commit77cbfd85ee3f6969dcbe528a2f97ec12c9cf99dc (patch)
treece951be1a1212aaa9bd9c5db2ef73257ce2f1f29 /include/thr_lock.h
parent124cda8a0a783180b280935fd4b62a2b7d6dc6c4 (diff)
downloadmariadb-git-77cbfd85ee3f6969dcbe528a2f97ec12c9cf99dc.tar.gz
Backport of:
---------------------------------------------------------- revno: 2630.4.35 committer: Konstantin Osipov <konstantin@mysql.com> branch nick: mysql-6.0-3726 timestamp: Wed 2008-06-25 16:44:00 +0400 message: Fix a MyISAM-specific bug in the new implementation of LOCK TABLES (WL#3726). If more than one instance of a MyISAM table are open in the same connection, all of them must share the same status_param. Otherwise, unlock of a table may lead to lost records. See also comments in thr_lock.c. include/thr_lock.h: Declare thr_lock_merge_status(). mysql-test/r/lock.result: Update test results (WL#3726). mysql-test/t/lock.test: Add a test case for the situation when the same table is locked twice by LOCK TABLES, and only one instance is updated. mysys/thr_lock.c: Move the code that makes sure all status_params of the same table are shared into a separate function. sql/lock.cc: Make sure that status_param is shared when a table is reopened.
Diffstat (limited to 'include/thr_lock.h')
-rw-r--r--include/thr_lock.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/thr_lock.h b/include/thr_lock.h
index fb70c57c0e7..d5a7cd57ea7 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -160,6 +160,8 @@ void thr_unlock(THR_LOCK_DATA *data);
enum enum_thr_lock_result thr_multi_lock(THR_LOCK_DATA **data,
uint count, THR_LOCK_OWNER *owner);
void thr_multi_unlock(THR_LOCK_DATA **data,uint count);
+void
+thr_lock_merge_status(THR_LOCK_DATA **data, uint count);
void thr_abort_locks(THR_LOCK *lock, my_bool upgrade_lock);
my_bool thr_abort_locks_for_thread(THR_LOCK *lock, my_thread_id thread);
void thr_print_locks(void); /* For debugging */