At http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3
------------------------------------------------------------
revno: 206
revision-id: mtaylor@stripped
parent: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: telco-6.3
timestamp: Thu 2007-11-01 14:35:45 +0000
message:
Merged in devel changes.
modified:
java/com/mysql/cluster/ndbj/Ndb.java ndb.java-20070517181935-98huwjarzuh25b30-2
swig/Ndb.i ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
swig/NdbClusterConnection.i ndb_cluster_connecti-20070228021421-qkr4cbpxymyqdrf3-6
------------------------------------------------------------
revno: 192.1.25.1.11
revision-id: mtaylor@stripped
parent: mtaylor@stripped
committer: Monty Taylor <mtaylor@stripped>
branch nick: ndbjmerge
timestamp: Thu 2007-11-01 14:23:46 +0000
message:
Force Ndb::init() to be called in createNdb(). Made init() be a no-op and deprecated
it.
modified:
java/com/mysql/cluster/ndbj/Ndb.java ndb.java-20070517181935-98huwjarzuh25b30-2
swig/Ndb.i ndb.i-20070228021421-qkr4cbpxymyqdrf3-1
swig/NdbClusterConnection.i
ndb_cluster_connecti-20070228021421-qkr4cbpxymyqdrf3-6
=== modified file 'java/com/mysql/cluster/ndbj/Ndb.java'
--- a/java/com/mysql/cluster/ndbj/Ndb.java 2007-10-31 15:27:30 +0000
+++ b/java/com/mysql/cluster/ndbj/Ndb.java 2007-11-01 14:35:45 +0000
@@ -49,6 +49,7 @@
* @throws NdbApiException if an error occured in the native library
* @throws IllegalStateException if the close method has already been called on the
object.
*/
+ @Deprecated
public abstract int init(int maxNumberOfTransactions) throws NdbApiException;
/**
=== modified file 'swig/Ndb.i'
--- a/swig/Ndb.i 2007-11-01 11:01:24 +0000
+++ b/swig/Ndb.i 2007-11-01 14:35:45 +0000
@@ -76,14 +76,14 @@
- %ndbexception("NdbApiException") init {
+/* %ndbexception("NdbApiException") init {
$action
if (result) {
NDB_exception(NdbApiException,"Cluster not ready");
}
}
int init(int maxNoOfTransactions = 4);
-
+*/
/* %ndbexception("NdbApiException") getAutoIncrementValue {
$action
if (result == 0) {
@@ -105,6 +105,19 @@
%extend Ndb {
public:
+
+
+ %ndbexception("NdbApiException") init {
+ $action
+ if (result) {
+ NDB_exception(NdbApiException,"Cluster not ready");
+ }
+ }
+ int init(int maxNoOfTransactions = 4) {
+ /* This is becoming a no-op, since we're forcing it */
+ return 0;
+ }
+
%ndbexception("NdbApiException") {
$action
if (result==(Uint64)-1) {
=== modified file 'swig/NdbClusterConnection.i'
--- a/swig/NdbClusterConnection.i 2007-10-28 00:46:51 +0000
+++ b/swig/NdbClusterConnection.i 2007-11-01 14:35:45 +0000
@@ -109,9 +109,13 @@
NDB_exception(NdbApiException,"Couldn't allocate an Ndb object");
}
}
- Ndb* createNdb(const char* aCatalogName="", const char* aSchemaName="def", int
initThreads = 0) {
+ %contract createNdb(const char* aCatalogName, const char* aSchemaName, Int32
initThreads) {
+ require:
+ initThreads > 0;
+ }
+ Ndb* createNdb(const char* aCatalogName="", const char* aSchemaName="def", Int32
initThreads = 4) {
Ndb * theNdb = new Ndb(self,aCatalogName,aSchemaName);
- if ((theNdb!=NULL) && (initThreads >0)) {
+ if (theNdb!=NULL) {
int ret = theNdb->init(initThreads);
if ( ret ) {
delete theNdb;
@@ -120,9 +124,13 @@
}
return theNdb;
}
- Ndb* createNdb(const char* aCatalogName, int initThreads = 0) {
+ %contract createNdb(const char* aCatalogName, Int32 initThreads) {
+ require:
+ initThreads > 0;
+ }
+ Ndb* createNdb(const char* aCatalogName, Int32 initThreads = 4) {
Ndb * theNdb = new Ndb(self,aCatalogName);
- if ((theNdb!=NULL) && (initThreads > 0)) {
+ if (theNdb!=NULL) {
int ret = theNdb->init(initThreads);
if ( ret ) {
delete theNdb;
| Thread |
|---|
| • Rev 206: Merged in devel changes. in http://bazaar.launchpad.net/~ndb-connectors/ndb-connectors/telco-6.3 | Monty Taylor | 1 Nov |