mirror of
https://github.com/MariaDB/server.git
synced 2025-08-07 00:04:31 +03:00
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.
This commit is contained in:
@@ -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 */
|
||||
|
Reference in New Issue
Block a user