summaryrefslogtreecommitdiff
path: root/innobase/os
diff options
context:
space:
mode:
authorheikki@donna.mysql.fi <>2001-04-10 21:58:07 +0300
committerheikki@donna.mysql.fi <>2001-04-10 21:58:07 +0300
commit4709a1721a656f175e7b27aef2c01fa3910000f8 (patch)
tree44883f89faae8a2a77423664d9b14e8cffc617dc /innobase/os
parent54b9d367f9fd32e1c57b0abd53c6299fdafad81f (diff)
downloadmariadb-git-4709a1721a656f175e7b27aef2c01fa3910000f8.tar.gz
srv0srv.h Merging work for 3.23.37
os0thread.c Set created thread priority to QUERY_PRIOR if specified row0mysql.c Drop table removes locks on the table, error handling changed row0ins.c Insert now always sets a shared lock on a duplicate or suspected duplicate record lock0lock.h Can remove locks from a table to be dropped lock0lock.c Can remove locks from a table to be dropped srv0srv.c Try to do log flush every second srv0start.c No need for a slash at the end of dir trx0trx.h Added an IGNORE option field to trx handle trx0trx.c Added an IGNORE option field to trx handle ha_innobase.h Added last_query_id field to handle ha_innobase.cc Fix drop table hang, roll-forward etc.
Diffstat (limited to 'innobase/os')
-rw-r--r--innobase/os/os0thread.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/innobase/os/os0thread.c b/innobase/os/os0thread.c
index a597af3fc4c..9185542e0aa 100644
--- a/innobase/os/os0thread.c
+++ b/innobase/os/os0thread.c
@@ -16,6 +16,8 @@ Created 9/8/1995 Heikki Tuuri
#include <windows.h>
#endif
+#include "srv0srv.h"
+
/*********************************************************************
Returns the thread identifier of current thread. */
@@ -70,6 +72,15 @@ os_thread_create(
thread_id);
ut_a(thread);
+ if (srv_set_thread_priorities) {
+
+ /* Set created thread priority the same as a normal query
+ in MYSQL: we try to prevent starvation of threads by
+ assigning same priority QUERY_PRIOR to all */
+
+ ut_a(SetThreadPriority(thread, srv_query_thread_priority));
+ }
+
return(thread);
#else
int ret;
@@ -82,6 +93,11 @@ os_thread_create(
pthread_attr_destroy(&attr);
+ if (srv_set_thread_priorities) {
+
+ my_pthread_setprio(pthread, srv_query_thread_priority);
+ }
+
return(pthread);
#endif
}