Below is the list of changes that have just been committed into a local
5.1 repository of tomas. When tomas does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2228 06/06/28 02:35:13 tomas@stripped +1 -0
Bug #20705 table truncation from one mysqld causes ERROR 1412 on other mysqld servers
- make sure to invalidate even if table is not binlogged
sql/ha_ndbcluster_binlog.cc
1.71 06/06/28 02:35:04 tomas@stripped +24 -1
Bug #20705 table truncation from one mysqld causes ERROR 1412 on other mysqld servers
- make sure to invalidate even if table is not binlogged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: tomas
# Host: poseidon.ndb.mysql.com
# Root: /home/tomas/mysql-5.1-new-ndb
--- 1.70/sql/ha_ndbcluster_binlog.cc 2006-06-26 11:26:17 +02:00
+++ 1.71/sql/ha_ndbcluster_binlog.cc 2006-06-28 02:35:04 +02:00
@@ -1770,8 +1770,31 @@
/* acknowledge this query _after_ epoch completion */
post_epoch_unlock= 1;
break;
- case SOT_CREATE_TABLE:
case SOT_TRUNCATE_TABLE:
+ {
+ char key[FN_REFLEN];
+ build_table_filename(key, sizeof(key), schema->db, schema->name, "");
+ NDB_SHARE *share= get_share(key, 0, FALSE, FALSE);
+ // invalidation already handled by binlog thread
+ if (!share || !share->op)
+ {
+ {
+ injector_ndb->setDatabaseName(schema->db);
+ Ndb_table_guard ndbtab_g(injector_ndb->getDictionary(),
+ schema->name);
+ ndbtab_g.invalidate();
+ }
+ TABLE_LIST table_list;
+ bzero((char*) &table_list,sizeof(table_list));
+ table_list.db= schema->db;
+ table_list.alias= table_list.table_name= schema->name;
+ close_cached_tables(thd, 0, &table_list, FALSE);
+ }
+ if (share)
+ free_share(&share);
+ }
+ // fall through
+ case SOT_CREATE_TABLE:
pthread_mutex_lock(&LOCK_open);
if (ndb_create_table_from_engine(thd, schema->db, schema->name))
{
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2228) BUG#20705 | tomas | 28 Jun |