diff options
author | Inaam Rana <inaam.rana@oracle.com> | 2011-06-17 16:29:19 -0400 |
---|---|---|
committer | Inaam Rana <inaam.rana@oracle.com> | 2011-06-17 16:29:19 -0400 |
commit | 9df4c14354e73455f0e0057f92b9870369f05d43 (patch) | |
tree | 9dfacef18594f6ea42140d5615eb0e57327344d2 /storage/innobase/include/buf0buf.ic | |
parent | ce7b4f6d6518d5ad7b66e6cd74d34c467d5d6b50 (diff) | |
download | mariadb-git-9df4c14354e73455f0e0057f92b9870369f05d43.tar.gz |
merge from mysql-5.1
Bug 12635227 - 61188: DROP TABLE EXTREMELY SLOW
Diffstat (limited to 'storage/innobase/include/buf0buf.ic')
-rw-r--r-- | storage/innobase/include/buf0buf.ic | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/storage/innobase/include/buf0buf.ic b/storage/innobase/include/buf0buf.ic index 52772d351a1..4fdaf6ff43e 100644 --- a/storage/innobase/include/buf0buf.ic +++ b/storage/innobase/include/buf0buf.ic @@ -754,6 +754,35 @@ buf_block_get_lock_hash_val( } /********************************************************************//** +Allocates a buf_page_t descriptor. This function must succeed. In case +of failure we assert in this function. +@return: the allocated descriptor. */ +UNIV_INLINE +buf_page_t* +buf_page_alloc_descriptor(void) +/*===========================*/ +{ + buf_page_t* bpage; + + bpage = (buf_page_t*) ut_malloc(sizeof *bpage); + ut_d(memset(bpage, 0, sizeof *bpage)); + UNIV_MEM_ALLOC(bpage, sizeof *bpage); + + return(bpage); +} + +/********************************************************************//** +Free a buf_page_t descriptor. */ +UNIV_INLINE +void +buf_page_free_descriptor( +/*=====================*/ + buf_page_t* bpage) /*!< in: bpage descriptor to free. */ +{ + ut_free(bpage); +} + +/********************************************************************//** Frees a buffer block which does not contain a file page. */ UNIV_INLINE void |