Commit b67566c2 authored by unknown's avatar unknown

Post review fixes of WL#1892

parent 83f6d737
...@@ -987,27 +987,24 @@ int ha_ndbcluster::get_metadata(const char *path) ...@@ -987,27 +987,24 @@ int ha_ndbcluster::get_metadata(const char *path)
DBUG_RETURN(1); DBUG_RETURN(1);
} }
if (cmp_frm(tab, pack_data, pack_length)) if (m_share->state != NSS_ALTERED && cmp_frm(tab, pack_data, pack_length))
{ {
if (m_share->state != NSS_ALTERED) if (!invalidating_ndb_table)
{ {
if (!invalidating_ndb_table) DBUG_PRINT("info", ("Invalidating table"));
{ invalidate_dictionary_cache(TRUE);
DBUG_PRINT("info", ("Invalidating table")); invalidating_ndb_table= TRUE;
invalidate_dictionary_cache(TRUE); }
invalidating_ndb_table= TRUE; else
} {
else DBUG_PRINT("error",
{ ("metadata, pack_length: %d getFrmLength: %d memcmp: %d",
DBUG_PRINT("error", pack_length, tab->getFrmLength(),
("metadata, pack_length: %d getFrmLength: %d memcmp: %d", memcmp(pack_data, tab->getFrmData(), pack_length)));
pack_length, tab->getFrmLength(), DBUG_DUMP("pack_data", (char*)pack_data, pack_length);
memcmp(pack_data, tab->getFrmData(), pack_length))); DBUG_DUMP("frm", (char*)tab->getFrmData(), tab->getFrmLength());
DBUG_DUMP("pack_data", (char*)pack_data, pack_length); error= HA_ERR_TABLE_DEF_CHANGED;
DBUG_DUMP("frm", (char*)tab->getFrmData(), tab->getFrmLength()); invalidating_ndb_table= FALSE;
error= HA_ERR_TABLE_DEF_CHANGED;
invalidating_ndb_table= FALSE;
}
} }
} }
else else
...@@ -5410,6 +5407,8 @@ int ndbcluster_find_all_files(THD *thd) ...@@ -5410,6 +5407,8 @@ int ndbcluster_find_all_files(THD *thd)
sql_print_information("NDB: mismatch in frm for %s.%s, discovering...", sql_print_information("NDB: mismatch in frm for %s.%s, discovering...",
elmt.database, elmt.name); elmt.database, elmt.name);
} }
if (share)
free_share(&share);
} }
my_free((char*) data, MYF(MY_ALLOW_ZERO_PTR)); my_free((char*) data, MYF(MY_ALLOW_ZERO_PTR));
my_free((char*) pack_data, MYF(MY_ALLOW_ZERO_PTR)); my_free((char*) pack_data, MYF(MY_ALLOW_ZERO_PTR));
......
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