Commit e23e81f7 authored by unknown's avatar unknown

Review fixes for Bug #8753 Invalid schema

object version after dropping index

parent 8e8dfe43
...@@ -328,7 +328,7 @@ void ha_ndbcluster::no_uncommitted_rows_reset(THD *thd) ...@@ -328,7 +328,7 @@ void ha_ndbcluster::no_uncommitted_rows_reset(THD *thd)
# The mapped error code # The mapped error code
*/ */
void ha_ndbcluster::invalidateCache() void ha_ndbcluster::invalidateDictionaryCache()
{ {
NDBDICT *dict= get_ndb()->getDictionary(); NDBDICT *dict= get_ndb()->getDictionary();
DBUG_PRINT("info", ("invalidating %s", m_tabname)); DBUG_PRINT("info", ("invalidating %s", m_tabname));
...@@ -341,8 +341,7 @@ void ha_ndbcluster::invalidateCache() ...@@ -341,8 +341,7 @@ void ha_ndbcluster::invalidateCache()
NDBINDEX *unique_index = (NDBINDEX *) m_index[i].unique_index; NDBINDEX *unique_index = (NDBINDEX *) m_index[i].unique_index;
NDB_INDEX_TYPE idx_type= m_index[i].type; NDB_INDEX_TYPE idx_type= m_index[i].type;
switch(idx_type) {
switch(m_index[i].type) {
case(PRIMARY_KEY_ORDERED_INDEX): case(PRIMARY_KEY_ORDERED_INDEX):
case(ORDERED_INDEX): case(ORDERED_INDEX):
dict->invalidateIndex(index->getName(), m_tabname); dict->invalidateIndex(index->getName(), m_tabname);
...@@ -369,7 +368,7 @@ int ha_ndbcluster::ndb_err(NdbConnection *trans) ...@@ -369,7 +368,7 @@ int ha_ndbcluster::ndb_err(NdbConnection *trans)
switch (err.classification) { switch (err.classification) {
case NdbError::SchemaError: case NdbError::SchemaError:
{ {
invalidateCache(); invalidateDictionaryCache();
break; break;
} }
default: default:
...@@ -759,7 +758,7 @@ int ha_ndbcluster::get_metadata(const char *path) ...@@ -759,7 +758,7 @@ int ha_ndbcluster::get_metadata(const char *path)
if (!invalidating_ndb_table) if (!invalidating_ndb_table)
{ {
DBUG_PRINT("info", ("Invalidating table")); DBUG_PRINT("info", ("Invalidating table"));
invalidateCache(); invalidateDictionaryCache();
invalidating_ndb_table= TRUE; invalidating_ndb_table= TRUE;
} }
else else
......
...@@ -201,7 +201,7 @@ class ha_ndbcluster: public handler ...@@ -201,7 +201,7 @@ class ha_ndbcluster: public handler
void print_results(); void print_results();
longlong get_auto_increment(); longlong get_auto_increment();
void invalidateCache(); void invalidateDictionaryCache();
int ndb_err(NdbConnection*); int ndb_err(NdbConnection*);
bool uses_blob_value(bool all_fields); bool uses_blob_value(bool all_fields);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment