diff options
author | Sergei Golubchik <serg@mariadb.org> | 2015-06-16 12:46:14 +0200 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2015-06-16 12:46:14 +0200 |
commit | 9859d366b5dede25308b562c24316c44a6474275 (patch) | |
tree | 0b39ae57f5bf3f4f69c070d65d0db6e7b14c407c /storage/xtradb/dict/dict0mem.cc | |
parent | a65162a396b1c298687992dd62ece924978b4c29 (diff) | |
parent | 90849456d794aa6df32554a588da5db8cb15f5aa (diff) | |
download | mariadb-git-9859d366b5dede25308b562c24316c44a6474275.tar.gz |
Merge branch 'merge-xtradb-5.6' into 10.0
Diffstat (limited to 'storage/xtradb/dict/dict0mem.cc')
-rw-r--r-- | storage/xtradb/dict/dict0mem.cc | 31 |
1 files changed, 8 insertions, 23 deletions
diff --git a/storage/xtradb/dict/dict0mem.cc b/storage/xtradb/dict/dict0mem.cc index 5788818a6c3..c23a3637632 100644 --- a/storage/xtradb/dict/dict0mem.cc +++ b/storage/xtradb/dict/dict0mem.cc @@ -1,6 +1,6 @@ /***************************************************************************** -Copyright (c) 1996, 2014, Oracle and/or its affiliates. All Rights Reserved. +Copyright (c) 1996, 2015, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. This program is free software; you can redistribute it and/or modify it under @@ -79,10 +79,7 @@ dict_mem_table_create( the table is placed */ ulint n_cols, /*!< in: number of columns */ ulint flags, /*!< in: table flags */ - ulint flags2, /*!< in: table flags2 */ - bool nonshared)/*!< in: whether the table object is a dummy - one that does not need the initialization of - locking-related fields. */ + ulint flags2) /*!< in: table flags2 */ { dict_table_t* table; mem_heap_t* heap; @@ -118,18 +115,10 @@ dict_mem_table_create( dict_table_stats_latch_create(table, true); #ifndef UNIV_HOTBACKUP + table->autoinc_lock = static_cast<ib_lock_t*>( + mem_heap_alloc(heap, lock_get_size())); - if (!nonshared) { - - table->autoinc_lock = static_cast<ib_lock_t*>( - mem_heap_alloc(heap, lock_get_size())); - - mutex_create(autoinc_mutex_key, - &table->autoinc_mutex, SYNC_DICT_AUTOINC_MUTEX); - } else { - - table->autoinc_lock = NULL; - } + dict_table_autoinc_create_lazy(table); table->autoinc = 0; @@ -212,10 +201,7 @@ dict_mem_table_free( } } #ifndef UNIV_HOTBACKUP - if (table->autoinc_lock) { - - mutex_free(&(table->autoinc_mutex)); - } + dict_table_autoinc_destroy(table); #endif /* UNIV_HOTBACKUP */ dict_table_stats_latch_destroy(table); @@ -580,8 +566,7 @@ dict_mem_index_create( dict_mem_fill_index_struct(index, heap, table_name, index_name, space, type, n_fields); - os_fast_mutex_init(zip_pad_mutex_key, &index->zip_pad.mutex); - + dict_index_zip_pad_mutex_create_lazy(index); return(index); } @@ -714,7 +699,7 @@ dict_mem_index_free( } #endif /* UNIV_BLOB_DEBUG */ - os_fast_mutex_free(&index->zip_pad.mutex); + dict_index_zip_pad_mutex_destroy(index); mem_heap_free(index->heap); } |