Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
04e96ca8
Commit
04e96ca8
authored
May 28, 2004
by
monty@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/home/my/mysql-4.1
parents
4b6a057c
54be4cfe
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
9 deletions
+11
-9
ndb/src/Makefile
ndb/src/Makefile
+1
-0
ndb/src/newtonapi/dba_schema.cpp
ndb/src/newtonapi/dba_schema.cpp
+10
-9
No files found.
ndb/src/Makefile
View file @
04e96ca8
...
@@ -7,6 +7,7 @@ DIRS := \
...
@@ -7,6 +7,7 @@ DIRS := \
ndbapi
\
ndbapi
\
mgmsrv
\
mgmsrv
\
mgmapi
\
mgmapi
\
newtonapi
\
rep
\
rep
\
mgmclient
\
mgmclient
\
cw
\
cw
\
...
...
ndb/src/newtonapi/dba_schema.cpp
View file @
04e96ca8
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "dba_internal.hpp"
#include "dba_internal.hpp"
#include "NdbSchemaCon.hpp"
static
bool
getNdbAttr
(
DBA_DataTypes_t
,
static
bool
getNdbAttr
(
DBA_DataTypes_t
,
Size_t
,
Size_t
,
...
@@ -31,7 +32,7 @@ DBA_CreateTable(const char* TableName,
...
@@ -31,7 +32,7 @@ DBA_CreateTable(const char* TableName,
if
(
DBA_TableExists
(
TableName
))
if
(
DBA_TableExists
(
TableName
))
return
DBA_NO_ERROR
;
return
DBA_NO_ERROR
;
NdbSchemaCon
*
schemaCon
=
DBA__TheNdb
->
startSchemaTransaction
(
);
NdbSchemaCon
*
schemaCon
=
NdbSchemaCon
::
startSchemaTrans
(
DBA__TheNdb
);
if
(
schemaCon
==
0
){
if
(
schemaCon
==
0
){
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
"Internal NDB error: No schema transaction"
);
"Internal NDB error: No schema transaction"
);
...
@@ -40,7 +41,7 @@ DBA_CreateTable(const char* TableName,
...
@@ -40,7 +41,7 @@ DBA_CreateTable(const char* TableName,
NdbSchemaOp
*
schemaOp
=
schemaCon
->
getNdbSchemaOp
();
NdbSchemaOp
*
schemaOp
=
schemaCon
->
getNdbSchemaOp
();
if
(
schemaOp
==
0
){
if
(
schemaOp
==
0
){
DBA__TheNdb
->
closeSchemaTransaction
(
schemaCon
);
NdbSchemaCon
::
closeSchemaTrans
(
schemaCon
);
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
"Internal NDB error: No schema op"
);
"Internal NDB error: No schema op"
);
return
DBA_NDB_ERROR
;
return
DBA_NDB_ERROR
;
...
@@ -56,7 +57,7 @@ DBA_CreateTable(const char* TableName,
...
@@ -56,7 +57,7 @@ DBA_CreateTable(const char* TableName,
80
,
80
,
1
,
1
,
false
)
==
-
1
){
false
)
==
-
1
){
DBA__TheNdb
->
closeSchemaTransaction
(
schemaCon
);
NdbSchemaCon
::
closeSchemaTrans
(
schemaCon
);
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
"Internal NDB error: Create table failed"
);
"Internal NDB error: Create table failed"
);
return
DBA_NDB_ERROR
;
return
DBA_NDB_ERROR
;
...
@@ -71,7 +72,7 @@ DBA_CreateTable(const char* TableName,
...
@@ -71,7 +72,7 @@ DBA_CreateTable(const char* TableName,
&
attrSize
,
&
attrSize
,
&
arraySize
,
&
arraySize
,
&
attrType
)){
&
attrType
)){
DBA__TheNdb
->
closeSchemaTransaction
(
schemaCon
);
NdbSchemaCon
::
closeSchemaTrans
(
schemaCon
);
DBA__SetLatestError
(
DBA_APPLICATION_ERROR
,
0
,
DBA__SetLatestError
(
DBA_APPLICATION_ERROR
,
0
,
"Invalid datatype/size combination"
);
"Invalid datatype/size combination"
);
return
DBA_APPLICATION_ERROR
;
return
DBA_APPLICATION_ERROR
;
...
@@ -82,7 +83,7 @@ DBA_CreateTable(const char* TableName,
...
@@ -82,7 +83,7 @@ DBA_CreateTable(const char* TableName,
attrSize
,
attrSize
,
arraySize
,
arraySize
,
attrType
)
==
-
1
){
attrType
)
==
-
1
){
DBA__TheNdb
->
closeSchemaTransaction
(
schemaCon
);
NdbSchemaCon
::
closeSchemaTrans
(
schemaCon
);
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
"Internal NDB error: Create attribute failed"
);
"Internal NDB error: Create attribute failed"
);
return
DBA_NDB_ERROR
;
return
DBA_NDB_ERROR
;
...
@@ -90,13 +91,13 @@ DBA_CreateTable(const char* TableName,
...
@@ -90,13 +91,13 @@ DBA_CreateTable(const char* TableName,
}
}
if
(
schemaCon
->
execute
()
==
-
1
){
if
(
schemaCon
->
execute
()
==
-
1
){
DBA__TheNdb
->
closeSchemaTransaction
(
schemaCon
);
NdbSchemaCon
::
closeSchemaTrans
(
schemaCon
);
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
DBA__SetLatestError
(
DBA_NDB_ERROR
,
0
,
"Internal NDB error: Execute schema failed"
);
"Internal NDB error: Execute schema failed"
);
return
DBA_NDB_ERROR
;
return
DBA_NDB_ERROR
;
}
}
DBA__TheNdb
->
closeSchemaTransaction
(
schemaCon
);
NdbSchemaCon
::
closeSchemaTrans
(
schemaCon
);
return
DBA_NO_ERROR
;
return
DBA_NO_ERROR
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment