Skip to content

Commit e317207

Browse files
author
Ole John Aske
committed
Merge branch 'mysql-5.7-cluster-7.5' into mysql-5.7-cluster-7.6
Change-Id: I35963894cfaeb0ee95ffbabe4cd131f8a4008f0f
2 parents 2ffd9e1 + 5fb5dc0 commit e317207

File tree

3 files changed

+19
-19
lines changed

3 files changed

+19
-19
lines changed

sql/ha_ndbcluster.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9069,7 +9069,7 @@ ha_ndbcluster::start_transaction_row(const NdbRecord *ndb_record,
90699069

90709070
Ndb *ndb= m_thd_ndb->ndb;
90719071

9072-
Uint64 tmp[(MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY) >> 1];
9072+
Uint32 tmp[MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY];
90739073
char *buf= (char*)&tmp[0];
90749074
trans= ndb->startTransaction(ndb_record,
90759075
(const char*)record,
@@ -9101,7 +9101,7 @@ ha_ndbcluster::start_transaction_key(uint inx_no,
91019101
Ndb *ndb= m_thd_ndb->ndb;
91029102
const NdbRecord *key_rec= m_index[inx_no].ndb_unique_record_key;
91039103

9104-
Uint64 tmp[(MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY) >> 1];
9104+
Uint32 tmp[MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY];
91059105
char *buf= (char*)&tmp[0];
91069106
trans= ndb->startTransaction(key_rec,
91079107
(const char*)key_data,
@@ -17857,7 +17857,7 @@ uint32 ha_ndbcluster::calculate_key_hash_value(Field **field_array)
1785717857
struct Ndb::Key_part_ptr *key_data_ptr= &key_data[0];
1785817858
Uint32 i= 0;
1785917859
int ret_val;
17860-
Uint64 tmp[(MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY) >> 1];
17860+
Uint32 tmp[MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY];
1786117861
void *buf= (void*)&tmp[0];
1786217862
DBUG_ENTER("ha_ndbcluster::calculate_key_hash_value");
1786317863

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7029,28 +7029,28 @@ Dblqh::handle_nr_copy(Signal* signal, Ptr<TcConnectionrec> regTcPtr)
70297029
if (len > 0 && !match &&
70307030
g_key_descriptor_pool.getPtr(tableId)->hasCharAttr)
70317031
{
7032-
Uint64 reqKey[ MAX_KEY_SIZE_IN_WORDS >> 1 ];
7033-
Uint64 dbXfrmKey[ (MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY) >> 1 ];
7034-
Uint64 reqXfrmKey[ (MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY) >> 1 ];
7032+
Uint32 reqKey[MAX_KEY_SIZE_IN_WORDS];
7033+
Uint32 dbXfrmKey[MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY];
7034+
Uint32 reqXfrmKey[MAX_KEY_SIZE_IN_WORDS*MAX_XFRM_MULTIPLY];
70357035
Uint32 keyPartLen[MAX_ATTRIBUTES_IN_INDEX];
70367036

70377037
jam();
70387038

70397039
/* Transform db table key read from DB above into dbXfrmKey */
70407040
const int dbXfrmKeyLen = xfrm_key(tableId,
70417041
&signal->theData[24],
7042-
(Uint32*)dbXfrmKey,
7042+
dbXfrmKey,
70437043
sizeof(dbXfrmKey) >> 2,
70447044
keyPartLen);
70457045
ndbassert(dbXfrmKeyLen > 0);
70467046

70477047
/* Copy request key into linear space */
7048-
copy((Uint32*) reqKey, regTcPtr.p->keyInfoIVal);
7048+
copy(reqKey, regTcPtr.p->keyInfoIVal);
70497049

70507050
/* Transform request key */
70517051
const int reqXfrmKeyLen = xfrm_key(tableId,
7052-
(Uint32*)reqKey,
7053-
(Uint32*)reqXfrmKey,
7052+
reqKey,
7053+
reqXfrmKey,
70547054
sizeof(reqXfrmKey) >> 2,
70557055
keyPartLen);
70567056
ndbassert(reqXfrmKeyLen > 0);
@@ -7416,7 +7416,7 @@ Uint32
74167416
Dblqh::readPrimaryKeys(Uint32 opPtrI, Uint32 * dst, bool xfrm)
74177417
{
74187418
TcConnectionrecPtr regTcPtr;
7419-
Uint64 Tmp[MAX_KEY_SIZE_IN_WORDS >> 1];
7419+
Uint32 Tmp[MAX_KEY_SIZE_IN_WORDS];
74207420

74217421
jamEntry();
74227422
regTcPtr.i = opPtrI;

storage/ndb/src/ndbapi/NdbScanOperation.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
Copyright (c) 2003, 2022, Oracle and/or its affiliates.
2+
Copyright (c) 2003, 2023, Oracle and/or its affiliates.
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, version 2.0,
@@ -764,12 +764,12 @@ NdbIndexScanOperation::getDistKeyFromRange(const NdbRecord *key_record,
764764
const char *row,
765765
Uint32* distKey)
766766
{
767-
const Uint32 MaxKeySizeInLongWords= (NDB_MAX_KEY_SIZE + 7) / 8;
768-
// Note: xfrm:ed key can/will be bigger than MaxKeySizeInLongWords
769-
Uint64 tmp[ MaxKeySizeInLongWords * MAX_XFRM_MULTIPLY ];
770-
char* tmpshrink = (char*)tmp;
771-
Uint32 tmplen = (Uint32)sizeof(tmp);
772-
767+
// Note: xfrm:ed key can/will be bigger than MAX_KEY_SIZE_IN_WORDS
768+
Uint32 xfrmbuf[MAX_KEY_SIZE_IN_WORDS * MAX_XFRM_MULTIPLY];
769+
char shrinkbuf[NDB_MAX_KEY_SIZE];
770+
char* tmpshrink = shrinkbuf;
771+
Uint32 tmplen = (Uint32)sizeof(shrinkbuf);
772+
773773
/* This can't work for User Defined partitioning */
774774
assert(key_record->table->m_fragmentType !=
775775
NdbDictionary::Object::UserDefined);
@@ -813,7 +813,7 @@ NdbIndexScanOperation::getDistKeyFromRange(const NdbRecord *key_record,
813813

814814
Uint32 hashValue;
815815
int ret = Ndb::computeHash(&hashValue, result_record->table,
816-
ptrs, tmpshrink, tmplen);
816+
ptrs, xfrmbuf, sizeof(xfrmbuf));
817817
if (ret == 0)
818818
{
819819
*distKey = hashValue;

0 commit comments

Comments
 (0)