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
8feae4d4
Commit
8feae4d4
authored
Jun 08, 2005
by
hf@deer.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.0
into deer.(none):/home/hf/work/mysql-5.0.9764
parents
a2bf13cd
a881e00a
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
mysql-test/r/type_newdecimal.result
mysql-test/r/type_newdecimal.result
+11
-0
mysql-test/t/type_newdecimal.test
mysql-test/t/type_newdecimal.test
+11
-0
sql/my_decimal.h
sql/my_decimal.h
+5
-0
No files found.
mysql-test/r/type_newdecimal.result
View file @
8feae4d4
...
...
@@ -896,6 +896,8 @@ 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 sql_mode='';
set @sav_dpi= @@div_precision_increment;
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);
...
...
@@ -909,3 +911,12 @@ select 77777777/7777777;
77777777/7777777
10.000000900000090
drop table t1;
set div_precision_increment= @sav_dpi;
create table t1 (a decimal(4,2));
insert into t1 values (0.00);
select * from t1 where a > -0.00;
a
select * from t1 where a = -0.00;
a
0.00
drop table t1;
mysql-test/t/type_newdecimal.test
View file @
8feae4d4
...
...
@@ -934,10 +934,12 @@ 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
;
set
sql_mode
=
''
;
#
# Bug #8425 (insufficient precision of the division)
#
set
@
sav_dpi
=
@@
div_precision_increment
;
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
);
...
...
@@ -945,4 +947,13 @@ select col2/9999999999 from t1 where col1=1;
select
9999999999
/
col2
from
t1
where
col1
=
1
;
select
77777777
/
7777777
;
drop
table
t1
;
set
div_precision_increment
=
@
sav_dpi
;
#
# Bug #10896 (0.00 > -0.00)
#
create
table
t1
(
a
decimal
(
4
,
2
));
insert
into
t1
values
(
0.00
);
select
*
from
t1
where
a
>
-
0.00
;
select
*
from
t1
where
a
=
-
0.00
;
drop
table
t1
;
sql/my_decimal.h
View file @
8feae4d4
...
...
@@ -290,6 +290,11 @@ int int2my_decimal(uint mask, longlong i, my_bool unsigned_flag, my_decimal *d)
inline
void
my_decimal_neg
(
decimal_t
*
arg
)
{
if
(
decimal_is_zero
(
arg
))
{
arg
->
sign
=
0
;
return
;
}
decimal_neg
(
arg
);
}
...
...
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