summaryrefslogtreecommitdiff
path: root/sql/sql_base.h
diff options
context:
space:
mode:
authorNisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>2018-02-26 14:37:39 +0530
committerNisha Gopalakrishnan <nisha.gopalakrishnan@oracle.com>2018-02-26 14:37:39 +0530
commitc0b4d74b52e7eec9b13af732193f7f8d7abe05de (patch)
treef9a56f685812262c4a9e3a7c8972207addefd277 /sql/sql_base.h
parent873f8c25b6de24d267cbdedc70de40dc4b5b83aa (diff)
downloadmariadb-git-c0b4d74b52e7eec9b13af732193f7f8d7abe05de.tar.gz
BUG#27216817: INNODB: FAILING ASSERTION:mysql-5.5.60
PREBUILT->TABLE->N_MYSQL_HANDLES_OPENED == 1 ANALYSIS: ========= Adding unique index to a InnoDB table which is locked as mutliple instances may trigger an InnoDB assert. When we add a primary key or an unique index, we need to drop the original table and rebuild all indexes. InnoDB expects that only the instance of the table that is being rebuilt, is open during the process. In the current scenario we have opened multiple instances of the table. This triggers an assert during table rebuild. 'Locked_tables_list' encapsulates a list of all instances of tables locked by LOCK TABLES statement. FIX: === We are now temporarily closing all the instances of the table except the one which is being altered and later reopen them via Locked_tables_list::reopen_tables().
Diffstat (limited to 'sql/sql_base.h')
-rw-r--r--sql/sql_base.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_base.h b/sql/sql_base.h
index b118c93ac28..28568acc081 100644
--- a/sql/sql_base.h
+++ b/sql/sql_base.h
@@ -1,4 +1,4 @@
-/* Copyright (c) 2010, 2013, Oracle and/or its affiliates. All rights reserved.
+/* Copyright (c) 2010, 2018, 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
@@ -306,7 +306,8 @@ bool close_cached_tables(THD *thd, TABLE_LIST *tables,
bool wait_for_refresh, ulong timeout);
bool close_cached_connection_tables(THD *thd, LEX_STRING *connect_string);
void close_all_tables_for_name(THD *thd, TABLE_SHARE *share,
- bool remove_from_locked_tables);
+ bool remove_from_locked_tables,
+ TABLE *skip_table);
OPEN_TABLE_LIST *list_open_tables(THD *thd, const char *db, const char *wild);
void tdc_remove_table(THD *thd, enum_tdc_remove_table_type remove_type,
const char *db, const char *table_name,