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
e2a6fe0f
Commit
e2a6fe0f
authored
May 07, 2005
by
monty@mishka.local
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-5.0
into mishka.local:/home/my/mysql-5.0
parents
81e46539
fb372588
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
8 deletions
+20
-8
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+3
-0
mysql-test/t/type_newdecimal.test
mysql-test/t/type_newdecimal.test
+5
-0
strings/decimal.c
strings/decimal.c
+12
-8
No files found.
mysql-test/r/type_newdecimal.result
View file @
e2a6fe0f
...
...
@@ -857,3 +857,6 @@ NULL
Warnings:
Error 1292 Truncated incorrect DECIMAL value: ''
Error 1292 Truncated incorrect DECIMAL value: ''
select 0.190287977636363637 + 0.040372670 * 0 - 0;
0.190287977636363637 + 0.040372670 * 0 - 0
0.190287977636363637
mysql-test/t/type_newdecimal.test
View file @
e2a6fe0f
...
...
@@ -882,3 +882,8 @@ select 0/0;
#
select
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
as
x
;
select
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
+
1
as
x
;
#
# Bug #10004
#
select
0.190287977636363637
+
0.040372670
*
0
-
0
;
strings/decimal.c
View file @
e2a6fe0f
...
...
@@ -1709,19 +1709,23 @@ static int do_sub(decimal_t *from1, decimal_t *from2, decimal_t *to)
carry
=
1
;
else
if
(
intg2
==
intg1
)
{
while
(
unlikely
(
stop1
[
frac1
-
1
]
==
0
))
frac1
--
;
while
(
unlikely
(
stop2
[
frac2
-
1
]
==
0
))
frac2
--
;
while
(
buf1
<
stop1
+
frac1
&&
buf2
<
stop2
+
frac2
&&
*
buf1
==
*
buf2
)
dec1
*
end1
=
stop1
+
(
frac1
-
1
);
dec1
*
end2
=
stop2
+
(
frac2
-
1
);
while
(
unlikely
((
buf1
<=
end1
)
&&
(
*
end1
==
0
)))
end1
--
;
while
(
unlikely
((
buf2
<=
end2
)
&&
(
*
end2
==
0
)))
end2
--
;
frac1
=
(
end1
-
stop1
)
+
1
;
frac2
=
(
end2
-
stop2
)
+
1
;
while
(
buf1
<=
end1
&&
buf2
<=
end2
&&
*
buf1
==
*
buf2
)
buf1
++
,
buf2
++
;
if
(
buf1
<
stop1
+
frac
1
)
if
(
buf2
<
stop2
+
frac
2
)
if
(
buf1
<
=
end
1
)
if
(
buf2
<
=
end
2
)
carry
=
*
buf2
>
*
buf1
;
else
carry
=
0
;
else
if
(
buf2
<
stop2
+
frac
2
)
if
(
buf2
<
=
end
2
)
carry
=
1
;
else
/* short-circuit everything: from1 == from2 */
{
...
...
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