diff options
author | unknown <msvensson@neptunus.(none)> | 2006-01-10 11:35:21 +0100 |
---|---|---|
committer | unknown <msvensson@neptunus.(none)> | 2006-01-10 11:35:21 +0100 |
commit | c521a51340e7251dd0fe959fe3b9c3230047e7ab (patch) | |
tree | 395f42fc26b443b8653346947958ca6ee579354e /sql | |
parent | 7bf8a9e6cafbaaf3ee71724a29bbd3880a30fea6 (diff) | |
download | mariadb-git-c521a51340e7251dd0fe959fe3b9c3230047e7ab.tar.gz |
Bug #13228 open table cache not flushed when table schema changed
- Close open unused handlers when a schema error occurs.
sql/ha_ndbcluster.cc:
When a schema error occurs call close_cached_tables to close any open unused handlers that has opened this table.
mysql-test/r/ndb_alter_table2.result:
New BitKeeper file ``mysql-test/r/ndb_alter_table2.result''
mysql-test/t/ndb_alter_table2.test:
New BitKeeper file ``mysql-test/t/ndb_alter_table2.test''
Diffstat (limited to 'sql')
-rw-r--r-- | sql/ha_ndbcluster.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sql/ha_ndbcluster.cc b/sql/ha_ndbcluster.cc index 0552eded9b6..f357a1e814d 100644 --- a/sql/ha_ndbcluster.cc +++ b/sql/ha_ndbcluster.cc @@ -510,6 +510,13 @@ int ha_ndbcluster::ndb_err(NdbTransaction *trans) case NdbError::SchemaError: invalidate_dictionary_cache(TRUE); + /* Close other open handlers not used by any thread */ + TABLE_LIST table_list; + bzero((char*) &table_list,sizeof(table_list)); + table_list.db= m_dbname; + table_list.alias= table_list.table_name= m_tabname; + close_cached_tables(current_thd, 0, &table_list); + if (err.code==284) { /* |