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
0ea380fd
Commit
0ea380fd
authored
Feb 22, 2007
by
pekka@clam.ndb.mysql.com/orca.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - rel5.1.16 NdbRecAttr print of blob length assumed uint64 aligned buffer
parent
01e4bc50
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
16 deletions
+16
-16
storage/ndb/src/ndbapi/NdbRecAttr.cpp
storage/ndb/src/ndbapi/NdbRecAttr.cpp
+16
-16
No files found.
storage/ndb/src/ndbapi/NdbRecAttr.cpp
View file @
0ea380fd
...
...
@@ -343,24 +343,24 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
}
break
;
case
NdbDictionary
:
:
Column
::
Blob
:
{
const
NdbBlob
::
Head
*
h
=
(
const
NdbBlob
::
Head
*
)
r
.
aRef
();
out
<<
h
->
length
<<
":"
;
const
unsigned
char
*
p
=
(
const
unsigned
char
*
)(
h
+
1
);
unsigned
n
=
r
.
get_size_in_bytes
()
-
sizeof
(
*
h
);
for
(
unsigned
k
=
0
;
k
<
n
&&
k
<
h
->
length
;
k
++
)
out
.
print
(
"%02X"
,
(
int
)
p
[
k
]);
j
=
length
;
}
break
;
case
NdbDictionary
:
:
Column
::
Text
:
{
const
NdbBlob
::
Head
*
h
=
(
const
NdbBlob
::
Head
*
)
r
.
aRef
();
out
<<
h
->
length
<<
":"
;
const
unsigned
char
*
p
=
(
const
unsigned
char
*
)(
h
+
1
);
unsigned
n
=
r
.
get_size_in_bytes
()
-
sizeof
(
*
h
);
for
(
unsigned
k
=
0
;
k
<
n
&&
k
<
h
->
length
;
k
++
)
// user defined aRef() may not be aligned to Uint64
NdbBlob
::
Head
head
;
memcpy
(
&
head
,
r
.
aRef
(),
sizeof
(
head
));
out
<<
head
.
length
<<
":"
;
const
unsigned
char
*
p
=
(
const
unsigned
char
*
)
r
.
aRef
()
+
sizeof
(
head
);
if
(
r
.
get_size_in_bytes
()
<
sizeof
(
head
))
out
<<
"***error***"
;
// really cannot happen
else
{
unsigned
n
=
r
.
get_size_in_bytes
()
-
sizeof
(
head
);
for
(
unsigned
k
=
0
;
k
<
n
&&
k
<
head
.
length
;
k
++
)
{
if
(
r
.
getType
()
==
NdbDictionary
::
Column
::
Blob
)
out
.
print
(
"%02X"
,
(
int
)
p
[
k
]);
else
out
.
print
(
"%c"
,
(
int
)
p
[
k
]);
}
}
j
=
length
;
}
break
;
...
...
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