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
c445baea
Commit
c445baea
authored
Mar 26, 2007
by
tomas@whalegate.ndb.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
correct medium int printout
correct cit printout correct bit store retrieve
parent
22c5d8ba
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
24 deletions
+15
-24
ndb/include/ndbapi/NdbRecAttr.hpp
ndb/include/ndbapi/NdbRecAttr.hpp
+2
-5
ndb/src/ndbapi/NdbRecAttr.cpp
ndb/src/ndbapi/NdbRecAttr.cpp
+6
-17
sql/ha_ndbcluster.cc
sql/ha_ndbcluster.cc
+7
-2
No files found.
ndb/include/ndbapi/NdbRecAttr.hpp
View file @
c445baea
...
...
@@ -336,10 +336,7 @@ inline
Int32
NdbRecAttr
::
medium_value
()
const
{
Uint32
tmp
=
*
(
Uint32
*
)
theRef
;
if
(
tmp
&
(
0x1
<<
23
))
tmp
|=
(
0xFF
<<
24
);
return
(
Int32
)
tmp
;
return
sint3korr
((
unsigned
char
*
)
theRef
);
}
inline
...
...
@@ -367,7 +364,7 @@ inline
Uint32
NdbRecAttr
::
u_medium_value
()
const
{
return
*
(
Uint32
*
)
theRef
;
return
uint3korr
((
unsigned
char
*
)
theRef
)
;
}
inline
...
...
ndb/src/ndbapi/NdbRecAttr.cpp
View file @
c445baea
...
...
@@ -236,24 +236,13 @@ ndbrecattr_print_formatted(NdbOut& out, const NdbRecAttr &r,
break
;
case
NdbDictionary
:
:
Column
::
Bit
:
out
<<
f
.
hex_prefix
<<
"0x"
;
if
(
length
<
33
)
{
out
.
print
(
"%X"
,
r
.
u_32_value
());
}
else
if
(
length
<
65
)
{
out
.
print
(
"%llX"
,
r
.
u_64_value
());
}
else
{
const
unsigned
char
*
buf
=
(
unsigned
char
*
)
r
.
aRef
();
int
k
=
4
*
((
length
+
31
)
/
32
);
while
(
k
>
0
&&
(
*
(
buf
+
--
k
)
==
0
));
do
{
out
.
print
(
"%X"
,
(
Uint32
)
*
(
buf
+
k
--
));
}
while
(
k
>=
0
);
const
Uint32
*
buf
=
(
Uint32
*
)
r
.
aRef
();
int
k
=
(
length
+
31
)
/
32
;
while
(
k
>
0
&&
(
buf
[
--
k
]
==
0
));
out
.
print
(
"%X"
,
buf
[
k
]);
while
(
k
>
0
)
out
.
print
(
"%.8X"
,
buf
[
--
k
]);
}
break
;
case
NdbDictionary
:
:
Column
::
Unsigned
:
...
...
sql/ha_ndbcluster.cc
View file @
c445baea
...
...
@@ -727,7 +727,8 @@ int ha_ndbcluster::set_ndb_value(NdbOperation *ndb_op, Field *field,
DBUG_DUMP
(
"value"
,
(
char
*
)
&
bits
,
pack_len
);
#ifdef WORDS_BIGENDIAN
/* store lsw first */
bits
=
(
bits
>>
32
)
|
(
bits
<<
32
);
bits
=
((
bits
>>
32
)
&
0x00000000FFFFFFFF
)
|
((
bits
<<
32
)
&
0xFFFFFFFF00000000
);
#endif
DBUG_RETURN
(
ndb_op
->
setValue
(
fieldnr
,
(
char
*
)
&
bits
,
pack_len
)
!=
0
);
}
...
...
@@ -2653,7 +2654,11 @@ void ha_ndbcluster::unpack_record(byte* buf)
#ifdef WORDS_BIGENDIAN
/* lsw is stored first */
Uint32
*
buf
=
(
Uint32
*
)(
*
value
).
rec
->
aRef
();
((
Field_bit
*
)
*
field
)
->
store
(
*
buf
|
(((
longlong
)
*
(
buf
+
1
))
<<
32
),
((
Field_bit
*
)
*
field
)
->
store
((((
longlong
)
*
buf
)
&
0x000000000FFFFFFFF
)
|
((((
longlong
)
*
(
buf
+
1
))
<<
32
)
&
0xFFFFFFFF00000000
),
TRUE
);
#else
((
Field_bit
*
)
*
field
)
->
store
((
longlong
)
...
...
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