4973 Ole John Aske 2012-09-13
Fix for bug#14524939 NDBMTD CRASH AT STARTUP IF CONFIGURED WITH MULTIPLE RECEIVER THREADS
Fix ensures that idx[i] is initialized even if we break the init-loop
'if (!recvdata.m_transporters.get(node_id))'
Tescase is running the ndb_basic.test with a config specifying multiple
receiver threads.
added:
mysql-test/suite/ndb/t/ndb_mt_recv-master.opt
mysql-test/suite/ndb/t/ndb_mt_recv.cnf
mysql-test/suite/ndb/t/ndb_mt_recv.test
modified:
storage/ndb/src/common/transporter/TransporterRegistry.cpp
4972 Jan Wedvik 2012-09-13
This is a followup to revno: 4961:
'Update of SPJ component in pre 7.2 branches'.
That commit back ported parts but not all of the online upgrade logic for
SPJ to 7.0. This commit backports the remainder of the online upgarde logic,
that is, the parts concerning the API and the TC blocks.
This commit also removes testcases that will no longer work (because of version
checks) from the daily-basic script. This change should be manually reverted
when merging this commit to 7.2, as the tests are still supposed to work there.
Instead, a new test that check that it is not possible to SPJ API extensions
in pre 7.2 releases have been written (and also added to daily-basic).
Finally, a check of the API version has been added in the API, such that it
is not possible to use SPJ from API client linked with a pre 7.2 API library.
(Before this commit, it would have been possible to run a 7.0 client against
7.2 data nodes.)
modified:
storage/ndb/src/kernel/blocks/dbtc/DbtcMain.cpp
storage/ndb/src/ndbapi/NdbQueryBuilder.cpp
storage/ndb/src/ndbapi/NdbQueryOperation.cpp
storage/ndb/test/ndbapi/testSpj.cpp
storage/ndb/test/run-test/daily-basic-tests.txt
=== added file 'mysql-test/suite/ndb/t/ndb_mt_recv-master.opt'
--- a/mysql-test/suite/ndb/t/ndb_mt_recv-master.opt 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_mt_recv-master.opt 2012-09-13 09:04:41 +0000
@@ -0,0 +1 @@
+--result-file=../suite/ndb/r/ndb_basic
=== added file 'mysql-test/suite/ndb/t/ndb_mt_recv.cnf'
--- a/mysql-test/suite/ndb/t/ndb_mt_recv.cnf 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_mt_recv.cnf 2012-09-13 09:04:41 +0000
@@ -0,0 +1,6 @@
+!include suite/ndb/my.cnf
+
+[cluster_config]
+# Config with multiple receiver threads on versions
+# which supports it (>= Cluster 7.2.x)
+ThreadConfig=recv={count=1}, main={count=1},tc={count=1},ldm={count=2},io={count=1},send={count=0},rep={count=1},
=== added file 'mysql-test/suite/ndb/t/ndb_mt_recv.test'
--- a/mysql-test/suite/ndb/t/ndb_mt_recv.test 1970-01-01 00:00:00 +0000
+++ b/mysql-test/suite/ndb/t/ndb_mt_recv.test 2012-09-13 09:04:41 +0000
@@ -0,0 +1,9 @@
+#
+# Intention of this test is to do some basic testing with
+# multiple receiver threads.
+# It use 'ndb_basic' as testload, and override the default
+# config by specifying its own *.cnf file.
+# There is also a ndb_mt_recv-master.opt defined for
+# this test which specify 'result-file=...ndb_basic'.
+#
+--source ndb_basic.test
=== modified file 'storage/ndb/src/common/transporter/TransporterRegistry.cpp'
--- a/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2012-03-14 09:07:43 +0000
+++ b/storage/ndb/src/common/transporter/TransporterRegistry.cpp 2012-09-13 09:04:41 +0000
@@ -1274,6 +1274,7 @@ TransporterRegistry::poll_TCP(Uint32 tim
const NDB_SOCKET_TYPE socket = t->getSocket();
Uint32 node_id = t->getRemoteNodeId();
+ idx[i] = MAX_NODES + 1;
if (!recvdata.m_transporters.get(node_id))
continue;
@@ -1281,10 +1282,6 @@ TransporterRegistry::poll_TCP(Uint32 tim
{
idx[i] = recvdata.m_socket_poller.add(socket, true, false, false);
}
- else
- {
- idx[i] = MAX_NODES + 1;
- }
}
int tcpReadSelectReply = recvdata.m_socket_poller.poll_unsafe(timeOutMillis);
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-5.1-telco-7.0 branch (ole.john.aske:4972 to 4973)Bug#14524939 | Ole John Aske | 13 Sep |