Loading sql/ha_ndbcluster.cc +5 −4 Original line number Diff line number Diff line Loading @@ -1011,7 +1011,7 @@ int ha_ndbcluster::get_metadata(const char *path) DBUG_ASSERT(m_table == NULL); DBUG_ASSERT(m_table_info == NULL); const void *data, *pack_data; const void *data= NULL, *pack_data= NULL; uint length, pack_length; /* Loading Loading @@ -4749,7 +4749,7 @@ int ha_ndbcluster::create(const char *name, NDBTAB tab; NDBCOL col; uint pack_length, length, i, pk_length= 0; const void *data, *pack_data; const void *data= NULL, *pack_data= NULL; bool create_from_engine= (info->table_options & HA_OPTION_CREATE_FROM_ENGINE); bool is_truncate= (thd->lex->sql_command == SQLCOM_TRUNCATE); char tablespace[FN_LEN]; Loading Loading @@ -5077,7 +5077,7 @@ int ha_ndbcluster::create_handler_files(const char *file, const char *name; Ndb* ndb; const NDBTAB *tab; const void *data, *pack_data; const void *data= NULL, *pack_data= NULL; uint length, pack_length; int error= 0; Loading Loading @@ -6063,7 +6063,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db, int error= 0; NdbError ndb_error; uint len; const void* data; const void* data= NULL; Ndb* ndb; char key[FN_REFLEN]; DBUG_ENTER("ndbcluster_discover"); Loading Loading @@ -6131,6 +6131,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db, DBUG_RETURN(0); err: my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR)); if (share) free_share(&share); if (ndb_error.code) Loading storage/ndb/src/common/debugger/EventLogger.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -652,9 +652,9 @@ void getTextEventBufferStatus(QQQQ) { "Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) " "max=%d%s apply_gci=%lld latest_gci=%lld", used, used_unit, theData[2] ? (theData[1]*100)/theData[2] : 0, theData[2] ? (Uint32)((((Uint64)theData[1])*100)/theData[2]) : 0, alloc, alloc_unit, theData[3] ? (theData[2]*100)/theData[3] : 0, theData[3] ? (Uint32)((((Uint64)theData[2])*100)/theData[3]) : 0, max_, max_unit, theData[4]+(((Uint64)theData[5])<<32), theData[6]+(((Uint64)theData[7])<<32)); Loading storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -2100,15 +2100,17 @@ NdbEventBuffer::alloc_mem(EventBufData* data, NdbMem_Free((char*)data->memory); assert(m_total_alloc >= data->sz); m_total_alloc -= data->sz; data->memory = 0; data->sz = 0; data->memory = (Uint32*)NdbMem_Allocate(alloc_size); if (data->memory == 0) { m_total_alloc -= data->sz; DBUG_RETURN(-1); } data->sz = alloc_size; m_total_alloc += data->sz; m_total_alloc += add_sz; if (change_sz != NULL) *change_sz += add_sz; Loading Loading @@ -2780,7 +2782,7 @@ NdbEventBuffer::reportStatus() else apply_gci= latest_gci; if (100*m_free_data_sz < m_min_free_thresh*m_total_alloc && if (100*(Uint64)m_free_data_sz < m_min_free_thresh*(Uint64)m_total_alloc && m_total_alloc > 1024*1024) { /* report less free buffer than m_free_thresh, Loading @@ -2791,7 +2793,7 @@ NdbEventBuffer::reportStatus() goto send_report; } if (100*m_free_data_sz > m_max_free_thresh*m_total_alloc && if (100*(Uint64)m_free_data_sz > m_max_free_thresh*(Uint64)m_total_alloc && m_total_alloc > 1024*1024) { /* report more free than 2 * m_free_thresh Loading Loading
sql/ha_ndbcluster.cc +5 −4 Original line number Diff line number Diff line Loading @@ -1011,7 +1011,7 @@ int ha_ndbcluster::get_metadata(const char *path) DBUG_ASSERT(m_table == NULL); DBUG_ASSERT(m_table_info == NULL); const void *data, *pack_data; const void *data= NULL, *pack_data= NULL; uint length, pack_length; /* Loading Loading @@ -4749,7 +4749,7 @@ int ha_ndbcluster::create(const char *name, NDBTAB tab; NDBCOL col; uint pack_length, length, i, pk_length= 0; const void *data, *pack_data; const void *data= NULL, *pack_data= NULL; bool create_from_engine= (info->table_options & HA_OPTION_CREATE_FROM_ENGINE); bool is_truncate= (thd->lex->sql_command == SQLCOM_TRUNCATE); char tablespace[FN_LEN]; Loading Loading @@ -5077,7 +5077,7 @@ int ha_ndbcluster::create_handler_files(const char *file, const char *name; Ndb* ndb; const NDBTAB *tab; const void *data, *pack_data; const void *data= NULL, *pack_data= NULL; uint length, pack_length; int error= 0; Loading Loading @@ -6063,7 +6063,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db, int error= 0; NdbError ndb_error; uint len; const void* data; const void* data= NULL; Ndb* ndb; char key[FN_REFLEN]; DBUG_ENTER("ndbcluster_discover"); Loading Loading @@ -6131,6 +6131,7 @@ int ndbcluster_discover(handlerton *hton, THD* thd, const char *db, DBUG_RETURN(0); err: my_free((char*)data, MYF(MY_ALLOW_ZERO_PTR)); if (share) free_share(&share); if (ndb_error.code) Loading
storage/ndb/src/common/debugger/EventLogger.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -652,9 +652,9 @@ void getTextEventBufferStatus(QQQQ) { "Event buffer status: used=%d%s(%d%) alloc=%d%s(%d%) " "max=%d%s apply_gci=%lld latest_gci=%lld", used, used_unit, theData[2] ? (theData[1]*100)/theData[2] : 0, theData[2] ? (Uint32)((((Uint64)theData[1])*100)/theData[2]) : 0, alloc, alloc_unit, theData[3] ? (theData[2]*100)/theData[3] : 0, theData[3] ? (Uint32)((((Uint64)theData[2])*100)/theData[3]) : 0, max_, max_unit, theData[4]+(((Uint64)theData[5])<<32), theData[6]+(((Uint64)theData[7])<<32)); Loading
storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp +6 −4 Original line number Diff line number Diff line Loading @@ -2100,15 +2100,17 @@ NdbEventBuffer::alloc_mem(EventBufData* data, NdbMem_Free((char*)data->memory); assert(m_total_alloc >= data->sz); m_total_alloc -= data->sz; data->memory = 0; data->sz = 0; data->memory = (Uint32*)NdbMem_Allocate(alloc_size); if (data->memory == 0) { m_total_alloc -= data->sz; DBUG_RETURN(-1); } data->sz = alloc_size; m_total_alloc += data->sz; m_total_alloc += add_sz; if (change_sz != NULL) *change_sz += add_sz; Loading Loading @@ -2780,7 +2782,7 @@ NdbEventBuffer::reportStatus() else apply_gci= latest_gci; if (100*m_free_data_sz < m_min_free_thresh*m_total_alloc && if (100*(Uint64)m_free_data_sz < m_min_free_thresh*(Uint64)m_total_alloc && m_total_alloc > 1024*1024) { /* report less free buffer than m_free_thresh, Loading @@ -2791,7 +2793,7 @@ NdbEventBuffer::reportStatus() goto send_report; } if (100*m_free_data_sz > m_max_free_thresh*m_total_alloc && if (100*(Uint64)m_free_data_sz > m_max_free_thresh*(Uint64)m_total_alloc && m_total_alloc > 1024*1024) { /* report more free than 2 * m_free_thresh Loading