Commit 9dab3fe2 authored by unknown's avatar unknown

Bug#13228 open table cache not flushed when table schema changed

- Error 1296 is no longer returned on first select after DROP/CREATE.


mysql-test/r/ndb_alter_table2.result:
  Error 1296 is no longer returned on first select after DROP/CREATE, handled proactive in ndb_handle_schema_change.
mysql-test/t/ndb_alter_table2.test:
  Error 1296 is no longer returned on first select after DROP/CREATE, handled proactive in ndb_handle_schema_change.
sql/ha_ndbcluster.cc:
  Add sourrounding {'s
parent 77453b5c
...@@ -28,7 +28,7 @@ b INT NOT NULL, ...@@ -28,7 +28,7 @@ b INT NOT NULL,
c INT NOT NULL c INT NOT NULL
) ENGINE=ndbcluster; ) ENGINE=ndbcluster;
select * from t1; select * from t1;
ERROR HY000: Got error 241 'Invalid schema object version' from ndbcluster a b c
select * from t1; select * from t1;
a b c a b c
select * from t1; select * from t1;
......
...@@ -72,7 +72,6 @@ CREATE TABLE t1 ( ...@@ -72,7 +72,6 @@ CREATE TABLE t1 (
connection server1; connection server1;
--error 1296
select * from t1; select * from t1;
select * from t1; select * from t1;
select * from t1; select * from t1;
......
...@@ -556,6 +556,7 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans) ...@@ -556,6 +556,7 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
ERR_PRINT(err); ERR_PRINT(err);
switch (err.classification) { switch (err.classification) {
case NdbError::SchemaError: case NdbError::SchemaError:
{
invalidate_dictionary_cache(TRUE); invalidate_dictionary_cache(TRUE);
/* Close other open handlers not used by any thread */ /* Close other open handlers not used by any thread */
...@@ -583,6 +584,7 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans) ...@@ -583,6 +584,7 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans)
DBUG_PRINT("info", ("Table exists but must have changed")); DBUG_PRINT("info", ("Table exists but must have changed"));
} }
break; break;
}
default: default:
break; break;
} }
......
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