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
c4d3178e
Commit
c4d3178e
authored
May 17, 2007
by
holyfoot/hf@hfmain.(none)
Browse files
Options
Browse Files
Download
Plain Diff
Merge abotchkov@bk-internal.mysql.com:/home/bk/mysql-5.1-opt
into mysql.com:/home/hf/work/8663/my51-8663
parents
72b7b7de
cd4fbe11
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
1 deletion
+22
-1
mysql-test/r/bigint.result
mysql-test/r/bigint.result
+10
-0
mysql-test/t/bigint.test
mysql-test/t/bigint.test
+7
-0
strings/decimal.c
strings/decimal.c
+5
-1
No files found.
mysql-test/r/bigint.result
View file @
c4d3178e
...
...
@@ -352,6 +352,16 @@ select c1 mod 50 as result from t1;
result
6
drop table t1;
select cast(19999999999999999999 as signed);
cast(19999999999999999999 as signed)
9223372036854775807
Warnings:
Error 1292 Truncated incorrect DECIMAL value: ''
select cast(-19999999999999999999 as signed);
cast(-19999999999999999999 as signed)
-9223372036854775808
Warnings:
Error 1292 Truncated incorrect DECIMAL value: ''
create table t1 select -9223372036854775808 bi;
describe t1;
Field Type Null Key Default Extra
...
...
mysql-test/t/bigint.test
View file @
c4d3178e
...
...
@@ -288,6 +288,13 @@ insert into t1 values (10000002383263201056);
select
c1
mod
50
as
result
from
t1
;
drop
table
t1
;
#
# Bug #8663 cant use bgint unsigned as input to cast
#
select
cast
(
19999999999999999999
as
signed
);
select
cast
(
-
19999999999999999999
as
signed
);
# Bug #28005 Partitions: can't use -9223372036854775808
create
table
t1
select
-
9223372036854775808
bi
;
describe
t1
;
...
...
strings/decimal.c
View file @
c4d3178e
...
...
@@ -1089,7 +1089,11 @@ int decimal2longlong(decimal_t *from, longlong *to)
x
=
x
*
DIG_BASE
-
*
buf
++
;
if
(
unlikely
(
y
<
(
LONGLONG_MIN
/
DIG_BASE
)
||
x
>
y
))
{
*
to
=
from
->
sign
?
y
:
-
y
;
/*
the decimal is bigger than any possible integer
return border integer depending on the sign
*/
*
to
=
from
->
sign
?
LONGLONG_MIN
:
LONGLONG_MAX
;
return
E_DEC_OVERFLOW
;
}
}
...
...
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