summaryrefslogtreecommitdiff
path: root/mysys
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-07-20 16:32:13 -0600
committerunknown <sasha@mysql.sashanet.com>2001-07-20 16:32:13 -0600
commitb282f4290578f0e8e387fcebcd1641337d2601eb (patch)
treeb696a6c57f5d204281f851c340f80976b08bb6f7 /mysys
parente642692a5d25d7771ecab767be9fb8b369d077da (diff)
parentb588c6064638bd9245871cd840695854c1454e8b (diff)
downloadmariadb-git-b282f4290578f0e8e387fcebcd1641337d2601eb.tar.gz
merged
configure.in: Auto merged myisam/mi_check.c: Auto merged myisam/myisamchk.c: Auto merged mysql-test/t/rpl_sporadic_master.test: Auto merged sql/Makefile.am: Auto merged sql/mysqld.cc: Auto merged sql/slave.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_delete.cc: Auto merged sql/sql_show.cc: Auto merged sql/sql_update.cc: Auto merged
Diffstat (limited to 'mysys')
-rw-r--r--mysys/thr_lock.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/mysys/thr_lock.c b/mysys/thr_lock.c
index cff4d3bbac8..7d86d0c9524 100644
--- a/mysys/thr_lock.c
+++ b/mysys/thr_lock.c
@@ -85,6 +85,7 @@ multiple read locks.
my_bool thr_lock_inited=0;
ulong locks_immediate = 0L, locks_waited = 0L;
+enum thr_lock_type thr_upgraded_concurrent_insert_lock = TL_WRITE;
/* The following constants are only for debug output */
#define MAX_THREADS 100
@@ -514,7 +515,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type)
}
}
else if (lock_type == TL_WRITE_CONCURRENT_INSERT && ! lock->check_status)
- data->type=lock_type= TL_WRITE; /* not supported */
+ data->type=lock_type= thr_upgraded_concurrent_insert_lock;
if (lock->write.data) /* If there is a write lock */
{
@@ -556,7 +557,7 @@ int thr_lock(THR_LOCK_DATA *data,enum thr_lock_type lock_type)
{ /* no scheduled write locks */
if (lock_type == TL_WRITE_CONCURRENT_INSERT &&
(*lock->check_status)(data->status_param))
- data->type=lock_type=TL_WRITE; /* Upgrade lock */
+ data->type=lock_type= thr_upgraded_concurrent_insert_lock;
if (!lock->read.data ||
(lock_type <= TL_WRITE_DELAYED &&
@@ -943,10 +944,10 @@ my_bool thr_upgrade_write_delay_lock(THR_LOCK_DATA *data)
DBUG_ENTER("thr_upgrade_write_delay_lock");
pthread_mutex_lock(&lock->mutex);
- if (data->type == TL_UNLOCK || data->type == TL_WRITE) /* Aborted */
+ if (data->type == TL_UNLOCK || data->type >= TL_WRITE_LOW_PRIORITY)
{
pthread_mutex_unlock(&lock->mutex);
- DBUG_RETURN(data->type == TL_UNLOCK);
+ DBUG_RETURN(data->type == TL_UNLOCK); /* Test if Aborted */
}
check_locks(lock,"before upgrading lock",0);
/* TODO: Upgrade to TL_WRITE_CONCURRENT_INSERT in some cases */