#At file:///home/jonas/src/telco-6.4/
3189 Jonas Oreland 2008-12-19
ndb - 6.4 only - SR not possible after alter table (incorrect table id in table file)
modified:
mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result
mysql-test/suite/ndb_binlog/t/ndb_binlog_discover.test
storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp
=== modified file 'mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result'
--- a/mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result 2008-02-25 13:50:20 +0000
+++ b/mysql-test/suite/ndb_binlog/r/ndb_binlog_discover.result 2008-12-19 13:17:23 +0000
@@ -1,5 +1,6 @@
-drop table if exists t1;
-create table t1 (a int key) engine=ndb;
+drop table if exists t1,t2;
+create table t2 (a int key) engine=ndb;
+alter table t2 rename t1;
reset master;
select * from t1;
a
=== modified file 'mysql-test/suite/ndb_binlog/t/ndb_binlog_discover.test'
--- a/mysql-test/suite/ndb_binlog/t/ndb_binlog_discover.test 2008-10-13 17:45:03 +0000
+++ b/mysql-test/suite/ndb_binlog/t/ndb_binlog_discover.test 2008-12-19 13:17:23 +0000
@@ -2,7 +2,7 @@
-- source include/have_binlog_format_mixed_or_row.inc
--disable_warnings
-drop table if exists t1;
+drop table if exists t1,t2;
--disable_query_log
set ndb_table_temporary=0;
--enable_query_log
@@ -11,7 +11,11 @@ set ndb_table_temporary=0;
#
# Bug #14516 Restart of cluster can cause NDB API replication failure
#
-create table t1 (a int key) engine=ndb;
+create table t2 (a int key) engine=ndb;
+#
+# Unreported bug, online altered table causes system restart to fail
+#
+alter table t2 rename t1;
reset master;
--exec $NDB_MGM --no-defaults -e "all restart -n" > /dev/null
--exec $NDB_WAITER --no-defaults --not-started > /dev/null
=== modified file 'storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-12-19 09:42:22 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp 2008-12-19 13:17:23 +0000
@@ -541,7 +541,7 @@ Dbdict::packTableIntoPages(SimplePropert
ConstRope r(c_rope_pool, tablePtr.p->tableName);
r.copy(tableName);
w.add(DictTabInfo::TableName, tableName);
- w.add(DictTabInfo::TableId, tablePtr.i);
+ w.add(DictTabInfo::TableId, tablePtr.p->tableId);
w.add(DictTabInfo::TableVersion, tablePtr.p->tableVersion);
w.add(DictTabInfo::NoOfKeyAttr, tablePtr.p->noOfPrimkey);
w.add(DictTabInfo::NoOfAttributes, tablePtr.p->noOfAttributes);
@@ -5480,7 +5480,7 @@ Dbdict::createTab_writeTableConf(Signal*
void
Dbdict::createTab_local(Signal* signal,
SchemaOpPtr op_ptr,
- OpSection fragSec,
+ OpSection afragSec,
Callback * c)
{
jam();
@@ -7275,6 +7275,7 @@ Dbdict::alterTable_parse(Signal* signal,
// the new temporary table record seized from pool
newTablePtr = parseRecord.tablePtr;
+ newTablePtr.p->tableId = impl_req->tableId; // set correct table id...(not the temporary)
}
// set the new version now
| Thread |
|---|
| • bzr commit into mysql-5.1 branch (jonas:3189) | Jonas Oreland | 19 Dec |