Skip to content

Commit 400d666

Browse files
committed
Merge branch 'mysql-5.6-cluster-7.4' into mysql-5.7-cluster-7.5 (bug#25152165)
2 parents c607257 + 80d233e commit 400d666

File tree

3 files changed

+16
-3
lines changed

3 files changed

+16
-3
lines changed

mysql-test/suite/ndb/t/ndb_addnode.test

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ CREATE TABLESPACE ts_1
3333
INITIAL_SIZE 16M
3434
ENGINE NDB;
3535

36-
create table t1(id int NOT NULL PRIMARY KEY, data char(8)) engine=ndb;
36+
# Using a pk bigger than 80 bytes, see bug#25152165.
37+
create table t1(id int, data char(8), id2 binary(80), primary key (id, id2)) engine=ndb;
3738
create table t2(id int NOT NULL PRIMARY KEY, data char(8))
3839
TABLESPACE ts_1 STORAGE DISK engine=ndb;
3940
# BUG#13714648

storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13255,8 +13255,9 @@ Uint32 Dblqh::sendKeyinfo20(Signal* signal,
1325513255
* messing with if's below...
1325613256
*/
1325713257
Uint32 keyLen ;
13258-
if (refToMain(ref) == SUMA && nodeId == getOwnNodeId())
13258+
if (refToMain(ref) == SUMA)
1325913259
{
13260+
ndbassert(refToNode(ref) == getOwnNodeId());
1326013261
keyLen = 0;
1326113262
}
1326213263
else

storage/ndb/src/kernel/blocks/suma/Suma.cpp

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2016, Oracle and/or its affiliates. All rights reserved.
2+
Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
33
44
This program is free software; you can redistribute it and/or modify
55
it under the terms of the GNU General Public License as published by
@@ -4540,6 +4540,17 @@ Suma::execKEYINFO20(Signal* signal)
45404540
ndbrequire(syncPtr.p->m_headersSection != RNIL);
45414541
ndbrequire(syncPtr.p->m_dataSection != RNIL);
45424542

4543+
/* SUMA requests a special 'scanInfo only' KeyInfo */
4544+
ndbassert(data->keyLen == 0);
4545+
ndbassert(signal->getNoOfSections() == 0);
4546+
4547+
/* If there are sections, ignore them. This should never happen. */
4548+
if (signal->getNoOfSections() > 0)
4549+
{
4550+
SectionHandle handle(this, signal);
4551+
releaseSections(handle);
4552+
}
4553+
45434554
sendScanSubTableData(signal, syncPtr, takeOver);
45444555
}
45454556

0 commit comments

Comments
 (0)