diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-01-27 18:02:11 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-01-27 18:02:11 +0200 |
commit | cbb0a60c5769563461b50cefb9c7f4bffba076da (patch) | |
tree | 1241b9b0f122f17ee4f4379f30e4b0f6fae595bd /storage/innobase | |
parent | 5dd028f8ee4d1a4ce189fdaefab26ab592159b25 (diff) | |
download | mariadb-git-cbb0a60c5769563461b50cefb9c7f4bffba076da.tar.gz |
Cleanup: Remove lock_get_size()
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/dict/dict0mem.cc | 4 | ||||
-rw-r--r-- | storage/innobase/include/lock0lock.h | 6 | ||||
-rw-r--r-- | storage/innobase/lock/lock0lock.cc | 10 |
3 files changed, 2 insertions, 18 deletions
diff --git a/storage/innobase/dict/dict0mem.cc b/storage/innobase/dict/dict0mem.cc index c9d86139741..f4a56faaf28 100644 --- a/storage/innobase/dict/dict0mem.cc +++ b/storage/innobase/dict/dict0mem.cc @@ -2,7 +2,7 @@ Copyright (c) 1996, 2018, Oracle and/or its affiliates. All Rights Reserved. Copyright (c) 2012, Facebook Inc. -Copyright (c) 2013, 2020, MariaDB Corporation. +Copyright (c) 2013, 2021, MariaDB Corporation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -187,7 +187,7 @@ dict_table_t *dict_mem_table_create(const char *name, fil_space_t *space, } table->autoinc_lock = static_cast<ib_lock_t*>( - mem_heap_alloc(heap, lock_get_size())); + mem_heap_alloc(heap, sizeof *table->autoinc_lock)); /* If the table has an FTS index or we are in the process of building one, create the table->fts */ diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h index 899ea7c8ccd..79b14db0693 100644 --- a/storage/innobase/include/lock0lock.h +++ b/storage/innobase/include/lock0lock.h @@ -46,12 +46,6 @@ class ReadView; extern my_bool innobase_deadlock_detect; /*********************************************************************//** -Gets the size of a lock struct. -@return size in bytes */ -ulint -lock_get_size(void); -/*===============*/ -/*********************************************************************//** Gets the heap_no of the smallest user record on a page. @return heap_no of smallest user record, or PAGE_HEAP_NO_SUPREMUM */ UNIV_INLINE diff --git a/storage/innobase/lock/lock0lock.cc b/storage/innobase/lock/lock0lock.cc index 37e1a9781ec..a5dbf425027 100644 --- a/storage/innobase/lock/lock0lock.cc +++ b/storage/innobase/lock/lock0lock.cc @@ -445,16 +445,6 @@ void lock_sys_t::close() } /*********************************************************************//** -Gets the size of a lock struct. -@return size in bytes */ -ulint -lock_get_size(void) -/*===============*/ -{ - return((ulint) sizeof(lock_t)); -} - -/*********************************************************************//** Gets the gap flag of a record lock. @return LOCK_GAP or 0 */ UNIV_INLINE |