Commit 375a7a95 authored by unknown's avatar unknown

Merge mysql.com:/Volumes/Backup1/wl2056

into mysql.com:/Users/mikron/wl2056
parents 98f5e099 9ab3065f
...@@ -403,19 +403,19 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){ ...@@ -403,19 +403,19 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
unsigned int noBatchSize = 0; unsigned int noBatchSize = 0;
m_logLevel = new LogLevel(); m_logLevel = new LogLevel();
struct AttribStorage { int paramId; Uint32 * storage; }; struct AttribStorage { int paramId; Uint32 * storage; bool computable };
AttribStorage tmp[] = { AttribStorage tmp[] = {
{ CFG_DB_NO_SCANS, &noOfScanRecords }, { CFG_DB_NO_SCANS, &noOfScanRecords, false },
{ CFG_DB_NO_LOCAL_SCANS, &noOfLocalScanRecords }, { CFG_DB_NO_LOCAL_SCANS, &noOfLocalScanRecords, true },
{ CFG_DB_BATCH_SIZE, &noBatchSize }, { CFG_DB_BATCH_SIZE, &noBatchSize, false },
{ CFG_DB_NO_TABLES, &noOfTables }, { CFG_DB_NO_TABLES, &noOfTables, false },
{ CFG_DB_NO_ORDERED_INDEXES, &noOfOrderedIndexes }, { CFG_DB_NO_ORDERED_INDEXES, &noOfOrderedIndexes, false },
{ CFG_DB_NO_UNIQUE_HASH_INDEXES, &noOfUniqueHashIndexes }, { CFG_DB_NO_UNIQUE_HASH_INDEXES, &noOfUniqueHashIndexes, false },
{ CFG_DB_NO_REPLICAS, &noOfReplicas }, { CFG_DB_NO_REPLICAS, &noOfReplicas, false },
{ CFG_DB_NO_ATTRIBUTES, &noOfAttributes }, { CFG_DB_NO_ATTRIBUTES, &noOfAttributes, false },
{ CFG_DB_NO_OPS, &noOfOperations }, { CFG_DB_NO_OPS, &noOfOperations, false },
{ CFG_DB_NO_LOCAL_OPS, &noOfLocalOperations }, { CFG_DB_NO_LOCAL_OPS, &noOfLocalOperations, true },
{ CFG_DB_NO_TRANSACTIONS, &noOfTransactions } { CFG_DB_NO_TRANSACTIONS, &noOfTransactions, false }
}; };
ndb_mgm_configuration_iterator db(*(ndb_mgm_configuration*)ownConfig, 0); ndb_mgm_configuration_iterator db(*(ndb_mgm_configuration*)ownConfig, 0);
...@@ -423,10 +423,8 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){ ...@@ -423,10 +423,8 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
const int sz = sizeof(tmp)/sizeof(AttribStorage); const int sz = sizeof(tmp)/sizeof(AttribStorage);
for(int i = 0; i<sz; i++){ for(int i = 0; i<sz; i++){
if(ndb_mgm_get_int_parameter(&db, tmp[i].paramId, tmp[i].storage)){ if(ndb_mgm_get_int_parameter(&db, tmp[i].paramId, tmp[i].storage)){
if (tmp[i].paramId == CFG_DB_NO_LOCAL_SCANS) { if (tmp[i].computable) {
noOfLocalScanRecords = 0; *tmp[i].storage = 0;
} else if (tmp[i].paramId == CFG_DB_NO_LOCAL_OPS) {
noOfLocalOperations = 0;
} else { } else {
snprintf(buf, sizeof(buf),"ConfigParam: %d not found", tmp[i].paramId); snprintf(buf, sizeof(buf),"ConfigParam: %d not found", tmp[i].paramId);
ERROR_SET(fatal, ERR_INVALID_CONFIG, msg, buf); ERROR_SET(fatal, ERR_INVALID_CONFIG, msg, buf);
......
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