mirror of
https://github.com/MariaDB/server.git
synced 2025-01-19 13:32:33 +01:00
ndb - make sure scan recevier pointers are aligned
This commit is contained in:
parent
51a443a1c3
commit
67b044cc47
1 changed files with 5 additions and 5 deletions
|
@ -241,17 +241,17 @@ NdbScanOperation::fix_receivers(Uint32 parallel){
|
|||
if(parallel > m_allocated_receivers){
|
||||
const Uint32 sz = parallel * (4*sizeof(char*)+sizeof(Uint32));
|
||||
|
||||
Uint32 * tmp = new Uint32[(sz+3)/4];
|
||||
Uint64 * tmp = new Uint64[(sz+7)/8];
|
||||
// Save old receivers
|
||||
memcpy(tmp+parallel, m_receivers, m_allocated_receivers*sizeof(char*));
|
||||
memcpy(tmp, m_receivers, m_allocated_receivers*sizeof(char*));
|
||||
delete[] m_array;
|
||||
m_array = tmp;
|
||||
m_array = (Uint32*)tmp;
|
||||
|
||||
m_prepared_receivers = tmp;
|
||||
m_receivers = (NdbReceiver**)(tmp + parallel);
|
||||
m_receivers = (NdbReceiver**)tmp;
|
||||
m_api_receivers = m_receivers + parallel;
|
||||
m_conf_receivers = m_api_receivers + parallel;
|
||||
m_sent_receivers = m_conf_receivers + parallel;
|
||||
m_prepared_receivers = (Uint32*)(m_sent_receivers + parallel);
|
||||
|
||||
// Only get/init "new" receivers
|
||||
NdbReceiver* tScanRec;
|
||||
|
|
Loading…
Reference in a new issue