Below is the list of changes that have just been committed into a local
4.1 repository of marty. When marty does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2212 05/04/28 09:39:29 mskold@stripped +1 -0
Fix for avoiding gettin Invalid schema object version when doing local changes, post review fixes
sql/ha_ndbcluster.cc
1.149 05/04/28 09:38:54 mskold@stripped +20 -4
Fix for avoiding gettin Invalid schema object version when doing local changes, post review fixes
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: mskold
# Host: blowfish.ndb.mysql.com
# Root: /usr/local/home/marty/MySQL/mysql-4.1
--- 1.148/sql/ha_ndbcluster.cc Wed Apr 27 18:17:18 2005
+++ 1.149/sql/ha_ndbcluster.cc Thu Apr 28 09:38:54 2005
@@ -336,7 +336,17 @@
NDBDICT *dict= get_ndb()->getDictionary();
DBUG_PRINT("info", ("invalidating %s", m_tabname));
if (global)
- dict->invalidateTable(m_tabname);
+ {
+ if (((const NDBTAB *)m_table)->getObjectStatus()
+ == NdbDictionary::Object::Invalid)
+ {
+ // Global cache has already been invalidated
+ dict->removeCachedTable(m_tabname);
+ global= FALSE;
+ }
+ else
+ dict->invalidateTable(m_tabname);
+ }
else
dict->removeCachedTable(m_tabname);
table->version=0L; /* Free when thread is ready */
@@ -779,6 +789,7 @@
if (!(tab= dict->getTable(m_tabname)))
ERR_RETURN(dict->getNdbError());
+ // Check if thread has stale local cache
if (tab->getObjectStatus() == NdbDictionary::Object::Invalid)
{
invalidate_dictionary_cache(FALSE);
@@ -804,6 +815,7 @@
if (!invalidating_ndb_table)
{
DBUG_PRINT("info", ("Invalidating table"));
+ m_table= (void *) tab;
invalidate_dictionary_cache(TRUE);
invalidating_ndb_table= TRUE;
}
@@ -3288,7 +3300,6 @@
thd->transaction.stmt.ndb_tid= 0;
}
}
- m_table= NULL;
m_table_info= NULL;
/*
This is the place to make sure this handler instance
@@ -3910,7 +3921,13 @@
dict= ndb->getDictionary();
if (!(orig_tab= dict->getTable(m_tabname)))
ERR_RETURN(dict->getNdbError());
-
+ // Check if thread has stale local cache
+ if (orig_tab->getObjectStatus() == NdbDictionary::Object::Invalid)
+ {
+ dict->removeCachedTable(m_tabname);
+ if (!(orig_tab= dict->getTable(m_tabname)))
+ ERR_RETURN(dict->getNdbError());
+ }
m_table= (void *)orig_tab;
// Change current database to that of target table
set_dbname(to);
@@ -4278,7 +4295,6 @@
DBUG_RETURN(1);
ERR_RETURN(err);
}
-
DBUG_PRINT("info", ("Found table %s", tab->getName()));
len= tab->getFrmLength();
| Thread |
|---|
| • bk commit into 4.1 tree (mskold:1.2212) | Martin Skold | 28 Apr |