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
fd88351a
Commit
fd88351a
authored
Nov 02, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
s/sint/uint/ - no sign extend for signed bytes
parent
ea69fe30
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
strings/decimal.c
strings/decimal.c
+10
-10
No files found.
strings/decimal.c
View file @
fd88351a
...
@@ -719,10 +719,10 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
...
@@ -719,10 +719,10 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
dec1
x
;
dec1
x
;
switch
(
i
)
switch
(
i
)
{
{
case
1
:
x
=
mi_
s
int1korr
(
from
);
break
;
case
1
:
x
=
mi_
u
int1korr
(
from
);
break
;
case
2
:
x
=
mi_
s
int2korr
(
from
);
break
;
case
2
:
x
=
mi_
u
int2korr
(
from
);
break
;
case
3
:
x
=
mi_
s
int3korr
(
from
);
break
;
case
3
:
x
=
mi_
u
int3korr
(
from
);
break
;
case
4
:
x
=
mi_
s
int4korr
(
from
);
break
;
case
4
:
x
=
mi_
u
int4korr
(
from
);
break
;
default:
DBUG_ASSERT
(
0
);
default:
DBUG_ASSERT
(
0
);
}
}
from
+=
i
;
from
+=
i
;
...
@@ -735,7 +735,7 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
...
@@ -735,7 +735,7 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
for
(
stop
=
from
+
intg0
*
sizeof
(
dec1
);
from
<
stop
;
from
+=
sizeof
(
dec1
))
for
(
stop
=
from
+
intg0
*
sizeof
(
dec1
);
from
<
stop
;
from
+=
sizeof
(
dec1
))
{
{
DBUG_ASSERT
(
sizeof
(
dec1
)
==
4
);
DBUG_ASSERT
(
sizeof
(
dec1
)
==
4
);
*
buf
=
mi_
s
int4korr
(
from
)
^
mask
;
*
buf
=
mi_
u
int4korr
(
from
)
^
mask
;
if
(
buf
>
to
->
buf
||
*
buf
!=
0
)
if
(
buf
>
to
->
buf
||
*
buf
!=
0
)
buf
++
;
buf
++
;
else
else
...
@@ -745,7 +745,7 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
...
@@ -745,7 +745,7 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
for
(
stop
=
from
+
frac0
*
sizeof
(
dec1
);
from
<
stop
;
from
+=
sizeof
(
dec1
))
for
(
stop
=
from
+
frac0
*
sizeof
(
dec1
);
from
<
stop
;
from
+=
sizeof
(
dec1
))
{
{
DBUG_ASSERT
(
sizeof
(
dec1
)
==
4
);
DBUG_ASSERT
(
sizeof
(
dec1
)
==
4
);
*
buf
=
mi_
s
int4korr
(
from
)
^
mask
;
*
buf
=
mi_
u
int4korr
(
from
)
^
mask
;
buf
++
;
buf
++
;
}
}
if
(
frac0x
)
if
(
frac0x
)
...
@@ -754,10 +754,10 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
...
@@ -754,10 +754,10 @@ int bin2decimal(char *from, decimal *to, int precision, int scale)
dec1
x
;
dec1
x
;
switch
(
i
)
switch
(
i
)
{
{
case
1
:
x
=
mi_
s
int1korr
(
from
);
break
;
case
1
:
x
=
mi_
u
int1korr
(
from
);
break
;
case
2
:
x
=
mi_
s
int2korr
(
from
);
break
;
case
2
:
x
=
mi_
u
int2korr
(
from
);
break
;
case
3
:
x
=
mi_
s
int3korr
(
from
);
break
;
case
3
:
x
=
mi_
u
int3korr
(
from
);
break
;
case
4
:
x
=
mi_
s
int4korr
(
from
);
break
;
case
4
:
x
=
mi_
u
int4korr
(
from
);
break
;
default:
DBUG_ASSERT
(
0
);
default:
DBUG_ASSERT
(
0
);
}
}
*
buf
=
(
x
^
mask
)
*
powers10
[
DIG_PER_DEC1
-
frac0x
];
*
buf
=
(
x
^
mask
)
*
powers10
[
DIG_PER_DEC1
-
frac0x
];
...
...
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