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
732fb06e
Commit
732fb06e
authored
Jun 08, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for bug #8425 (Insufficient precision in the '/' operation)
As the bug was already fixed, just testcase added here
parent
935b5ec4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+13
-0
mysql-test/t/type_newdecimal.test
mysql-test/t/type_newdecimal.test
+12
-0
No files found.
mysql-test/r/type_newdecimal.result
View file @
732fb06e
...
...
@@ -896,3 +896,16 @@ create table t1( d1 decimal(18) unsigned, d2 decimal(20) unsigned, d3 decimal (2
insert into t1 values(1,-1,-1);
ERROR 22003: Out of range value adjusted for column 'd2' at row 1
drop table t1;
set @@div_precision_increment=15;
create table t1 (col1 int, col2 decimal(30,25), col3 numeric(30,25));
insert into t1 values (1,0.0123456789012345678912345,0.0123456789012345678912345);
select col2/9999999999 from t1 where col1=1;
col2/9999999999
0.000000000001234567890246913578
select 9999999999/col2 from t1 where col1=1;
9999999999/col2
810000007209.000065537105051
select 77777777/7777777;
77777777/7777777
10.000000900000090
drop table t1;
mysql-test/t/type_newdecimal.test
View file @
732fb06e
...
...
@@ -934,3 +934,15 @@ create table t1( d1 decimal(18) unsigned, d2 decimal(20) unsigned, d3 decimal (2
--
error
1264
insert
into
t1
values
(
1
,
-
1
,
-
1
);
drop
table
t1
;
#
# Bug #8425 (insufficient precision of the division)
#
set
@@
div_precision_increment
=
15
;
create
table
t1
(
col1
int
,
col2
decimal
(
30
,
25
),
col3
numeric
(
30
,
25
));
insert
into
t1
values
(
1
,
0.0123456789012345678912345
,
0.0123456789012345678912345
);
select
col2
/
9999999999
from
t1
where
col1
=
1
;
select
9999999999
/
col2
from
t1
where
col1
=
1
;
select
77777777
/
7777777
;
drop
table
t1
;
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