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
ff7e440b
Commit
ff7e440b
authored
Nov 01, 2004
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
NDB blobs restore backwards compatibility
parent
21984b0c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
10 deletions
+9
-10
ndb/src/ndbapi/NdbBlob.cpp
ndb/src/ndbapi/NdbBlob.cpp
+9
-10
No files found.
ndb/src/ndbapi/NdbBlob.cpp
View file @
ff7e440b
...
...
@@ -97,22 +97,21 @@ NdbBlob::getBlobTable(NdbTableImpl& bt, const NdbTableImpl* t, const NdbColumnIm
bt
.
setName
(
btname
);
bt
.
setLogging
(
t
->
getLogging
());
bt
.
setFragmentType
(
t
->
getFragmentType
());
{
NdbDictionary
::
Column
bc
(
"
PK
"
);
{
NdbDictionary
::
Column
bc
(
"
DIST
"
);
bc
.
setType
(
NdbDictionary
::
Column
::
Unsigned
);
assert
(
t
->
m_sizeOfKeysInWords
!=
0
);
bc
.
setLength
(
t
->
m_sizeOfKeysInWords
);
bc
.
setPrimaryKey
(
true
);
bc
.
setDistributionKey
(
true
);
bt
.
addColumn
(
bc
);
}
{
NdbDictionary
::
Column
bc
(
"
DIS
T"
);
{
NdbDictionary
::
Column
bc
(
"
PAR
T"
);
bc
.
setType
(
NdbDictionary
::
Column
::
Unsigned
);
bc
.
setPrimaryKey
(
true
);
bc
.
setDistributionKey
(
true
);
bt
.
addColumn
(
bc
);
}
{
NdbDictionary
::
Column
bc
(
"P
ART
"
);
{
NdbDictionary
::
Column
bc
(
"P
K
"
);
bc
.
setType
(
NdbDictionary
::
Column
::
Unsigned
);
assert
(
t
->
m_sizeOfKeysInWords
!=
0
);
bc
.
setLength
(
t
->
m_sizeOfKeysInWords
);
bc
.
setPrimaryKey
(
true
);
bt
.
addColumn
(
bc
);
}
...
...
@@ -309,7 +308,7 @@ inline Uint32
NdbBlob
::
getDistKey
(
Uint32
part
)
{
assert
(
theStripeSize
!=
0
);
return
part
/
theStripeSize
;
return
(
part
/
theStripeSize
)
%
theStripeSize
;
}
// getters and setters
...
...
@@ -393,9 +392,9 @@ NdbBlob::setPartKeyValue(NdbOperation* anOp, Uint32 part)
Uint32
*
data
=
(
Uint32
*
)
theKeyBuf
.
data
;
unsigned
size
=
theTable
->
m_sizeOfKeysInWords
;
DBG
(
"setPartKeyValue dist="
<<
getDistKey
(
part
)
<<
" part="
<<
part
<<
" key="
<<
ndb_blob_debug
(
data
,
size
));
if
(
anOp
->
equal
((
Uint32
)
0
,
theKeyBuf
.
data
)
==
-
1
||
anOp
->
equal
((
Uint32
)
1
,
getDistKey
(
part
)
)
==
-
1
||
anOp
->
equal
((
Uint32
)
2
,
part
)
==
-
1
)
{
if
(
anOp
->
equal
((
Uint32
)
0
,
getDistKey
(
part
)
)
==
-
1
||
anOp
->
equal
((
Uint32
)
1
,
part
)
==
-
1
||
anOp
->
equal
((
Uint32
)
2
,
theKeyBuf
.
data
)
==
-
1
)
{
setErrorCode
(
anOp
);
return
-
1
;
}
...
...
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