diff options
author | Marc Alff <marc.alff@sun.com> | 2010-01-11 18:47:27 -0700 |
---|---|---|
committer | Marc Alff <marc.alff@sun.com> | 2010-01-11 18:47:27 -0700 |
commit | 67a48e1a4cfd73875e54f9416afa7328d676d7bd (patch) | |
tree | c111d4c62b1e1eb7a74ec68860756418e29cb61e /sql/sql_insert.cc | |
parent | a4c3bc618bb83884a19dc157bc56d4e3d2432c22 (diff) | |
download | mariadb-git-67a48e1a4cfd73875e54f9416afa7328d676d7bd.tar.gz |
WL#2360 Performance schema
Part V: performance schema implementation
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index c774cb4f3ad..748052b2985 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -1808,11 +1808,11 @@ public: mysql_mutex_init(key_delayed_insert_mutex, &mutex, MY_MUTEX_INIT_FAST); mysql_cond_init(key_delayed_insert_cond, &cond, NULL); mysql_cond_init(key_delayed_insert_cond_client, &cond_client, NULL); - pthread_mutex_lock(&LOCK_thread_count); + mysql_mutex_lock(&LOCK_thread_count); delayed_insert_threads++; delayed_lock= global_system_variables.low_priority_updates ? TL_WRITE_LOW_PRIORITY : TL_WRITE; - pthread_mutex_unlock(&LOCK_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); } ~Delayed_insert() { @@ -1822,7 +1822,7 @@ public: delete row; if (table) close_thread_tables(&thd); - pthread_mutex_lock(&LOCK_thread_count); + mysql_mutex_lock(&LOCK_thread_count); mysql_mutex_destroy(&mutex); mysql_cond_destroy(&cond); mysql_cond_destroy(&cond_client); @@ -1831,8 +1831,8 @@ public: thd.security_ctx->user= thd.security_ctx->host=0; thread_count--; delayed_insert_threads--; - pthread_mutex_unlock(&LOCK_thread_count); - pthread_cond_broadcast(&COND_thread_count); /* Tell main we are ready */ + mysql_mutex_unlock(&LOCK_thread_count); + mysql_cond_broadcast(&COND_thread_count); /* Tell main we are ready */ } /* The following is for checking when we can delete ourselves */ @@ -1965,9 +1965,9 @@ bool delayed_get_table(THD *thd, TABLE_LIST *table_list) { if (!(di= new Delayed_insert())) goto end_create; - pthread_mutex_lock(&LOCK_thread_count); + mysql_mutex_lock(&LOCK_thread_count); thread_count++; - pthread_mutex_unlock(&LOCK_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); di->thd.set_db(table_list->db, (uint) strlen(table_list->db)); di->thd.set_query(my_strdup(table_list->table_name, MYF(MY_WME | ME_FATALERROR)), 0); @@ -2345,12 +2345,12 @@ pthread_handler_t handle_delayed_insert(void *arg) pthread_detach_this_thread(); /* Add thread to THD list so that's it's visible in 'show processlist' */ - pthread_mutex_lock(&LOCK_thread_count); + mysql_mutex_lock(&LOCK_thread_count); thd->thread_id= thd->variables.pseudo_thread_id= thread_id++; thd->set_current_time(); threads.append(thd); thd->killed=abort_loop ? THD::KILL_CONNECTION : THD::NOT_KILLED; - pthread_mutex_unlock(&LOCK_thread_count); + mysql_mutex_unlock(&LOCK_thread_count); mysql_thread_set_psi_id(thd->thread_id); |