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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
3cd7b7da
Commit
3cd7b7da
authored
Mar 01, 2007
by
tomas@poseidon.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge poseidon.mysql.com:/home/tomas/mysql-5.0-telco-gca
into poseidon.mysql.com:/home/tomas/mysql-5.0-ndb
parents
7fae7013
6dd7294d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
20 deletions
+25
-20
ndb/src/ndbapi/NdbRecAttr.cpp
ndb/src/ndbapi/NdbRecAttr.cpp
+19
-19
ndb/tools/restore/Restore.cpp
ndb/tools/restore/Restore.cpp
+6
-1
No files found.
ndb/src/ndbapi/NdbRecAttr.cpp
View file @
3cd7b7da
...
...
@@ -346,24 +346,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
.
arraySize
()
-
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
.
arraySize
()
-
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
.
arraySize
()
<
sizeof
(
head
))
out
<<
"***error***"
;
// really cannot happen
else
{
unsigned
n
=
r
.
arraySize
()
-
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
;
...
...
ndb/tools/restore/Restore.cpp
View file @
3cd7b7da
...
...
@@ -54,7 +54,12 @@ BackupFile::Twiddle(const AttributeDesc* attr_desc, AttributeData* attr_data, Ui
return
true
;
case
64
:
for
(
i
=
0
;
i
<
arraySize
;
i
++
){
attr_data
->
u_int64_value
[
i
]
=
Twiddle64
(
attr_data
->
u_int64_value
[
i
]);
// allow unaligned
char
*
p
=
(
char
*
)
&
attr_data
->
u_int64_value
[
i
];
Uint64
x
;
memcpy
(
&
x
,
p
,
sizeof
(
Uint64
));
x
=
Twiddle64
(
x
);
memcpy
(
p
,
&
x
,
sizeof
(
Uint64
));
}
return
true
;
default:
...
...
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