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
37025cb3
Commit
37025cb3
authored
Oct 28, 2004
by
tomas@poseidon.ndb.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb
into poseidon.ndb.mysql.com:/home/tomas/mysql-4.1-ndb-local
parents
89fdc496
2d455470
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
312 additions
and
30 deletions
+312
-30
mysql-test/r/ndb_basic.result
mysql-test/r/ndb_basic.result
+131
-0
mysql-test/t/ndb_basic.test
mysql-test/t/ndb_basic.test
+136
-0
ndb/include/kernel/ndb_limits.h
ndb/include/kernel/ndb_limits.h
+5
-0
ndb/include/ndbapi/ndbapi_limits.h
ndb/include/ndbapi/ndbapi_limits.h
+2
-2
ndb/src/kernel/vm/LongSignal.hpp
ndb/src/kernel/vm/LongSignal.hpp
+1
-1
ndb/src/ndbapi/TransporterFacade.cpp
ndb/src/ndbapi/TransporterFacade.cpp
+37
-27
No files found.
mysql-test/r/ndb_basic.result
View file @
37025cb3
...
@@ -414,3 +414,134 @@ select * from t1 where b IS NOT NULL;
...
@@ -414,3 +414,134 @@ select * from t1 where b IS NOT NULL;
a b
a b
1
1
drop table t1;
drop table t1;
create table t1 (
c1 int,
c2 int,
c3 int,
c4 int,
c5 int,
c6 int,
c7 int,
c8 int,
c9 int,
c10 int,
c11 int,
c12 int,
c13 int,
c14 int,
c15 int,
c16 int,
c17 int,
c18 int,
c19 int,
c20 int,
c21 int,
c22 int,
c23 int,
c24 int,
c25 int,
c26 int,
c27 int,
c28 int,
c29 int,
c30 int,
c31 int,
c32 int,
c33 int,
c34 int,
c35 int,
c36 int,
c37 int,
c38 int,
c39 int,
c40 int,
c41 int,
c42 int,
c43 int,
c44 int,
c45 int,
c46 int,
c47 int,
c48 int,
c49 int,
c50 int,
c51 int,
c52 int,
c53 int,
c54 int,
c55 int,
c56 int,
c57 int,
c58 int,
c59 int,
c60 int,
c61 int,
c62 int,
c63 int,
c64 int,
c65 int,
c66 int,
c67 int,
c68 int,
c69 int,
c70 int,
c71 int,
c72 int,
c73 int,
c74 int,
c75 int,
c76 int,
c77 int,
c78 int,
c79 int,
c80 int,
c81 int,
c82 int,
c83 int,
c84 int,
c85 int,
c86 int,
c87 int,
c88 int,
c89 int,
c90 int,
c91 int,
c92 int,
c93 int,
c94 int,
c95 int,
c96 int,
c97 int,
c98 int,
c99 int,
c100 int,
c101 int,
c102 int,
c103 int,
c104 int,
c105 int,
c106 int,
c107 int,
c108 int,
c109 int,
c110 int,
c111 int,
c112 int,
c113 int,
c114 int,
c115 int,
c116 int,
c117 int,
c118 int,
c119 int,
c120 int,
c121 int,
c122 int,
c123 int,
c124 int,
c125 int,
c126 int,
c127 int,
c128 int,
primary key(c1)) engine=ndb;
drop table t1;
mysql-test/t/ndb_basic.test
View file @
37025cb3
...
@@ -371,3 +371,139 @@ select * from t1 order by b;
...
@@ -371,3 +371,139 @@ select * from t1 order by b;
select
*
from
t1
where
b
IS
NULL
;
select
*
from
t1
where
b
IS
NULL
;
select
*
from
t1
where
b
IS
NOT
NULL
;
select
*
from
t1
where
b
IS
NOT
NULL
;
drop
table
t1
;
drop
table
t1
;
#
# test the limit of no of attributes in one table
#
create
table
t1
(
c1
int
,
c2
int
,
c3
int
,
c4
int
,
c5
int
,
c6
int
,
c7
int
,
c8
int
,
c9
int
,
c10
int
,
c11
int
,
c12
int
,
c13
int
,
c14
int
,
c15
int
,
c16
int
,
c17
int
,
c18
int
,
c19
int
,
c20
int
,
c21
int
,
c22
int
,
c23
int
,
c24
int
,
c25
int
,
c26
int
,
c27
int
,
c28
int
,
c29
int
,
c30
int
,
c31
int
,
c32
int
,
c33
int
,
c34
int
,
c35
int
,
c36
int
,
c37
int
,
c38
int
,
c39
int
,
c40
int
,
c41
int
,
c42
int
,
c43
int
,
c44
int
,
c45
int
,
c46
int
,
c47
int
,
c48
int
,
c49
int
,
c50
int
,
c51
int
,
c52
int
,
c53
int
,
c54
int
,
c55
int
,
c56
int
,
c57
int
,
c58
int
,
c59
int
,
c60
int
,
c61
int
,
c62
int
,
c63
int
,
c64
int
,
c65
int
,
c66
int
,
c67
int
,
c68
int
,
c69
int
,
c70
int
,
c71
int
,
c72
int
,
c73
int
,
c74
int
,
c75
int
,
c76
int
,
c77
int
,
c78
int
,
c79
int
,
c80
int
,
c81
int
,
c82
int
,
c83
int
,
c84
int
,
c85
int
,
c86
int
,
c87
int
,
c88
int
,
c89
int
,
c90
int
,
c91
int
,
c92
int
,
c93
int
,
c94
int
,
c95
int
,
c96
int
,
c97
int
,
c98
int
,
c99
int
,
c100
int
,
c101
int
,
c102
int
,
c103
int
,
c104
int
,
c105
int
,
c106
int
,
c107
int
,
c108
int
,
c109
int
,
c110
int
,
c111
int
,
c112
int
,
c113
int
,
c114
int
,
c115
int
,
c116
int
,
c117
int
,
c118
int
,
c119
int
,
c120
int
,
c121
int
,
c122
int
,
c123
int
,
c124
int
,
c125
int
,
c126
int
,
c127
int
,
c128
int
,
primary
key
(
c1
))
engine
=
ndb
;
drop
table
t1
;
ndb/include/kernel/ndb_limits.h
View file @
37025cb3
...
@@ -117,4 +117,9 @@
...
@@ -117,4 +117,9 @@
*/
*/
#define NDB_BLOB_HEAD_SIZE 2
/* sizeof(NdbBlob::Head) >> 2 */
#define NDB_BLOB_HEAD_SIZE 2
/* sizeof(NdbBlob::Head) >> 2 */
/*
* Long signals
*/
#define NDB_SECTION_SEGMENT_SZ 60
#endif
#endif
ndb/include/ndbapi/ndbapi_limits.h
View file @
37025cb3
...
@@ -22,9 +22,9 @@
...
@@ -22,9 +22,9 @@
#define NDB_MAX_DATABASE_NAME_SIZE 128
#define NDB_MAX_DATABASE_NAME_SIZE 128
#define NDB_MAX_SCHEMA_NAME_SIZE 128
#define NDB_MAX_SCHEMA_NAME_SIZE 128
#define NDB_MAX_TAB_NAME_SIZE 128
#define NDB_MAX_TAB_NAME_SIZE 128
#define NDB_MAX_ATTRIBUTES_IN_TABLE
91
#define NDB_MAX_ATTRIBUTES_IN_TABLE
128
#define NDB_MAX_TUPLE_SIZE_IN_WORDS
102
3
#define NDB_MAX_TUPLE_SIZE_IN_WORDS
201
3
#define NDB_MAX_KEYSIZE_IN_WORDS 1023
#define NDB_MAX_KEYSIZE_IN_WORDS 1023
#define NDB_MAX_KEY_SIZE NDB_MAX_KEYSIZE_IN_WORDS*sizeof(Uint32)
#define NDB_MAX_KEY_SIZE NDB_MAX_KEYSIZE_IN_WORDS*sizeof(Uint32)
#define NDB_MAX_TUPLE_SIZE NDB_MAX_TUPLE_SIZE_IN_WORDS*sizeof(uint32)
#define NDB_MAX_TUPLE_SIZE NDB_MAX_TUPLE_SIZE_IN_WORDS*sizeof(uint32)
...
...
ndb/src/kernel/vm/LongSignal.hpp
View file @
37025cb3
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
*/
*/
struct
SectionSegment
{
struct
SectionSegment
{
STATIC_CONST
(
DataLength
=
60
);
STATIC_CONST
(
DataLength
=
NDB_SECTION_SEGMENT_SZ
);
Uint32
m_ownerRef
;
Uint32
m_ownerRef
;
Uint32
m_sz
;
Uint32
m_sz
;
...
...
ndb/src/ndbapi/TransporterFacade.cpp
View file @
37025cb3
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#include <NdbConfig.h>
#include <NdbConfig.h>
#include <ndb_version.h>
#include <ndb_version.h>
#include <SignalLoggerManager.hpp>
#include <SignalLoggerManager.hpp>
#include <kernel/ndb_limits.h>
//#define REPORT_TRANSPORTER
//#define REPORT_TRANSPORTER
//#define API_TRACE;
//#define API_TRACE;
...
@@ -834,10 +835,14 @@ TransporterFacade::sendSignalUnCond(NdbApiSignal * aSignal, NodeId aNode){
...
@@ -834,10 +835,14 @@ TransporterFacade::sendSignalUnCond(NdbApiSignal * aSignal, NodeId aNode){
return
(
ss
==
SEND_OK
?
0
:
-
1
);
return
(
ss
==
SEND_OK
?
0
:
-
1
);
}
}
#define CHUNK_SZ
100u
#define CHUNK_SZ
NDB_SECTION_SEGMENT_SZ*1
int
int
TransporterFacade
::
sendFragmentedSignal
(
NdbApiSignal
*
aSignal
,
NodeId
aNode
,
TransporterFacade
::
sendFragmentedSignal
(
NdbApiSignal
*
aSignal
,
NodeId
aNode
,
LinearSectionPtr
ptr
[
3
],
Uint32
secs
){
LinearSectionPtr
ptr
[
3
],
Uint32
secs
)
{
if
(
getIsNodeSendable
(
aNode
)
!=
true
)
return
-
1
;
NdbApiSignal
tmp_signal
(
*
(
SignalHeader
*
)
aSignal
);
NdbApiSignal
tmp_signal
(
*
(
SignalHeader
*
)
aSignal
);
LinearSectionPtr
tmp_ptr
[
3
];
LinearSectionPtr
tmp_ptr
[
3
];
Uint32
unique_id
=
m_fragmented_signal_id
++
;
// next unique id
Uint32
unique_id
=
m_fragmented_signal_id
++
;
// next unique id
...
@@ -855,41 +860,47 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
...
@@ -855,41 +860,47 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
if
(
chunk_sz
+
save_sz
>
CHUNK_SZ
)
{
if
(
chunk_sz
+
save_sz
>
CHUNK_SZ
)
{
// truncate
// truncate
unsigned
send_sz
=
CHUNK_SZ
-
chunk_sz
;
unsigned
send_sz
=
CHUNK_SZ
-
chunk_sz
;
if
(
i
!=
start_i
)
// first piece of a new section has to be a multiple of NDB_SECTION_SEGMENT_SZ
{
send_sz
=
NDB_SECTION_SEGMENT_SZ
*
(
send_sz
+
NDB_SECTION_SEGMENT_SZ
-
1
)
/
NDB_SECTION_SEGMENT_SZ
;
if
(
send_sz
>
save_sz
)
send_sz
=
save_sz
;
}
tmp_ptr
[
i
].
sz
=
send_sz
;
tmp_ptr
[
i
].
sz
=
send_sz
;
if
(
fragment_info
<
2
)
if
(
fragment_info
<
2
)
// 1 = first fragment, 2 = middle fragments
fragment_info
++
;
fragment_info
++
;
// send tmp_signal
// send tmp_signal
tmp_data
[
i
-
start_i
+
1
]
=
unique_id
;
tmp_data
[
i
-
start_i
+
1
]
=
unique_id
;
tmp_signal
.
setLength
(
i
-
start_i
+
2
);
tmp_signal
.
setLength
(
i
-
start_i
+
2
);
tmp_signal
.
m_fragmentInfo
=
fragment_info
;
tmp_signal
.
m_fragmentInfo
=
fragment_info
;
tmp_signal
.
m_noOfSections
=
i
-
start_i
+
1
;
// do prepare send
// do prepare send
{
{
int
ret
;
if
(
getIsNodeSendable
(
aNode
)
==
true
){
SendStatus
ss
=
theTransporterRegistry
->
prepareSend
SendStatus
ss
=
theTransporterRegistry
->
prepareSend
(
&
tmp_signal
,
(
&
tmp_signal
,
1
,
// JBB
1
,
/*JBB*/
tmp_signal
.
getDataPtrSend
()
,
tmp_data
,
aNode
,
aNode
,
&
ptr
[
start_i
]);
&
tmp_
ptr
[
start_i
]);
assert
(
ss
!=
SEND_MESSAGE_TOO_BIG
);
assert
(
ss
!=
SEND_MESSAGE_TOO_BIG
);
ret
=
(
ss
==
SEND_OK
?
0
:
-
1
);
if
(
ss
!=
SEND_OK
)
return
-
1
;
}
else
ret
=
-
1
;
if
(
ret
!=
SEND_OK
)
return
ret
;
}
}
// setup variables for next signal
// setup variables for next signal
start_i
=
i
;
start_i
=
i
;
chunk_sz
=
0
;
chunk_sz
=
0
;
tmp_ptr
[
i
].
sz
=
save_sz
-
send_sz
;
tmp_ptr
[
i
].
sz
=
save_sz
-
send_sz
;
tmp_ptr
[
i
].
p
+=
send_sz
;
tmp_ptr
[
i
].
p
+=
send_sz
;
if
(
tmp_ptr
[
i
].
sz
==
0
)
i
++
;
}
}
else
else
{
{
chunk_sz
+=
save_sz
;
chunk_sz
+=
save_sz
;
i
++
;
i
++
;
}
}
}
}
...
@@ -907,7 +918,7 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
...
@@ -907,7 +918,7 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
aSignal
->
setLength
(
a_sz
+
tmp_sz
+
1
);
aSignal
->
setLength
(
a_sz
+
tmp_sz
+
1
);
// send last fragment
// send last fragment
aSignal
->
m_fragmentInfo
=
3
;
aSignal
->
m_fragmentInfo
=
3
;
// 3 = last fragment
aSignal
->
m_noOfSections
=
i
-
start_i
;
aSignal
->
m_noOfSections
=
i
-
start_i
;
}
else
{
}
else
{
aSignal
->
m_noOfSections
=
secs
;
aSignal
->
m_noOfSections
=
secs
;
...
@@ -915,17 +926,16 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
...
@@ -915,17 +926,16 @@ TransporterFacade::sendFragmentedSignal(NdbApiSignal* aSignal, NodeId aNode,
// send aSignal
// send aSignal
int
ret
;
int
ret
;
if
(
getIsNodeSendable
(
aNode
)
==
true
)
{
{
SendStatus
ss
=
theTransporterRegistry
->
prepareSend
SendStatus
ss
=
theTransporterRegistry
->
prepareSend
(
aSignal
,
(
aSignal
,
1
,
// JBB
1
/*JBB*/
,
aSignal
->
getDataPtrSend
(),
aSignal
->
getDataPtrSend
(),
aNode
,
aNode
,
&
ptr
[
start_i
]);
&
tmp_
ptr
[
start_i
]);
assert
(
ss
!=
SEND_MESSAGE_TOO_BIG
);
assert
(
ss
!=
SEND_MESSAGE_TOO_BIG
);
ret
=
(
ss
==
SEND_OK
?
0
:
-
1
);
ret
=
(
ss
==
SEND_OK
?
0
:
-
1
);
}
else
}
ret
=
-
1
;
aSignal
->
m_noOfSections
=
0
;
aSignal
->
m_noOfSections
=
0
;
aSignal
->
m_fragmentInfo
=
0
;
aSignal
->
m_fragmentInfo
=
0
;
aSignal
->
setLength
(
a_sz
);
aSignal
->
setLength
(
a_sz
);
...
...
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