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
370e02d1
Commit
370e02d1
authored
May 06, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
merging
strings/decimal.c: Auto merged
parents
c43646c2
4aa16ae6
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 @
370e02d1
...
...
@@ -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 @
370e02d1
...
...
@@ -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 @
370e02d1
...
...
@@ -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