summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@hundin.mysql.fi>2001-07-18 23:35:13 +0300
committerunknown <monty@hundin.mysql.fi>2001-07-18 23:35:13 +0300
commitdece009c8b84f6ee60cf43e32931debc361b932c (patch)
tree7798d5c139a8e5ef5f6ee62e2140ff83f9ef3418
parent76eaa2595f785d2664bc0165cf8431c79ed92659 (diff)
parent0e66a78a4deda14424dc2585caaba201c7fa573b (diff)
downloadmariadb-git-dece009c8b84f6ee60cf43e32931debc361b932c.tar.gz
Merge
Docs/manual.texi: SCCS merged
-rw-r--r--Docs/manual.texi4
-rw-r--r--include/thr_lock.h1
-rw-r--r--mysys/thr_lock.c9
-rw-r--r--sql/mysqld.cc1
-rw-r--r--sql/sql_insert.cc1
5 files changed, 11 insertions, 5 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi
index 1d3fae2f785..551db373ae0 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -24702,7 +24702,7 @@ The meanings of the configuration parameters are the following:
@multitable @columnfractions .30 .70
@item @code{innodb_data_home_dir} @tab
-The common part of the directory path for all innobase data files.
+The common part of the directory path for all InnoDB data files.
@item @code{innodb_data_file_path} @tab
Paths to individual data files and their sizes. The full directory path
to each data file is acquired by concatenating innodb_data_home_dir to
@@ -45731,6 +45731,8 @@ not yet 100% confident in this code.
@appendixsubsec Changes in release 3.23.40
@itemize @bullet
@item
+Fixed problem with @code{--low-priority-updates} and @code{INSERT}'s.
+@item
Fixed bug in slave thread when under some rare circumstances it could
get 22 bytes ahead on the offset in the master
@item
diff --git a/include/thr_lock.h b/include/thr_lock.h
index 42bcd9bcaba..6dd59f80e64 100644
--- a/include/thr_lock.h
+++ b/include/thr_lock.h
@@ -65,6 +65,7 @@ enum thr_lock_type { TL_IGNORE=-1,
extern ulong max_write_lock_count;
extern my_bool thr_lock_inited;
+extern enum thr_lock_type thr_upgraded_concurrent_insert_lock;
typedef struct st_thr_lock_data {
pthread_t thread;
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 */
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 422d27ec624..5d4339d3ca6 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -3563,6 +3563,7 @@ static void get_options(int argc,char **argv)
break;
case OPT_LOW_PRIORITY_UPDATES:
thd_startup_options|=OPTION_LOW_PRIORITY_UPDATES;
+ thr_upgraded_concurrent_insert_lock= TL_WRITE_LOW_PRIORITY;
low_priority_updates=1;
break;
case OPT_BOOTSTRAP:
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc
index 14f4a732eac..50e4a6dedd4 100644
--- a/sql/sql_insert.cc
+++ b/sql/sql_insert.cc
@@ -871,6 +871,7 @@ static pthread_handler_decl(handle_delayed_insert,arg)
/* Add thread to THD list so that's it's visible in 'show processlist' */
pthread_mutex_lock(&LOCK_thread_count);
thd->thread_id=thread_id++;
+ thd->end_time();
threads.append(thd);
pthread_mutex_unlock(&LOCK_thread_count);