From b18b07e6b1f0ee069b29cc8e1ba1d145ab6f8f9b Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 18 Nov 2005 09:54:49 +0100 Subject: [PATCH] Using new error code HA_ERR_TABLE_DEF_CHANGED to signal wrong schema version of table --- mysql-test/t/ndb_alter_table.test | 2 +- sql/ha_ndbcluster.cc | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mysql-test/t/ndb_alter_table.test b/mysql-test/t/ndb_alter_table.test index 86086ac54e5..4f76380f94c 100644 --- a/mysql-test/t/ndb_alter_table.test +++ b/mysql-test/t/ndb_alter_table.test @@ -152,7 +152,7 @@ connection server1; alter table t1 drop index c; connection server2; # This should fail since index information is not automatically refreshed ---error 1105 +--error 1412 select * from t1 where b = 'two'; select * from t1 where b = 'two'; connection server1; diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index b8794c67301..cdd406d473c 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -3342,8 +3342,7 @@ int ha_ndbcluster::external_lock(THD *thd, int lock_type) /* The table has been altered, caller has to retry */ - NdbError err= ndb->getNdbError(NDB_INVALID_SCHEMA_OBJECT); - DBUG_RETURN(ndb_to_mysql_error(&err)); + DBUG_RETURN(my_errno= HA_ERR_TABLE_DEF_CHANGED); } m_table_info= tab_info; }