Skip to content

Commit

Permalink
fts_doc_ids_free(): Define inline
Browse files Browse the repository at this point in the history
  • Loading branch information
dr-m committed May 13, 2019
1 parent 7f72110 commit c7c54ce
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 48 deletions.
16 changes: 0 additions & 16 deletions storage/innobase/fts/fts0fts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2889,22 +2889,6 @@ fts_doc_ids_create(void)
return(fts_doc_ids);
}

/*********************************************************************//**
Free a fts_doc_ids_t. */

void
fts_doc_ids_free(
/*=============*/
fts_doc_ids_t* fts_doc_ids)
{
mem_heap_t* heap = static_cast<mem_heap_t*>(
fts_doc_ids->self_heap->arg);

memset(fts_doc_ids, 0, sizeof(*fts_doc_ids));

mem_heap_free(heap);
}

/*********************************************************************//**
Do commit-phase steps necessary for the insertion of a new row. */
void
Expand Down
14 changes: 6 additions & 8 deletions storage/innobase/include/fts0fts.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 2017, MariaDB Corporation.
Copyright (c) 2016, 2019, 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
Expand Down Expand Up @@ -429,13 +429,11 @@ fts_doc_ids_t*
fts_doc_ids_create(void);
/*=====================*/

/******************************************************************//**
Free a fts_doc_ids_t. */
UNIV_INTERN
void
fts_doc_ids_free(
/*=============*/
fts_doc_ids_t* doc_ids); /*!< in: doc_ids to free */
/** Free fts_doc_ids_t */
inline void fts_doc_ids_free(fts_doc_ids_t* doc_ids)
{
mem_heap_free(static_cast<mem_heap_t*>(doc_ids->self_heap->arg));
}

/******************************************************************//**
Notify the FTS system about an operation on an FTS-indexed table. */
Expand Down
16 changes: 0 additions & 16 deletions storage/xtradb/fts/fts0fts.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2889,22 +2889,6 @@ fts_doc_ids_create(void)
return(fts_doc_ids);
}

/*********************************************************************//**
Free a fts_doc_ids_t. */

void
fts_doc_ids_free(
/*=============*/
fts_doc_ids_t* fts_doc_ids)
{
mem_heap_t* heap = static_cast<mem_heap_t*>(
fts_doc_ids->self_heap->arg);

memset(fts_doc_ids, 0, sizeof(*fts_doc_ids));

mem_heap_free(heap);
}

/*********************************************************************//**
Do commit-phase steps necessary for the insertion of a new row. */
void
Expand Down
14 changes: 6 additions & 8 deletions storage/xtradb/include/fts0fts.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2018, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2016, 2017, MariaDB Corporation.
Copyright (c) 2016, 2019, 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
Expand Down Expand Up @@ -429,13 +429,11 @@ fts_doc_ids_t*
fts_doc_ids_create(void);
/*=====================*/

/******************************************************************//**
Free a fts_doc_ids_t. */
UNIV_INTERN
void
fts_doc_ids_free(
/*=============*/
fts_doc_ids_t* doc_ids); /*!< in: doc_ids to free */
/** Free fts_doc_ids_t */
inline void fts_doc_ids_free(fts_doc_ids_t* doc_ids)
{
mem_heap_free(static_cast<mem_heap_t*>(doc_ids->self_heap->arg));
}

/******************************************************************//**
Notify the FTS system about an operation on an FTS-indexed table. */
Expand Down

0 comments on commit c7c54ce

Please sign in to comment.