Commit b5c274ef authored by unknown's avatar unknown

Merge svojtovich@bk-internal.mysql.com:/home/bk/mysql-5.0

into mysql.com:/home/svoj/devel/mysql/test1-mysql-5.0
parents 34c82387 84c6873b
......@@ -122,6 +122,7 @@ public:
friend sslFactory& GetSSL_Factory(); // singleton creator
private:
static sslFactory instance;
sslFactory(const sslFactory&); // hide copy
sslFactory& operator=(const sslFactory&); // and assign
};
......@@ -208,6 +209,7 @@ public:
private:
Sessions(const Sessions&); // hide copy
Sessions& operator=(const Sessions&); // and assign
static Sessions instance;
};
......
......@@ -1346,17 +1346,18 @@ SSL_SESSION::~SSL_SESSION()
}
Sessions Sessions::instance; // simple singleton
Sessions& GetSessions()
{
static Sessions instance; // simple singleton
return instance;
return Sessions::instance;
}
sslFactory sslFactory::instance;
sslFactory& GetSSL_Factory()
{
static sslFactory instance; // simple singleton
return instance;
return sslFactory::instance;
}
......
......@@ -258,6 +258,10 @@ private:
Integer(word value, unsigned int length);
static const Integer zero;
static const Integer one;
static const Integer two;
int PositiveCompare(const Integer& t) const;
friend void PositiveAdd(Integer& sum, const Integer& a, const Integer& b);
friend void PositiveSubtract(Integer& diff, const Integer& a,
......
......@@ -2844,23 +2844,24 @@ unsigned int Integer::Encode(byte* output, unsigned int outputLen,
}
const Integer Integer::zero(1,2);
const Integer &Integer::Zero()
{
static const Integer zero;
return zero;
}
const Integer Integer::one(1,2);
const Integer &Integer::One()
{
static const Integer one(1,2);
return one;
}
const Integer Integer::two(1,2);
const Integer &Integer::Two()
{
static const Integer two(2,2);
return two;
}
......
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