diff options
author | Sergei Golubchik <sergii@pisem.net> | 2013-04-15 15:09:22 +0200 |
---|---|---|
committer | Sergei Golubchik <sergii@pisem.net> | 2013-04-15 15:09:22 +0200 |
commit | a9035be5b7a7b3865ddb4ef34a5d0cfc65dfc254 (patch) | |
tree | a9df7341e91623f62fe37cd47fce139d8888fc95 /sql/sql_insert.cc | |
parent | 3a1c91d87d69ef243b3e78be6089102cafef0a8e (diff) | |
parent | f57ecb7786177e0af3b1e3ec94302720b2e0f967 (diff) | |
download | mariadb-git-a9035be5b7a7b3865ddb4ef34a5d0cfc65dfc254.tar.gz |
10.0-base merge
Diffstat (limited to 'sql/sql_insert.cc')
-rw-r--r-- | sql/sql_insert.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/sql/sql_insert.cc b/sql/sql_insert.cc index 09e4953cdc4..4f025c7c335 100644 --- a/sql/sql_insert.cc +++ b/sql/sql_insert.cc @@ -2041,9 +2041,9 @@ public: thd.unlink(); // Must be unlinked under lock my_free(thd.query()); thd.security_ctx->user= thd.security_ctx->host=0; - thread_count--; delayed_insert_threads--; mysql_mutex_unlock(&LOCK_thread_count); + thread_safe_decrement32(&thread_count, &thread_count_lock); mysql_cond_broadcast(&COND_thread_count); /* Tell main we are ready */ } @@ -2178,9 +2178,9 @@ bool delayed_get_table(THD *thd, MDL_request *grl_protection_request, { if (!(di= new Delayed_insert())) goto end_create; - mysql_mutex_lock(&LOCK_thread_count); - thread_count++; - mysql_mutex_unlock(&LOCK_thread_count); + + thread_safe_increment32(&thread_count, &thread_count_lock); + /* Annotating delayed inserts is not supported. */ @@ -3891,8 +3891,8 @@ static TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info, { if (!mysql_create_table_no_lock(thd, create_table->db, create_table->table_name, - create_info, alter_info, 0, - select_field_count, NULL)) + create_info, alter_info, NULL, + select_field_count)) { DEBUG_SYNC(thd,"create_table_select_before_open"); |