diff options
author | jonas@eel.(none) <> | 2005-08-18 14:02:25 +0200 |
---|---|---|
committer | jonas@eel.(none) <> | 2005-08-18 14:02:25 +0200 |
commit | 3b68047235d6a7bd8816672fdc7bad9a4de1bb18 (patch) | |
tree | 6f3c0b63f33e6dea6c70660522793c74ff935e53 /sql/ha_ndbcluster.cc | |
parent | c0b4c8f13d83b64b7ee421808acf640e0f1f817f (diff) | |
download | mariadb-git-3b68047235d6a7bd8816672fdc7bad9a4de1bb18.tar.gz |
bug#12118 - ndb alter table data loss
Split table version into 2 (major, minor)
Impl. signaling to API when table has been altered
Allow running transactions to use any minor number for transactions
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 65c5fcb7de4..533895ce378 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3266,7 +3266,10 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) DBUG_PRINT("info", ("Table schema version: %d", tab->getObjectVersion())); // Check if thread has stale local cache - if (tab->getObjectStatus() == NdbDictionary::Object::Invalid) + // New transaction must not use old tables... (trans != 0) + // Running might... + if ((trans && tab->getObjectStatus() != NdbDictionary::Object::Retrieved) + || tab->getObjectStatus() == NdbDictionary::Object::Invalid) { invalidate_dictionary_cache(FALSE); if (!(tab= dict->getTable(m_tabname, &tab_info))) |