Commit f78c33c7 authored by joreland@mysql.com's avatar joreland@mysql.com

Merge mysql.com:/home/jonas/src/mysql-4.1

into mysql.com:/home/jonas/src/mysql-5.0
parents fdbdf2d4 67b044cc
...@@ -230,17 +230,17 @@ NdbScanOperation::fix_receivers(Uint32 parallel){ ...@@ -230,17 +230,17 @@ NdbScanOperation::fix_receivers(Uint32 parallel){
if(parallel > m_allocated_receivers){ if(parallel > m_allocated_receivers){
const Uint32 sz = parallel * (4*sizeof(char*)+sizeof(Uint32)); 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 // 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; delete[] m_array;
m_array = tmp; m_array = (Uint32*)tmp;
m_prepared_receivers = tmp; m_receivers = (NdbReceiver**)tmp;
m_receivers = (NdbReceiver**)(tmp + parallel);
m_api_receivers = m_receivers + parallel; m_api_receivers = m_receivers + parallel;
m_conf_receivers = m_api_receivers + parallel; m_conf_receivers = m_api_receivers + parallel;
m_sent_receivers = m_conf_receivers + parallel; m_sent_receivers = m_conf_receivers + parallel;
m_prepared_receivers = (Uint32*)(m_sent_receivers + parallel);
// Only get/init "new" receivers // Only get/init "new" receivers
NdbReceiver* tScanRec; NdbReceiver* tScanRec;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment