diff options
author | mskold@mysql.com <> | 2005-11-24 16:21:07 +0100 |
---|---|---|
committer | mskold@mysql.com <> | 2005-11-24 16:21:07 +0100 |
commit | 70d447c1f1518b85a4db44dd9c0b4fa526457fa1 (patch) | |
tree | 080f53a3d6f7c0b0982435006574b52d84d516f7 /sql/ha_ndbcluster.cc | |
parent | efdef780bc49d0a13ab67c1c5c2c1b4968f85433 (diff) | |
download | mariadb-git-70d447c1f1518b85a4db44dd9c0b4fa526457fa1.tar.gz |
Moved check of wrong schema version earlier
Diffstat (limited to 'sql/ha_ndbcluster.cc')
-rw-r--r-- | sql/ha_ndbcluster.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 6760208488f..e06559dc593 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3285,12 +3285,7 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) DBUG_PRINT("info", ("Table schema version: %d", tab->getObjectVersion())); } - if (m_table != (void *)tab) - { - m_table= (void *)tab; - m_table_version = tab->getObjectVersion(); - } - else if (m_table_version < tab->getObjectVersion()) + if (m_table_version < tab->getObjectVersion()) { /* The table has been altered, caller has to retry @@ -3298,6 +3293,13 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) NdbError err= ndb->getNdbError(NDB_INVALID_SCHEMA_OBJECT); DBUG_RETURN(ndb_to_mysql_error(&err)); } + if (m_table != (void *)tab) + { + m_table= (void *)tab; + m_table_version = tab->getObjectVersion(); + if (!(my_errno= build_index_list(ndb, table, ILBP_OPEN))) + DBUG_RETURN(my_errno); + } m_table_info= tab_info; } no_uncommitted_rows_init(thd); |