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
68ab6069
Commit
68ab6069
authored
Jun 10, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
merge ndb api blobs
parent
2aacdd94
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
55 additions
and
100 deletions
+55
-100
ndb/include/ndbapi/NdbDictionary.hpp
ndb/include/ndbapi/NdbDictionary.hpp
+8
-0
ndb/src/ndbapi/NdbOperation.cpp
ndb/src/ndbapi/NdbOperation.cpp
+2
-2
ndb/src/ndbapi/Ndberr.cpp
ndb/src/ndbapi/Ndberr.cpp
+0
-8
ndb/test/ndbapi/testBlobs.cpp
ndb/test/ndbapi/testBlobs.cpp
+0
-0
ndb/test/src/NDBT_Table.cpp
ndb/test/src/NDBT_Table.cpp
+45
-90
No files found.
ndb/include/ndbapi/NdbDictionary.hpp
View file @
68ab6069
...
@@ -321,6 +321,11 @@ public:
...
@@ -321,6 +321,11 @@ public:
void
setStripeSize
(
int
size
)
{
setLength
(
size
);
}
void
setStripeSize
(
int
size
)
{
setLength
(
size
);
}
int
getStripeSize
()
const
{
return
getLength
();
}
int
getStripeSize
()
const
{
return
getLength
();
}
/**
* Get size of element
*/
int
Column
::
getSize
()
const
;
/**
/**
* Set distribution key
* Set distribution key
*
*
...
@@ -372,6 +377,7 @@ public:
...
@@ -372,6 +377,7 @@ public:
#endif
#endif
private:
private:
friend
class
NdbRecAttr
;
friend
class
NdbColumnImpl
;
friend
class
NdbColumnImpl
;
class
NdbColumnImpl
&
m_impl
;
class
NdbColumnImpl
&
m_impl
;
Column
(
NdbColumnImpl
&
);
Column
(
NdbColumnImpl
&
);
...
@@ -1054,4 +1060,6 @@ public:
...
@@ -1054,4 +1060,6 @@ public:
};
};
};
};
class
NdbOut
&
operator
<<
(
class
NdbOut
&
ndbout
,
const
NdbDictionary
::
Column
::
Type
type
);
#endif
#endif
ndb/src/ndbapi/NdbOperation.cpp
View file @
68ab6069
...
@@ -32,7 +32,7 @@
...
@@ -32,7 +32,7 @@
#include "NdbRecAttr.hpp"
#include "NdbRecAttr.hpp"
#include "NdbUtil.hpp"
#include "NdbUtil.hpp"
#include "NdbBlob.hpp"
#include "NdbBlob.hpp"
#include "ndbapi_limits.h"
#include <signaldata/TcKeyReq.hpp>
#include <signaldata/TcKeyReq.hpp>
#include "NdbDictionaryImpl.hpp"
#include "NdbDictionaryImpl.hpp"
...
@@ -165,7 +165,7 @@ NdbOperation::init(NdbTableImpl* tab, NdbConnection* myConnection){
...
@@ -165,7 +165,7 @@ NdbOperation::init(NdbTableImpl* tab, NdbConnection* myConnection){
m_currentTable
=
m_accessTable
=
tab
;
m_currentTable
=
m_accessTable
=
tab
;
theNdbCon
=
myConnection
;
theNdbCon
=
myConnection
;
for
(
Uint32
i
=
0
;
i
<
MAXNROFTUPLE
KEY
;
i
++
)
for
(
Uint32
i
=
0
;
i
<
NDB_MAX_NO_OF_ATTRIBUTES_IN_
KEY
;
i
++
)
for
(
int
j
=
0
;
j
<
3
;
j
++
)
for
(
int
j
=
0
;
j
<
3
;
j
++
)
theTupleKeyDefined
[
i
][
j
]
=
false
;
theTupleKeyDefined
[
i
][
j
]
=
false
;
...
...
ndb/src/ndbapi/Ndberr.cpp
View file @
68ab6069
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
#include <NdbError.hpp>
#include <NdbError.hpp>
#include "NdbImpl.hpp"
#include "NdbImpl.hpp"
#include "NdbDictionaryImpl.hpp"
#include "NdbDictionaryImpl.hpp"
#include <NdbSchemaCon.hpp>
#include <NdbOperation.hpp>
#include <NdbOperation.hpp>
#include <NdbConnection.hpp>
#include <NdbConnection.hpp>
#include <NdbBlob.hpp>
#include <NdbBlob.hpp>
...
@@ -68,13 +67,6 @@ NdbOperation::getNdbError() const {
...
@@ -68,13 +67,6 @@ NdbOperation::getNdbError() const {
return
theError
;
return
theError
;
}
}
const
NdbError
&
NdbSchemaCon
::
getNdbError
()
const
{
update
(
theError
);
return
theError
;
}
const
const
NdbError
&
NdbError
&
NdbBlob
::
getNdbError
()
const
{
NdbBlob
::
getNdbError
()
const
{
...
...
ndb/test/ndbapi/testBlobs
/testBlobs
.cpp
→
ndb/test/ndbapi/testBlobs.cpp
View file @
68ab6069
File moved
ndb/test/src/NDBT_Table.cpp
View file @
68ab6069
...
@@ -14,112 +14,35 @@
...
@@ -14,112 +14,35 @@
along with this program; if not, write to the Free Software
along with this program; if not, write to the Free Software
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
"NDBT_Table.hpp"
#include
<NDBT_Table.hpp>
#include <NdbTimer.hpp>
#include <NdbTimer.hpp>
#include <NDBT.hpp>
#include <NDBT.hpp>
class
NdbOut
&
class
NdbOut
&
operator
<<
(
class
NdbOut
&
ndbout
,
const
NDBT_Attribute
&
attr
){
operator
<<
(
class
NdbOut
&
ndbout
,
const
NDBT_Attribute
&
attr
){
NdbDictionary
::
Column
::
Type
type
=
attr
.
getType
();
NdbDictionary
::
Column
::
Type
type
=
attr
.
getType
();
bool
key
=
attr
.
getPrimaryKey
();
bool
null
=
attr
.
getNullable
();
ndbout
<<
attr
.
getName
()
<<
"
\t
"
;
ndbout
<<
attr
.
getName
()
<<
" "
<<
type
;
char
tmp
[
100
];
if
(
attr
.
getLength
()
!=
1
)
snprintf
(
tmp
,
100
,
" [%d]"
,
attr
.
getLength
());
else
tmp
[
0
]
=
0
;
switch
(
type
){
switch
(
type
){
case
NdbDictionary
:
:
Column
::
Tinyint
:
ndbout
<<
"Tinyint"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Tinyunsigned
:
ndbout
<<
"Tinyunsigned"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Smallint
:
ndbout
<<
"Smallint"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Smallunsigned
:
ndbout
<<
"Smallunsigned"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Mediumint
:
ndbout
<<
"Mediumint"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Mediumunsigned
:
ndbout
<<
"Mediumunsigned"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Int
:
ndbout
<<
"Int"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Unsigned
:
ndbout
<<
"Unsigned"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Bigint
:
ndbout
<<
"Bigint"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Bigunsigned
:
ndbout
<<
"Bigunsigned"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Float
:
ndbout
<<
"Float"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Double
:
ndbout
<<
"Double"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Decimal
:
case
NdbDictionary
:
:
Column
::
Decimal
:
ndbout
<<
"Decimal("
ndbout
<<
"("
<<
attr
.
getScale
()
<<
", "
<<
attr
.
getPrecision
()
<<
")"
;
<<
attr
.
getScale
()
<<
", "
<<
attr
.
getPrecision
()
<<
")"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Char
:
ndbout
<<
"Char("
<<
attr
.
getLength
()
<<
")"
;
break
;
case
NdbDictionary
:
:
Column
::
Varchar
:
ndbout
<<
"Varchar("
<<
attr
.
getLength
()
<<
")"
;
break
;
case
NdbDictionary
:
:
Column
::
Binary
:
ndbout
<<
"Binary("
<<
attr
.
getLength
()
<<
")"
;
break
;
case
NdbDictionary
:
:
Column
::
Varbinary
:
ndbout
<<
"Varbinary("
<<
attr
.
getLength
()
<<
")"
;
break
;
case
NdbDictionary
:
:
Column
::
Datetime
:
ndbout
<<
"Datetime"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Timespec
:
ndbout
<<
"Timespec"
<<
tmp
;
break
;
case
NdbDictionary
:
:
Column
::
Blob
:
ndbout
<<
"Blob("
<<
attr
.
getInlineSize
()
<<
","
<<
attr
.
getPartSize
()
<<
","
<<
attr
.
getStripeSize
()
<<
")"
;
break
;
case
NdbDictionary
:
:
Column
::
Clob
:
ndbout
<<
"Clob("
<<
attr
.
getInlineSize
()
<<
","
<<
attr
.
getPartSize
()
<<
","
<<
attr
.
getStripeSize
()
<<
")"
;
break
;
case
NdbDictionary
:
:
Column
::
Undefined
:
ndbout
<<
"Undefined"
<<
tmp
;
break
;
break
;
default:
default:
ndbout
<<
"Unknown("
<<
type
<<
")"
;
break
;
}
}
ndbout
<<
"
\t
"
;
if
(
attr
.
getLength
()
!=
1
)
if
(
null
){
ndbout
<<
"["
<<
attr
.
getLength
()
<<
"]"
;
ndbout
<<
"NULL"
;
}
else
{
ndbout
<<
"NOT NULL"
;
}
ndbout
<<
"
\t
"
;
if
(
key
)
if
(
attr
.
getNullable
())
ndbout
<<
"
\t
primary key"
;
ndbout
<<
" NULL"
;
else
ndbout
<<
" NOT NULL"
;
if
(
attr
.
getPrimaryKey
())
ndbout
<<
" PRIMARY KEY"
;
return
ndbout
;
return
ndbout
;
}
}
...
@@ -137,6 +60,9 @@ operator <<(class NdbOut& ndbout, const NDBT_Table & tab)
...
@@ -137,6 +60,9 @@ operator <<(class NdbOut& ndbout, const NDBT_Table & tab)
ndbout
<<
"Temporary table: "
<<
(
tab
.
getStoredTable
()
?
"no"
:
"yes"
)
<<
endl
;
ndbout
<<
"Temporary table: "
<<
(
tab
.
getStoredTable
()
?
"no"
:
"yes"
)
<<
endl
;
ndbout
<<
"Number of attributes: "
<<
tab
.
getNoOfColumns
()
<<
endl
;
ndbout
<<
"Number of attributes: "
<<
tab
.
getNoOfColumns
()
<<
endl
;
ndbout
<<
"Number of primary keys: "
<<
tab
.
getNoOfPrimaryKeys
()
<<
endl
;
ndbout
<<
"Number of primary keys: "
<<
tab
.
getNoOfPrimaryKeys
()
<<
endl
;
ndbout
<<
"Length of frm data: "
<<
tab
.
getFrmLength
()
<<
endl
;
//<< ((tab.getTupleKey() == TupleId) ? " tupleid" : "") <<endl;
//<< ((tab.getTupleKey() == TupleId) ? " tupleid" : "") <<endl;
ndbout
<<
"TableStatus: "
;
ndbout
<<
"TableStatus: "
;
switch
(
tab
.
getObjectStatus
()){
switch
(
tab
.
getObjectStatus
()){
...
@@ -161,3 +87,32 @@ operator <<(class NdbOut& ndbout, const NDBT_Table & tab)
...
@@ -161,3 +87,32 @@ operator <<(class NdbOut& ndbout, const NDBT_Table & tab)
return
ndbout
;
return
ndbout
;
}
}
class
NdbOut
&
operator
<<
(
class
NdbOut
&
,
const
NdbDictionary
::
Index
&
idx
)
{
ndbout
<<
idx
.
getName
();
ndbout
<<
"("
;
for
(
unsigned
i
=
0
;
i
<
idx
.
getNoOfColumns
();
i
++
)
{
const
NdbDictionary
::
Column
*
col
=
idx
.
getColumn
(
i
);
ndbout
<<
col
->
getName
();
if
(
i
<
idx
.
getNoOfColumns
()
-
1
)
ndbout
<<
", "
;
}
ndbout
<<
")"
;
ndbout
<<
" - "
;
switch
(
idx
.
getType
())
{
case
NdbDictionary
:
:
Object
::
UniqueHashIndex
:
ndbout
<<
"UniqueHashIndex"
;
break
;
case
NdbDictionary
:
:
Object
::
OrderedIndex
:
ndbout
<<
"OrderedIndex"
;
break
;
default:
ndbout
<<
"Type "
<<
idx
.
getType
();
break
;
}
return
ndbout
;
}
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