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
d605dcd0
Commit
d605dcd0
authored
May 06, 2005
by
unknown
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
caf89de2
c43646c2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
27 additions
and
4 deletions
+27
-4
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
+6
-0
sql/my_decimal.cc
sql/my_decimal.cc
+3
-3
strings/decimal.c
strings/decimal.c
+7
-1
No files found.
mysql-test/r/type_newdecimal.result
View file @
d605dcd0
...
@@ -846,3 +846,14 @@ set sql_mode='';
...
@@ -846,3 +846,14 @@ set sql_mode='';
select 0/0;
select 0/0;
0/0
0/0
NULL
NULL
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 as x;
x
999999999999999999999999999999999999999999999999999999999999999999999999999999999
Warnings:
Error 1292 Truncated incorrect DECIMAL value: ''
select 9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999 + 1 as x;
x
NULL
Warnings:
Error 1292 Truncated incorrect DECIMAL value: ''
Error 1292 Truncated incorrect DECIMAL value: ''
mysql-test/t/type_newdecimal.test
View file @
d605dcd0
...
@@ -876,3 +876,9 @@ select 10.3330000000000/12.34500000;
...
@@ -876,3 +876,9 @@ select 10.3330000000000/12.34500000;
set
sql_mode
=
''
;
set
sql_mode
=
''
;
select
0
/
0
;
select
0
/
0
;
#
# bug #9546
#
select
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
as
x
;
select
9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999
+
1
as
x
;
sql/my_decimal.cc
View file @
d605dcd0
...
@@ -43,9 +43,9 @@ int decimal_operation_results(int result)
...
@@ -43,9 +43,9 @@ int decimal_operation_results(int result)
break
;
break
;
case
E_DEC_OVERFLOW
:
case
E_DEC_OVERFLOW
:
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
ER_WARN_DATA_OUT_OF_RANG
E
,
ER_TRUNCATED_WRONG_VALU
E
,
ER
(
ER_WARN_DATA_OUT_OF_RANG
E
),
ER
(
ER_TRUNCATED_WRONG_VALU
E
),
"
"
,
(
long
)
-
1
);
"
DECIMAL"
,
""
);
break
;
break
;
case
E_DEC_DIV_ZERO
:
case
E_DEC_DIV_ZERO
:
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
push_warning_printf
(
current_thd
,
MYSQL_ERROR
::
WARN_LEVEL_ERROR
,
...
...
strings/decimal.c
View file @
d605dcd0
...
@@ -1612,13 +1612,19 @@ static int do_add(decimal_t *from1, decimal_t *from2, decimal_t *to)
...
@@ -1612,13 +1612,19 @@ static int do_add(decimal_t *from1, decimal_t *from2, decimal_t *to)
x
=
intg1
>
intg2
?
from1
->
buf
[
0
]
:
x
=
intg1
>
intg2
?
from1
->
buf
[
0
]
:
intg2
>
intg1
?
from2
->
buf
[
0
]
:
intg2
>
intg1
?
from2
->
buf
[
0
]
:
from1
->
buf
[
0
]
+
from2
->
buf
[
0
]
;
from1
->
buf
[
0
]
+
from2
->
buf
[
0
]
;
if
(
unlikely
(
x
>
DIG_MA
SK
*
9
))
/* yes, there is */
if
(
unlikely
(
x
>
DIG_MA
X
-
1
))
/* yes, there is */
{
{
intg0
++
;
intg0
++
;
to
->
buf
[
0
]
=
0
;
/* safety */
to
->
buf
[
0
]
=
0
;
/* safety */
}
}
FIX_INTG_FRAC_ERROR
(
to
->
len
,
intg0
,
frac0
,
error
);
FIX_INTG_FRAC_ERROR
(
to
->
len
,
intg0
,
frac0
,
error
);
if
(
unlikely
(
error
==
E_DEC_OVERFLOW
))
{
max_decimal
(
to
->
len
*
DIG_PER_DEC1
,
0
,
to
);
return
error
;
}
buf0
=
to
->
buf
+
intg0
+
frac0
;
buf0
=
to
->
buf
+
intg0
+
frac0
;
to
->
sign
=
from1
->
sign
;
to
->
sign
=
from1
->
sign
;
...
...
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