#At file:///home/jonas/src/telco-6.4/ based on revid:jonas@stripped
3152 Jonas Oreland 2009-10-22
ndb - bug#48227 - fix upgrade of schema file
modified:
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
storage/ndb/test/ndbapi/testUpgrade.cpp
=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2009-10-22 07:20:47 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2009-10-22 11:33:08 +0000
@@ -1834,6 +1834,7 @@ Dbdict::convertSchemaFileTo_6_4(XSchemaF
{
for (Uint32 i = 0; i < xsf->noOfPages; i++)
{
+ xsf->schemaPage[i].NdbVersion = NDB_VERSION_D;
for (Uint32 j = 0; j < NDB_SF_PAGE_ENTRIES; j++)
{
Uint32 n = i * NDB_SF_PAGE_ENTRIES + j;
=== modified file 'storage/ndb/test/ndbapi/testUpgrade.cpp'
--- a/storage/ndb/test/ndbapi/testUpgrade.cpp 2009-10-01 09:36:14 +0000
+++ b/storage/ndb/test/ndbapi/testUpgrade.cpp 2009-10-22 11:33:08 +0000
@@ -639,7 +639,6 @@ runPostUpgradeChecks(NDBT_Context* ctx,
* automatically by NDBT...
* so when we enter here, this is already tested
*/
-
NdbBackup backup(GETNDB(step)->getNodeId()+1);
ndbout << "Starting backup..." << flush;
@@ -650,6 +649,42 @@ runPostUpgradeChecks(NDBT_Context* ctx,
}
ndbout << "done" << endl;
+ /**
+ * Bug48227
+ *
+ */
+ Ndb* pNdb = GETNDB(step);
+ NdbDictionary::Dictionary *pDict = pNdb->getDictionary();
+ NdbDictionary::Table tab = * NDBT_Tables::getTable(0);
+ tab.setName("TRUP2");
+ pDict->dropTable(tab.getName());
+ if (pDict->createTable(tab) != 0)
+ {
+ ndbout_c("Failed to create table!");
+ ndbout << pDict->getNdbError() << endl;
+ NDBT_Tables::print(NDBT_Tables::getTable(0)->getName());
+ return NDBT_FAILED;
+ }
+
+ NdbRestarter res;
+ if (res.restartAll() != 0)
+ {
+ ndbout_c("restartAll() failed");
+ return NDBT_FAILED;
+ }
+
+ if (res.waitClusterStarted() != 0)
+ {
+ ndbout_c("waitClusterStarted() failed");
+ return NDBT_FAILED;
+ }
+
+ if (pDict->getTable(tab.getName()) == 0)
+ {
+ ndbout_c("Table disappered");
+ return NDBT_FAILED;
+ }
+
return NDBT_OK;
}
Attachment: [text/bzr-bundle] bzr/jonas@mysql.com-20091022113308-6783du53wjbwqp0o.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.0 branch (jonas:3152) Bug#48227 | Jonas Oreland | 22 Oct |