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@stripped, 2007-03-23 17:12:06+01:00, tomas@stripped +2 -0
BUG#27254: Single User Mode.Mysql hangs if it tries delete a ndb table
sql/ha_ndbcluster.cc@stripped, 2007-03-23 17:12:04+01:00, tomas@stripped +17
-8
set single user mode on ndb schema table
storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp@stripped, 2007-03-23 17:12:04+01:00,
tomas@stripped +1 -1
dbug print
# 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: whalegate.ndb.mysql.com
# Root: /home/tomas/mysql-5.1-single-user
--- 1.162/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2007-03-23 14:17:04 +01:00
+++ 1.163/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp 2007-03-23 17:12:04 +01:00
@@ -51,7 +51,7 @@
#define ERR_RETURN(a,b) \
{\
- DBUG_PRINT("exit", ("error %d", (a).code));\
+ DBUG_PRINT("exit", ("error %d return %d", (a).code, b));\
DBUG_RETURN(b);\
}
--- 1.419/sql/ha_ndbcluster.cc 2007-03-23 08:20:31 +01:00
+++ 1.420/sql/ha_ndbcluster.cc 2007-03-23 17:12:04 +01:00
@@ -4742,6 +4742,7 @@
bool create_from_engine= (create_info->table_options &
HA_OPTION_CREATE_FROM_ENGINE);
bool is_truncate= (thd->lex->sql_command == SQLCOM_TRUNCATE);
char tablespace[FN_LEN];
+ NdbDictionary::Table::SingleUserMode single_user_mode=
NdbDictionary::Table::SingleUserModeLocked;
DBUG_ENTER("ha_ndbcluster::create");
DBUG_PRINT("enter", ("name: %s", name));
@@ -4793,19 +4794,23 @@
schema distribution table is setup
( unless it is a creation of the schema dist table itself )
*/
- if (!ndb_schema_share &&
- !(strcmp(m_dbname, NDB_REP_DB) == 0 &&
- strcmp(m_tabname, NDB_SCHEMA_TABLE) == 0))
+ if (!ndb_schema_share)
{
- DBUG_PRINT("info", ("Schema distribution table not setup"));
- DBUG_RETURN(HA_ERR_NO_CONNECTION);
+ if (!(strcmp(m_dbname, NDB_REP_DB) == 0 &&
+ strcmp(m_tabname, NDB_SCHEMA_TABLE) == 0))
+ {
+ DBUG_PRINT("info", ("Schema distribution table not setup"));
+ DBUG_RETURN(HA_ERR_NO_CONNECTION);
+ }
+ single_user_mode = NdbDictionary::Table::SingleUserModeReadWrite;
}
#endif /* HAVE_NDB_BINLOG */
DBUG_PRINT("table", ("name: %s", m_tabname));
tab.setName(m_tabname);
tab.setLogging(!(create_info->options & HA_LEX_CREATE_TMP_TABLE));
-
+ tab.setSingleUserMode(single_user_mode);
+
// Save frm data for this table
if (readfrm(name, &data, &length))
DBUG_RETURN(1);
@@ -5569,6 +5574,7 @@
{
ndb_table_id= h->m_table->getObjectId();
ndb_table_version= h->m_table->getObjectVersion();
+ DBUG_PRINT("info", ("success 1"));
}
else
{
@@ -5582,6 +5588,7 @@
break;
}
res= ndb_to_mysql_error(&dict->getNdbError());
+ DBUG_PRINT("info", ("error(1) %u", res));
}
h->release_metadata(thd, ndb);
}
@@ -5598,6 +5605,8 @@
{
ndb_table_id= ndbtab_g.get_table()->getObjectId();
ndb_table_version= ndbtab_g.get_table()->getObjectVersion();
+ DBUG_PRINT("info", ("success 2"));
+ break;
}
else
{
@@ -5617,8 +5626,8 @@
}
}
}
- else
- res= ndb_to_mysql_error(&dict->getNdbError());
+ res= ndb_to_mysql_error(&dict->getNdbError());
+ DBUG_PRINT("info", ("error(2) %u", res));
break;
}
}
| Thread |
|---|
| • bk commit into 5.1 tree (tomas:1.2501) BUG#27254 | tomas | 23 Mar |