summaryrefslogtreecommitdiff
path: root/sql/ha_ndbcluster_binlog.cc
diff options
context:
space:
mode:
authorunknown <mskold@mysql.com>2006-02-17 09:44:12 +0100
committerunknown <mskold@mysql.com>2006-02-17 09:44:12 +0100
commitc86dcfd9e34fed19d1d4f72e131c0c0e882c71bb (patch)
treecd67f693b67a73c40b4bfd305dd4924693b45a61 /sql/ha_ndbcluster_binlog.cc
parent42f8c2d2eadb51d630026c58d24e094cfe5ba902 (diff)
downloadmariadb-git-c86dcfd9e34fed19d1d4f72e131c0c0e882c71bb.tar.gz
Invalidate table including all it's indexes from binlog thread
Diffstat (limited to 'sql/ha_ndbcluster_binlog.cc')
-rw-r--r--sql/ha_ndbcluster_binlog.cc20
1 files changed, 13 insertions, 7 deletions
diff --git a/sql/ha_ndbcluster_binlog.cc b/sql/ha_ndbcluster_binlog.cc
index 06f946b013c..ceebb45928b 100644
--- a/sql/ha_ndbcluster_binlog.cc
+++ b/sql/ha_ndbcluster_binlog.cc
@@ -1285,7 +1285,7 @@ end:
/*
Handle _non_ data events from the storage nodes
*/
-static int
+int
ndb_handle_schema_change(THD *thd, Ndb *ndb, NdbEventOperation *pOp,
NDB_SHARE *share)
{
@@ -1294,12 +1294,18 @@ ndb_handle_schema_change(THD *thd, Ndb *ndb, NdbEventOperation *pOp,
if (pOp->getEventType() != NDBEVENT::TE_CLUSTER_FAILURE &&
pOp->getReqNodeId() != g_ndb_cluster_connection->node_id())
{
- ndb->setDatabaseName(share->table->s->db.str);
- ha_ndbcluster::invalidate_dictionary_cache(share->table->s,
- ndb,
- share->table->s->db.str,
- share->table->s->table_name.str,
- TRUE);
+ TABLE_SHARE *table_share= share->table->s;
+ TABLE* table= share->table;
+
+ /*
+ Invalidate table and all it's indexes
+ */
+ ha_ndbcluster table_handler(table_share);
+ table_handler.set_dbname(share->key);
+ table_handler.set_tabname(share->key);
+ table_handler.open_indexes(ndb, table, TRUE);
+ table_handler.invalidate_dictionary_cache(TRUE);
+
remote_drop_table= 1;
}