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
0cbd4970
Commit
0cbd4970
authored
Jan 28, 2005
by
pekka@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ndb - fix DATE printout
parent
521f7367
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
5 deletions
+17
-5
ndb/src/ndbapi/NdbRecAttr.cpp
ndb/src/ndbapi/NdbRecAttr.cpp
+17
-5
No files found.
ndb/src/ndbapi/NdbRecAttr.cpp
View file @
0cbd4970
...
...
@@ -242,12 +242,24 @@ NdbOut& operator<<(NdbOut& out, const NdbRecAttr &r)
break
;
case
NdbDictionary
:
:
Column
::
Date
:
{
uint
tmp
=
uint3korr
(
r
.
aRef
());
int
year
=
(
int
)
((
uint32
)
tmp
/
10000L
%
10000
);
int
month
=
(
int
)
((
uint32
)
tmp
/
100
%
100
);
int
day
=
(
int
)
((
uint32
)
tmp
%
100
);
uint32
tmp
=
(
uint32
)
uint3korr
(
r
.
aRef
());
int
part
;
char
buf
[
40
];
sprintf
(
buf
,
"%04d-%02d-%02d"
,
year
,
month
,
day
);
char
*
pos
=
(
char
*
)
buf
+
10
;
*
pos
--=
0
;
part
=
(
int
)
(
tmp
&
31
);
*
pos
--=
(
char
)
(
'0'
+
part
%
10
);
*
pos
--=
(
char
)
(
'0'
+
part
/
10
);
*
pos
--=
'-'
;
part
=
(
int
)
(
tmp
>>
5
&
15
);
*
pos
--=
(
char
)
(
'0'
+
part
%
10
);
*
pos
--=
(
char
)
(
'0'
+
part
/
10
);
*
pos
--=
'-'
;
part
=
(
int
)
(
tmp
>>
9
);
*
pos
--=
(
char
)
(
'0'
+
part
%
10
);
part
/=
10
;
*
pos
--=
(
char
)
(
'0'
+
part
%
10
);
part
/=
10
;
*
pos
--=
(
char
)
(
'0'
+
part
%
10
);
part
/=
10
;
*
pos
=
(
char
)
(
'0'
+
part
);
out
<<
buf
;
}
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