Commit f43408b8 authored by tomas@poseidon.ndb.mysql.com's avatar tomas@poseidon.ndb.mysql.com

Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1

into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-clean
parents c356b37b 7b601bd9
...@@ -34,6 +34,7 @@ ...@@ -34,6 +34,7 @@
#include <kernel_types.h> #include <kernel_types.h>
#include <ndb_limits.h> #include <ndb_limits.h>
#include <ndbapi_limits.h>
#include "pc.hpp" #include "pc.hpp"
#include <LogLevel.hpp> #include <LogLevel.hpp>
#include <NdbSleep.h> #include <NdbSleep.h>
...@@ -454,6 +455,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){ ...@@ -454,6 +455,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
unsigned int noOfTables = 0; unsigned int noOfTables = 0;
unsigned int noOfUniqueHashIndexes = 0; unsigned int noOfUniqueHashIndexes = 0;
unsigned int noOfOrderedIndexes = 0; unsigned int noOfOrderedIndexes = 0;
unsigned int noOfTriggers = 0;
unsigned int noOfReplicas = 0; unsigned int noOfReplicas = 0;
unsigned int noOfDBNodes = 0; unsigned int noOfDBNodes = 0;
unsigned int noOfAPINodes = 0; unsigned int noOfAPINodes = 0;
...@@ -478,6 +480,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){ ...@@ -478,6 +480,7 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
{ CFG_DB_NO_TABLES, &noOfTables, false }, { CFG_DB_NO_TABLES, &noOfTables, false },
{ CFG_DB_NO_ORDERED_INDEXES, &noOfOrderedIndexes, false }, { CFG_DB_NO_ORDERED_INDEXES, &noOfOrderedIndexes, false },
{ CFG_DB_NO_UNIQUE_HASH_INDEXES, &noOfUniqueHashIndexes, false }, { CFG_DB_NO_UNIQUE_HASH_INDEXES, &noOfUniqueHashIndexes, false },
{ CFG_DB_NO_TRIGGERS, &noOfTriggers, true },
{ CFG_DB_NO_REPLICAS, &noOfReplicas, false }, { CFG_DB_NO_REPLICAS, &noOfReplicas, false },
{ CFG_DB_NO_ATTRIBUTES, &noOfAttributes, false }, { CFG_DB_NO_ATTRIBUTES, &noOfAttributes, false },
{ CFG_DB_NO_OPS, &noOfOperations, false }, { CFG_DB_NO_OPS, &noOfOperations, false },
...@@ -586,6 +589,18 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){ ...@@ -586,6 +589,18 @@ Configuration::calcSizeAlt(ConfigValues * ownConfig){
ConfigValues::Iterator it2(*ownConfig, db.m_config); ConfigValues::Iterator it2(*ownConfig, db.m_config);
it2.set(CFG_DB_NO_TABLES, noOfTables); it2.set(CFG_DB_NO_TABLES, noOfTables);
it2.set(CFG_DB_NO_ATTRIBUTES, noOfAttributes); it2.set(CFG_DB_NO_ATTRIBUTES, noOfAttributes);
{
Uint32 neededNoOfTriggers = /* types: Insert/Update/Delete/Custom */
3 * noOfUniqueHashIndexes + /* for unique hash indexes, I/U/D */
3 * NDB_MAX_ACTIVE_EVENTS + /* for events in suma, I/U/D */
3 * noOfTables + /* for backup, I/U/D */
noOfOrderedIndexes; /* for ordered indexes, C */
if (noOfTriggers < neededNoOfTriggers)
{
noOfTriggers= neededNoOfTriggers;
it2.set(CFG_DB_NO_TRIGGERS, noOfTriggers);
}
}
/** /**
* Do size calculations * Do size calculations
......
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