summaryrefslogtreecommitdiff
path: root/ndb
diff options
context:
space:
mode:
authorunknown <tomas@mc05.(none)>2004-05-28 11:23:44 +0200
committerunknown <tomas@mc05.(none)>2004-05-28 11:23:44 +0200
commit6bcb78e700f384ea11f57be1cd8edc003ecd21d8 (patch)
tree978a28acd01b1b56ec637a961b7fe44693d41cdc /ndb
parent57d9bf4c529c9f580aa91400aa2a3f2a051ccb18 (diff)
parentbe567b5964f0f14abaad07a1789306e31422fa97 (diff)
downloadmariadb-git-6bcb78e700f384ea11f57be1cd8edc003ecd21d8.tar.gz
Merge tulin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mc05.(none):/space2/tomas/mysql-4.1 ndb/src/Makefile_old: Auto merged
Diffstat (limited to 'ndb')
-rw-r--r--ndb/src/Makefile_old1
-rw-r--r--ndb/src/newtonapi/dba_schema.cpp19
2 files changed, 11 insertions, 9 deletions
diff --git a/ndb/src/Makefile_old b/ndb/src/Makefile_old
index 72333aae890..cd33563ddc1 100644
--- a/ndb/src/Makefile_old
+++ b/ndb/src/Makefile_old
@@ -7,6 +7,7 @@ DIRS := \
ndbapi \
mgmsrv \
mgmapi \
+ newtonapi \
rep \
mgmclient \
cw \
diff --git a/ndb/src/newtonapi/dba_schema.cpp b/ndb/src/newtonapi/dba_schema.cpp
index 9fa99cb5d43..1bf21f1fe80 100644
--- a/ndb/src/newtonapi/dba_schema.cpp
+++ b/ndb/src/newtonapi/dba_schema.cpp
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "dba_internal.hpp"
+#include "NdbSchemaCon.hpp"
static bool getNdbAttr(DBA_DataTypes_t,
Size_t,
@@ -31,7 +32,7 @@ DBA_CreateTable(const char* TableName,
if(DBA_TableExists(TableName))
return DBA_NO_ERROR;
- NdbSchemaCon * schemaCon = DBA__TheNdb->startSchemaTransaction();
+ NdbSchemaCon * schemaCon = NdbSchemaCon::startSchemaTrans(DBA__TheNdb);
if(schemaCon == 0){
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: No schema transaction");
@@ -39,8 +40,8 @@ DBA_CreateTable(const char* TableName,
}
NdbSchemaOp * schemaOp = schemaCon->getNdbSchemaOp();
- if(schemaOp == 0){
- DBA__TheNdb->closeSchemaTransaction(schemaCon);
+ if(schemaOp == 0){
+ NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: No schema op");
return DBA_NDB_ERROR;
@@ -56,7 +57,7 @@ DBA_CreateTable(const char* TableName,
80,
1,
false) == -1){
- DBA__TheNdb->closeSchemaTransaction(schemaCon);
+ NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: Create table failed");
return DBA_NDB_ERROR;
@@ -71,7 +72,7 @@ DBA_CreateTable(const char* TableName,
&attrSize,
&arraySize,
&attrType)){
- DBA__TheNdb->closeSchemaTransaction(schemaCon);
+ NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_APPLICATION_ERROR, 0,
"Invalid datatype/size combination");
return DBA_APPLICATION_ERROR;
@@ -82,7 +83,7 @@ DBA_CreateTable(const char* TableName,
attrSize,
arraySize,
attrType) == -1){
- DBA__TheNdb->closeSchemaTransaction(schemaCon);
+ NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: Create attribute failed");
return DBA_NDB_ERROR;
@@ -90,14 +91,14 @@ DBA_CreateTable(const char* TableName,
}
if(schemaCon->execute() == -1){
- DBA__TheNdb->closeSchemaTransaction(schemaCon);
+ NdbSchemaCon::closeSchemaTrans(schemaCon);
DBA__SetLatestError(DBA_NDB_ERROR, 0,
"Internal NDB error: Execute schema failed");
return DBA_NDB_ERROR;
}
- DBA__TheNdb->closeSchemaTransaction(schemaCon);
-
+ NdbSchemaCon::closeSchemaTrans(schemaCon);
+
return DBA_NO_ERROR;
}