[Commits] b4c5059b88e: Test2 with instrumentation.
revision-id: b4c5059b88e414727f9c2952f56f54c1bb88ba79 (mariadb-10.1.35-79-gb4c5059b88e) parent(s): f91167ce9d536ced2ab53bf33a4a4e92380e0f6d author: Jan Lindström committer: Jan Lindström timestamp: 2018-10-05 11:05:21 +0300 message: Test2 with instrumentation. --- storage/innobase/fts/fts0fts.cc | 30 +++++++++++++++++++++++++++++- storage/xtradb/fts/fts0fts.cc | 30 +++++++++++++++++++++++++++++- 2 files changed, 58 insertions(+), 2 deletions(-) diff --git a/storage/innobase/fts/fts0fts.cc b/storage/innobase/fts/fts0fts.cc index fa5207c8ec7..24fac4ece50 100644 --- a/storage/innobase/fts/fts0fts.cc +++ b/storage/innobase/fts/fts0fts.cc @@ -42,6 +42,12 @@ Full Text Search interface #include "ha_prototypes.h" +#ifdef WITH_WSREP +#include <log.h> +#include <wsrep_mysqld.h> +#include <wsrep.h> +#endif + #define FTS_MAX_ID_LEN 32 /** Column name from the FTS config table */ @@ -7041,7 +7047,29 @@ fts_check_and_drop_orphaned_tables( /* If the aux table is in decimal format, we should rename it, so push it to aux_tables_to_rename */ if (!drop && rename) { - ib_vector_push(aux_tables_to_rename, aux_table); + /* It is necessary to check that the table with + this name is missing in the vector - otherwise it + can be renamed twice: */ + bool rename_table = true; + for (ulint count = 0; + count < ib_vector_size(aux_tables_to_rename); + count++) { + fts_aux_table_t* rename_aux = + static_cast<fts_aux_table_t*>( + ib_vector_get(aux_tables_to_rename, + count)); + if (strcmp(rename_aux->name, + aux_table->name) == 0) { + rename_table = false; +#ifdef WITH_WSREP + WSREP_DEBUG("JAN: Not renamed list %s rename_table %s", rename_aux->name, aux_table->name); +#endif + break; + } + } + if (rename_table) { + ib_vector_push(aux_tables_to_rename, aux_table); + } } if (i + 1 < ib_vector_size(tables)) { diff --git a/storage/xtradb/fts/fts0fts.cc b/storage/xtradb/fts/fts0fts.cc index bcbaeb22738..eaba30820e0 100644 --- a/storage/xtradb/fts/fts0fts.cc +++ b/storage/xtradb/fts/fts0fts.cc @@ -42,6 +42,12 @@ Full Text Search interface #include "ha_prototypes.h" +#ifdef WITH_WSREP +#include <log.h> +#include <wsrep_mysqld.h> +#include <wsrep.h> +#endif + #define FTS_MAX_ID_LEN 32 /** Column name from the FTS config table */ @@ -7040,7 +7046,29 @@ fts_check_and_drop_orphaned_tables( /* If the aux table is in decimal format, we should rename it, so push it to aux_tables_to_rename */ if (!drop && rename) { - ib_vector_push(aux_tables_to_rename, aux_table); + /* It is necessary to check that the table with + this name is missing in the vector - otherwise it + can be renamed twice: */ + bool rename_table = true; + for (ulint count = 0; + count < ib_vector_size(aux_tables_to_rename); + count++) { + fts_aux_table_t* rename_aux = + static_cast<fts_aux_table_t*>( + ib_vector_get(aux_tables_to_rename, + count)); + if (strcmp(rename_aux->name, + aux_table->name) == 0) { + rename_table = false; +#ifdef WITH_WSREP + WSREP_DEBUG("JAN: Not renamed list %s rename_table %s", rename_aux->name, aux_table->name); +#endif + break; + } + } + if (rename_table) { + ib_vector_push(aux_tables_to_rename, aux_table); + } } if (i + 1 < ib_vector_size(tables)) {
participants (1)
-
jan