This commit is contained in:
Vicențiu Ciorbaru 2017-10-25 21:35:33 +03:00
commit 4ef64e01a7
11 changed files with 192 additions and 42 deletions

View file

@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 2017, Oracle and/or its affiliates. All Rights Reserved.
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
@ -909,6 +909,27 @@ dict_table_x_lock_indexes(
}
}
/*********************************************************************//**
Returns true if the particular FTS index in the table is still syncing
in the background, false otherwise.
@param [in] table Table containing FTS index
@return True if sync of fts index is still going in the background */
UNIV_INLINE
bool
dict_fts_index_syncing(
dict_table_t* table)
{
dict_index_t* index;
for (index = dict_table_get_first_index(table);
index != NULL;
index = dict_table_get_next_index(index)) {
if (index->index_fts_syncing) {
return(true);
}
}
return(false);
}
/*********************************************************************//**
Release the exclusive locks on all index tree. */
UNIV_INLINE

View file

@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 1996, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 1996, 2017, 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
@ -606,6 +606,8 @@ struct dict_index_t{
dict_sys->mutex. Other changes are
protected by index->lock. */
dict_field_t* fields; /*!< array of field descriptions */
bool index_fts_syncing;/*!< Whether the fts index is
still syncing in the background */
#ifndef UNIV_HOTBACKUP
UT_LIST_NODE_T(dict_index_t)
indexes;/*!< list of indexes of the table */

View file

@ -1,6 +1,6 @@
/*****************************************************************************
Copyright (c) 2012, 2016, Oracle and/or its affiliates. All Rights Reserved.
Copyright (c) 2012, 2017, Oracle and/or its affiliates. All Rights Reserved.
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
@ -59,7 +59,7 @@ dict_stats_recalc_pool_del(
/** Yield the data dictionary latch when waiting
for the background thread to stop accessing a table.
@param trx transaction holding the data dictionary locks */
#define DICT_STATS_BG_YIELD(trx) do { \
#define DICT_BG_YIELD(trx) do { \
row_mysql_unlock_data_dictionary(trx); \
os_thread_sleep(250000); \
row_mysql_lock_data_dictionary(trx); \