#At file:///Users/mz/mysql/ndb-7.1-opt64/ based on revid:martin.zaun@stripped
3868 Martin Zaun 2010-10-19
crund - preparations for code sharing between crund and tws.
modified:
storage/ndb/test/crund/Makefile
storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java
storage/ndb/test/crund/src/com/mysql/cluster/crund/CrundDriver.java
storage/ndb/test/crund/src/com/mysql/cluster/crund/Driver.java
storage/ndb/test/crund/src/com/mysql/cluster/crund/JdbcLoad.java
storage/ndb/test/crund/src/com/mysql/cluster/crund/JpaLoad.java
storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbBase.java
storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java
storage/ndb/test/crund/src/crundndb/CrundDriver.cpp
storage/ndb/test/crund/src/crundndb/CrundDriver.hpp
storage/ndb/test/crund/src/crundndb/Driver.cpp
storage/ndb/test/crund/src/crundndb/Driver.hpp
storage/ndb/test/crund/src/crundndb/Makefile
storage/ndb/test/crund/src/crundndb/NdbApiDriver.cpp
storage/ndb/test/crund/src/crundndb/com_mysql_cluster_crund_NdbApiLoad.cpp
=== modified file 'storage/ndb/test/crund/Makefile'
--- a/storage/ndb/test/crund/Makefile 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/Makefile 2010-10-19 22:56:45 +0000
@@ -32,8 +32,10 @@ distclean:
# read the generic settings
include env.properties
-run.driver: $(SRC)/crundndb/Driver
- LD_LIBRARY_PATH=${NDB_LIBDIR} $(SRC)/crundndb/Driver \
+# not sure if needed:
+# LD_LIBRARY_PATH=${NDB_LIBDIR}:$(SRC)/crundndb/Driver
+run.driver: $(SRC)/crundndb/NdbApiDriver
+ $(SRC)/crundndb/NdbApiDriver \
-p crundRun.properties -p crundNdbapi.properties
#
#run.driver:
=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java 2010-10-05 08:48:30 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/ClusterjLoad.java 2010-10-19 22:56:45 +0000
@@ -41,11 +41,10 @@ import java.util.Set;
*/
public class ClusterjLoad extends CrundDriver {
- // ----------------------------------------------------------------------
- // ClusterJ resources
- // ----------------------------------------------------------------------
-
+ // ClusterJ settings
protected String mgmdConnect;
+
+ // ClusterJ resources
protected SessionFactory sessionFactory;
protected Session session;
=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/CrundDriver.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/CrundDriver.java 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/CrundDriver.java 2010-10-19 22:56:45 +0000
@@ -57,6 +57,7 @@ import java.io.InputStream;
abstract public class CrundDriver extends Driver {
// benchmark settings
+ protected boolean renewConnection;
protected boolean renewOperations;
protected boolean logSumOfOps;
protected boolean allowExtendedPC;
@@ -76,6 +77,16 @@ abstract public class CrundDriver extend
// benchmark intializers/finalizers
// ----------------------------------------------------------------------
+ protected void init() throws Exception {
+ super.init();
+ // do work here
+ }
+
+ protected void close() throws Exception {
+ // do work here
+ super.close();
+ }
+
protected void initProperties() {
super.initProperties();
@@ -84,6 +95,7 @@ abstract public class CrundDriver extend
final StringBuilder msg = new StringBuilder();
final String eol = System.getProperty("line.separator");
+ renewConnection = parseBoolean("renewConnection", false);
renewOperations = parseBoolean("renewOperations", false);
logSumOfOps = parseBoolean("logSumOfOps", true);
allowExtendedPC = parseBoolean("allowExtendedPC", false);
@@ -167,6 +179,7 @@ abstract public class CrundDriver extend
out.println();
out.println("crund settings ...");
+ out.println("renewConnection: " + renewConnection);
out.println("renewOperations: " + renewOperations);
out.println("logSumOfOps: " + logSumOfOps);
out.println("allowExtendedPC: " + allowExtendedPC);
@@ -206,6 +219,7 @@ abstract public class CrundDriver extend
abstract protected void closeOperations() throws Exception;
protected void runTests() throws Exception {
+ out.println();
initConnection();
initOperations();
@@ -214,7 +228,7 @@ abstract public class CrundDriver extend
for (int i = aStart; i <= aEnd; i *= aScale) {
for (int j = bStart; j <= bEnd; j *= bScale) {
try {
- runOperations(i, j);
+ runLoads(i, j);
} catch (Exception ex) {
// already in rollback for database/orm exceptions
throw ex;
@@ -231,7 +245,7 @@ abstract public class CrundDriver extend
closeConnection();
}
- protected void runOperations(int countA, int countB) throws Exception {
+ protected void runLoads(int countA, int countB) throws Exception {
out.println();
out.println("------------------------------------------------------------");
@@ -265,16 +279,7 @@ abstract public class CrundDriver extend
}
clearData();
- // run operations
- for (Op op : ops) {
- // pre-tx cleanup
- if (!allowExtendedPC) {
- // effectively prevent caching beyond Tx scope by clearing
- // any data/result caches before the next transaction
- clearPersistenceContext();
- }
- runOp(op, countA, countB);
- }
+ runOperations(countA, countB);
if (logSumOfOps) {
out.println();
@@ -298,10 +303,10 @@ abstract public class CrundDriver extend
logHeader = false;
}
if (logRealTime) {
- rtimes.append(endl);
if (logSumOfOps) {
rtimes.append("\t" + ta);
}
+ rtimes.append(endl);
}
if (logMemUsage) {
if (logSumOfOps) {
@@ -311,12 +316,24 @@ abstract public class CrundDriver extend
}
}
+ protected void runOperations(int countA, int countB) throws Exception {
+ for (Op op : ops) {
+ // pre-tx cleanup
+ if (!allowExtendedPC) {
+ // effectively prevent caching beyond Tx scope by clearing
+ // any data/result caches before the next transaction
+ clearPersistenceContext();
+ }
+ runOp(op, countA, countB);
+ }
+ }
+
protected void runOp(Op op, int countA, int countB) throws Exception {
final String name = op.getName();
if (!exclude.contains(name)) {
begin(name);
op.run(countA, countB);
- commit(name);
+ finish(name);
}
}
@@ -324,7 +341,22 @@ abstract public class CrundDriver extend
static protected final void verify(boolean cond) {
//assert (cond);
if (!cond)
- throw new RuntimeException("wrong data; verification failed");
+ throw new RuntimeException("data verification failed.");
+ }
+
+ static protected final void verify(int exp, int act) {
+ if (exp != act)
+ throw new RuntimeException("data verification failed:"
+ + " expected = " + exp
+ + ", actual = " + act);
+ }
+
+ static protected final void verify(String exp, String act) {
+ if ((exp == null && act != null)
+ || (exp != null && !exp.equals(act)))
+ throw new RuntimeException("data verification failed:"
+ + " expected = '" + exp + "'"
+ + ", actual = '" + act + "'");
}
// ----------------------------------------------------------------------
@@ -388,4 +420,13 @@ abstract public class CrundDriver extend
= { string1, string2, string3, string4, string5, string6, string7 };
static final protected byte[][] bytes
= { bytes1, bytes2, bytes3, bytes4, bytes5, bytes6, bytes7 };
+
+ // ----------------------------------------------------------------------
+ // datastore operations
+ // ----------------------------------------------------------------------
+
+ abstract protected void initConnection() throws Exception;
+ abstract protected void closeConnection() throws Exception;
+ abstract protected void clearPersistenceContext() throws Exception;
+ abstract protected void clearData() throws Exception;
}
=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/Driver.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/Driver.java 2010-10-05 08:48:30 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/Driver.java 2010-10-19 22:56:45 +0000
@@ -71,7 +71,6 @@ abstract public class Driver {
protected boolean logRealTime;
protected boolean logMemUsage;
protected boolean includeFullGC;
- protected boolean renewConnection;
protected int warmupRuns;
protected int hotRuns;
@@ -147,41 +146,48 @@ abstract public class Driver {
try {
init();
- // warmup runs
- for (int i = 0; i < warmupRuns; i++) {
- runTests();
- }
+ if (warmupRuns > 0) {
+ out.println();
+ out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+ out.println("warmup runs ...");
+ out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
- // truncate log file, reset log buffers
- out.println();
- out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
- out.println("start logging results ...");
- out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
- out.println();
- logHeader = true;
- header = new StringBuilder();
- rtimes = new StringBuilder();
- musage = new StringBuilder();
- closeLogFile();
- openLogFile();
-
- // hot runs
- for (int i = 0; i < hotRuns; i++) {
- runTests();
- }
+ for (int i = 0; i < warmupRuns; i++) {
+ runTests();
+ }
- // write log buffers
- if (logRealTime) {
- log.println(descr + ", rtime[ms]"
- + header.toString() + endl
- + rtimes.toString() + endl + endl + endl);
- }
- if (logMemUsage) {
- log.println(descr + ", net musage[KiB]"
- + header.toString() + endl
- + musage.toString() + endl + endl + endl);
+ // truncate log file, reset log buffers
+ closeLogFile();
+ openLogFile();
+ header = new StringBuilder();
+ rtimes = new StringBuilder();
+ musage = new StringBuilder();
+ logHeader = true;
}
+
+ if (hotRuns > 0) {
+ out.println();
+ out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+ out.println("hot runs ...");
+ out.println("++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++");
+
+ for (int i = 0; i < hotRuns; i++) {
+ runTests();
+ }
+ // write log buffers
+ if (logRealTime) {
+ log.println(descr + ", rtime[ms]"
+ + header.toString() + endl
+ + rtimes.toString() + endl + endl + endl);
+ }
+ if (logMemUsage) {
+ log.println(descr + ", net musage[KiB]"
+ + header.toString() + endl
+ + musage.toString() + endl + endl + endl);
+ }
+ }
+
close();
} catch (Exception ex) {
// end the program regardless of threads
@@ -262,6 +268,7 @@ abstract public class Driver {
musage = null;
closeLogFile();
+ props.clear();
}
// loads the benchmark's properties from properties files
@@ -312,7 +319,6 @@ abstract public class Driver {
logRealTime = parseBoolean("logRealTime", true);
logMemUsage = parseBoolean("logMemUsage", false);
includeFullGC = parseBoolean("includeFullGC", false);
- renewConnection = parseBoolean("renewConnection", false);
warmupRuns = parseInt("warmupRuns", 0);
if (warmupRuns < 0) {
@@ -341,7 +347,6 @@ abstract public class Driver {
out.println("logRealTime: " + logRealTime);
out.println("logMemUsage: " + logMemUsage);
out.println("includeFullGC: " + includeFullGC);
- out.println("renewConnection: " + renewConnection);
out.println("warmupRuns: " + warmupRuns);
out.println("hotRuns: " + hotRuns);
}
@@ -370,7 +375,7 @@ abstract public class Driver {
abstract protected void runTests() throws Exception;
- protected void begin(String name) throws Exception {
+ protected void begin(String name) {
out.println();
out.println(name);
@@ -387,7 +392,7 @@ abstract public class Driver {
}
}
- protected void commit(String name) throws Exception {
+ protected void finish(String name) {
// attempt one full GC, before timing tx end
if (includeFullGC) {
rt.gc();
@@ -421,13 +426,4 @@ abstract public class Driver {
if (logHeader)
header.append("\t" + name);
}
-
- // ----------------------------------------------------------------------
- // datastore operations
- // ----------------------------------------------------------------------
-
- abstract protected void initConnection() throws Exception;
- abstract protected void closeConnection() throws Exception;
- abstract protected void clearPersistenceContext() throws Exception;
- abstract protected void clearData() throws Exception;
}
=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/JdbcLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/JdbcLoad.java 2010-10-05 08:48:30 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/JdbcLoad.java 2010-10-19 22:56:45 +0000
@@ -35,15 +35,14 @@ import java.sql.ResultSet;
*/
public class JdbcLoad extends CrundDriver {
- // ----------------------------------------------------------------------
- // JDBC resources
- // ----------------------------------------------------------------------
-
+ // JDBC settings
protected String driver;
protected String url;
protected String user;
protected String password;
protected boolean autoCommit;
+
+ // JDBC resources
protected Connection conn;
protected PreparedStatement delAllA;
protected PreparedStatement delAllB0;
=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/JpaLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/JpaLoad.java 2010-10-05 08:48:30 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/JpaLoad.java 2010-10-19 22:56:45 +0000
@@ -37,10 +37,7 @@ import javax.persistence.PersistenceCont
*/
public class JpaLoad extends CrundDriver {
- // ----------------------------------------------------------------------
- // JPA resources
- // ----------------------------------------------------------------------
-
+ // JPA settings
protected String driver;
protected String url;
protected String user;
@@ -49,6 +46,8 @@ public class JpaLoad extends CrundDriver
protected String brokerFactory;
protected String ndbConnectString;
protected String ndbDatabase;
+
+ // JPA resources
protected EntityManagerFactory emf;
protected EntityManager em;
protected Query delAllA;
=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbBase.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbBase.java 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbBase.java 2010-10-19 22:56:45 +0000
@@ -22,7 +22,7 @@ package com.mysql.cluster.crund;
abstract public class NdbBase extends CrundDriver {
- // NDB resources
+ // NDB settings
protected String mgmdConnect;
protected String catalog;
protected String schema;
@@ -30,8 +30,8 @@ abstract public class NdbBase extends Cr
// so far, there's no NDB support for caching data beyond Tx scope
protected void clearPersistenceContext() throws Exception {}
- // ----------------------------------------------------------------------
- // JDBC intializers/finalizers
+ // ----------------------------------------------------------------------
+ // NDB Base intializers/finalizers
// ----------------------------------------------------------------------
protected void initProperties() {
=== modified file 'storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java'
--- a/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java 2010-10-05 08:48:30 +0000
+++ b/storage/ndb/test/crund/src/com/mysql/cluster/crund/NdbJTieLoad.java 2010-10-19 22:56:45 +0000
@@ -87,12 +87,11 @@ public class NdbJTieLoad extends NdbBase
loadSystemLibrary("ndbclient");
// instantiate NDB cluster singleton
- out.println();
- out.print("creating cluster conn ...");
+ out.print("creating cluster connection ...");
out.flush();
mgmd = Ndb_cluster_connection.create(mgmdConnect);
assert mgmd != null;
- out.println(" [ok, mgmd=" + mgmd + "]");
+ out.println(" [ok]");
// connect to cluster management node (ndb_mgmd)
out.print("connecting to mgmd ...");
=== modified file 'storage/ndb/test/crund/src/crundndb/CrundDriver.cpp'
--- a/storage/ndb/test/crund/src/crundndb/CrundDriver.cpp 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/src/crundndb/CrundDriver.cpp 2010-10-19 22:56:45 +0000
@@ -43,6 +43,18 @@ using utils::toString;
// ----------------------------------------------------------------------
void
+CrundDriver::init() {
+ Driver::init();
+ // do work here
+}
+
+void
+CrundDriver::close() {
+ // do work here
+ Driver::close();
+}
+
+void
CrundDriver::initProperties() {
Driver::initProperties();
@@ -50,6 +62,7 @@ CrundDriver::initProperties() {
ostringstream msg;
+ renewConnection = toBool(props[L"renewConnection"], false);
renewOperations = toBool(props[L"renewOperations"], false);
string lm = toString(props[L"lockMode"]);
@@ -172,6 +185,7 @@ CrundDriver::printProperties() {
cout.flags(ios_base::boolalpha);
cout << endl << "crund settings ..." << endl;
+ cout << "renewConnection: " << renewConnection << endl;
cout << "renewOperations: " << renewOperations << endl;
cout << "lockMode: " << toStr(lockMode) << endl;
cout << "logSumOfOps: " << logSumOfOps << endl;
@@ -195,6 +209,7 @@ CrundDriver::printProperties() {
void
CrundDriver::runTests() {
+ cout << endl;
initConnection();
initOperations();
@@ -209,7 +224,6 @@ CrundDriver::runTests() {
cout << endl
<< "------------------------------------------------------------" << endl
<< endl;
-
clearData();
closeOperations();
closeConnection();
=== modified file 'storage/ndb/test/crund/src/crundndb/CrundDriver.hpp'
--- a/storage/ndb/test/crund/src/crundndb/CrundDriver.hpp 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/src/crundndb/CrundDriver.hpp 2010-10-19 22:56:45 +0000
@@ -41,6 +41,7 @@ protected:
static const char* toStr(LockMode mode);
enum XMode { SINGLE, BULK, BATCH }; // XXX not used yet
static const char* toStr(XMode mode); // XXX not used yet
+ bool renewConnection;
bool renewOperations;
LockMode lockMode;
bool logSumOfOps;
@@ -58,6 +59,8 @@ protected:
set< string > exclude;
// benchmark intializers/finalizers
+ virtual void init();
+ virtual void close();
virtual void initProperties();
virtual void printProperties();
@@ -81,6 +84,12 @@ protected:
virtual void runLoads(int countA, int countB);
virtual void runOperations(int countA, int countB);
virtual void runOp(const Op& op, int countA, int countB);
+
+ // datastore operations
+ virtual void initConnection() = 0;
+ virtual void closeConnection() = 0;
+ //virtual void clearPersistenceContext() = 0; // not used
+ virtual void clearData() = 0;
};
#endif // CrundDriver_hpp
=== modified file 'storage/ndb/test/crund/src/crundndb/Driver.cpp'
--- a/storage/ndb/test/crund/src/crundndb/Driver.cpp 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/src/crundndb/Driver.cpp 2010-10-19 22:56:45 +0000
@@ -130,6 +130,7 @@ Driver::run() {
openLogFile();
header.rdbuf()->str("");
rtimes.rdbuf()->str("");
+ ctimes.rdbuf()->str("");
logHeader = true;
}
@@ -144,9 +145,16 @@ Driver::run() {
}
// write log buffers
- log << descr << ", rtime[ms]"
- << header.rdbuf()->str() << endl
- << rtimes.rdbuf()->str() << endl << endl << endl;
+ if (logRealTime) {
+ log << descr << ", rtime[ms]"
+ << header.rdbuf()->str() << endl
+ << rtimes.rdbuf()->str() << endl << endl << endl;
+ }
+ if (logCpuTime) {
+ log << descr << ", ctime[ms]"
+ << header.rdbuf()->str() << endl
+ << ctimes.rdbuf()->str() << endl << endl << endl;
+ }
}
close();
@@ -193,7 +201,6 @@ Driver::initProperties() {
logRealTime = toBool(props[L"logRealTime"], true);
logCpuTime = toBool(props[L"logCpuTime"], false);
- renewConnection = toBool(props[L"renewConnection"], false);
warmupRuns = toInt(props[L"warmupRuns"], 0, -1);
if (warmupRuns < 0) {
@@ -227,7 +234,6 @@ Driver::printProperties() {
cout << endl << "driver settings ..." << endl;
cout << "logRealTime: " << logRealTime << endl;
cout << "logCpuTime: " << logCpuTime << endl;
- cout << "renewConnection: " << renewConnection << endl;
cout << "warmupRuns: " << warmupRuns << endl;
cout << "hotRuns: " << hotRuns << endl;
=== modified file 'storage/ndb/test/crund/src/crundndb/Driver.hpp'
--- a/storage/ndb/test/crund/src/crundndb/Driver.hpp 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/src/crundndb/Driver.hpp 2010-10-19 22:56:45 +0000
@@ -72,7 +72,6 @@ protected:
Properties props;
bool logRealTime;
bool logCpuTime;
- bool renewConnection;
int warmupRuns;
int hotRuns;
@@ -100,12 +99,6 @@ protected:
virtual void runTests() = 0;
virtual void begin(const string& name);
virtual void commit(const string& name);
-
- // datastore operations
- virtual void initConnection() = 0;
- virtual void closeConnection() = 0;
- //virtual void clearPersistenceContext() = 0; // not used
- virtual void clearData() = 0;
};
#endif // Driver_hpp
=== modified file 'storage/ndb/test/crund/src/crundndb/Makefile'
--- a/storage/ndb/test/crund/src/crundndb/Makefile 2010-10-05 08:48:30 +0000
+++ b/storage/ndb/test/crund/src/crundndb/Makefile 2010-10-19 22:56:45 +0000
@@ -54,14 +54,18 @@ com_mysql_cluster_crund_NdbApiLoad.h:
# $(API_PKG_PATH)/NdbApiLoad.java
# $(COMPILE.java) $<
+# not sure if needed:
+# LD_LIBRARY_PATH=${NDB_LIBDIR}:./Driver
run.driver: NdbApiDriver
- LD_LIBRARY_PATH=${NDB_LIBDIR} ./NdbApiDriver \
+ ./NdbApiDriver \
-p ../../crundRun.properties -p ../../crundNdbapi.properties
# for JVM processes, try running valgrind with
# --smc-check=all --trace-children=yes --leak-check=full --show-reachable=yes
+# not sure if needed:
+# LD_LIBRARY_PATH=${NDB_LIBDIR}:./Driver
valgrind.driver: NdbApiDriver
- LD_LIBRARY_PATH=${NDB_LIBDIR} valgrind \
+ valgrind \
--leak-check=full --show-reachable=yes --trace-children=yes \
./NdbApiDriver \
-p ../../crundRun.properties -p ../../crundNdbapi.properties
=== modified file 'storage/ndb/test/crund/src/crundndb/NdbApiDriver.cpp'
--- a/storage/ndb/test/crund/src/crundndb/NdbApiDriver.cpp 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/src/crundndb/NdbApiDriver.cpp 2010-10-19 22:56:45 +0000
@@ -80,14 +80,14 @@ NdbApiDriver::init() {
// initialize the benchmark's resources
ops = new CrundNdbApiOperations();
- assert (!mgmdConnect.empty());
+ assert(!mgmdConnect.empty());
ops->init(mgmdConnect.c_str());
}
void
NdbApiDriver::close() {
// release the benchmark's resources
- assert (!mgmdConnect.empty());
+ assert(ops);
ops->close();
delete ops;
ops = NULL;
@@ -170,7 +170,7 @@ struct NdbApiDriver::ADelAllOp : Op {
virtual void run(int countA, int countB) const {
int count;
ops->delByScan(ops->model->table_A, count, OB);
- assert (count == countA);
+ assert(count == countA);
}
};
@@ -183,7 +183,7 @@ struct NdbApiDriver::B0DelAllOp : Op {
virtual void run(int countA, int countB) const {
int count;
ops->delByScan(ops->model->table_B0, count, OB);
- assert (count == countB);
+ assert(count == countB);
}
};
=== modified file 'storage/ndb/test/crund/src/crundndb/com_mysql_cluster_crund_NdbApiLoad.cpp'
--- a/storage/ndb/test/crund/src/crundndb/com_mysql_cluster_crund_NdbApiLoad.cpp 2010-10-08 11:17:35 +0000
+++ b/storage/ndb/test/crund/src/crundndb/com_mysql_cluster_crund_NdbApiLoad.cpp 2010-10-19 22:56:45 +0000
@@ -40,7 +40,7 @@ Java_com_mysql_cluster_crund_NdbApiLoad_
jstring mgmd_jstr)
{
TRACE("ndbinit()");
- assert (mgmd_jstr);
+ assert(mgmd_jstr);
// location of cluster management server (ndb_mgmd)
// get a native string from the Java string
@@ -77,8 +77,8 @@ Java_com_mysql_cluster_crund_NdbApiLoad_
jint defaultLockMode)
{
TRACE("initConnection()");
- assert (catalog_jstr);
- assert (schema_jstr);
+ assert(catalog_jstr);
+ assert(schema_jstr);
// get native strings from the Java strings
const char* catalog_cstr = env->GetStringUTFChars(catalog_jstr, NULL);
@@ -118,7 +118,7 @@ Java_com_mysql_cluster_crund_NdbApiLoad_
TRACE("delAllA()");
int count;
ops->delByScan(ops->model->table_A, count, batch == JNI_TRUE);
- assert (count == count_A);
+ assert(count == count_A);
}
JNIEXPORT void JNICALL
@@ -131,7 +131,7 @@ Java_com_mysql_cluster_crund_NdbApiLoad_
TRACE("delAllB0()");
int count;
ops->delByScan(ops->model->table_B0, count, batch == JNI_TRUE);
- assert (count == count_B);
+ assert(count == count_B);
}
JNIEXPORT void JNICALL
Attachment: [text/bzr-bundle] bzr/martin.zaun@oracle.com-20101019225645-ur9ptdah15cb0r3z.bundle
| Thread |
|---|
| • bzr commit into mysql-5.1-telco-7.1 branch (martin.zaun:3868) | Martin Zaun | 20 Oct |