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
82fc2ce8
Commit
82fc2ce8
authored
Apr 27, 2005
by
ramil@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-4.1
into mysql.com:/usr/home/ram/work/4.1.b9803
parents
d6f80c43
775010a4
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
0 deletions
+26
-0
mysql-test/r/func_math.result
mysql-test/r/func_math.result
+11
-0
mysql-test/t/func_math.test
mysql-test/t/func_math.test
+13
-0
sql/item_func.cc
sql/item_func.cc
+2
-0
No files found.
mysql-test/r/func_math.result
View file @
82fc2ce8
drop table if exists t1;
select floor(5.5),floor(-5.5);
select floor(5.5),floor(-5.5);
floor(5.5) floor(-5.5)
floor(5.5) floor(-5.5)
5 -6
5 -6
...
@@ -126,3 +127,13 @@ Warnings:
...
@@ -126,3 +127,13 @@ Warnings:
Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)`
Note 1003 select degrees(pi()) AS `degrees(pi())`,radians(360) AS `radians(360)`
select rand(rand);
select rand(rand);
ERROR 42S22: Unknown column 'rand' in 'field list'
ERROR 42S22: Unknown column 'rand' in 'field list'
create table t1 select round(1, 6);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`round(1, 6)` double(7,6) NOT NULL default '0.000000'
) ENGINE=MyISAM DEFAULT CHARSET=latin1
select * from t1;
round(1, 6)
1.000000
drop table t1;
mysql-test/t/func_math.test
View file @
82fc2ce8
...
@@ -2,6 +2,10 @@
...
@@ -2,6 +2,10 @@
# Test of math functions
# Test of math functions
#
#
--
disable_warnings
drop
table
if
exists
t1
;
--
enable_warnings
select
floor
(
5.5
),
floor
(
-
5.5
);
select
floor
(
5.5
),
floor
(
-
5.5
);
explain
extended
select
floor
(
5.5
),
floor
(
-
5.5
);
explain
extended
select
floor
(
5.5
),
floor
(
-
5.5
);
select
ceiling
(
5.5
),
ceiling
(
-
5.5
);
select
ceiling
(
5.5
),
ceiling
(
-
5.5
);
...
@@ -58,3 +62,12 @@ explain extended select degrees(pi()),radians(360);
...
@@ -58,3 +62,12 @@ explain extended select degrees(pi()),radians(360);
--
error
1054
--
error
1054
select
rand
(
rand
);
select
rand
(
rand
);
#
# Bug #9837: problem with round()
#
create
table
t1
select
round
(
1
,
6
);
show
create
table
t1
;
select
*
from
t1
;
drop
table
t1
;
sql/item_func.cc
View file @
82fc2ce8
...
@@ -1072,6 +1072,8 @@ void Item_func_round::fix_length_and_dec()
...
@@ -1072,6 +1072,8 @@ void Item_func_round::fix_length_and_dec()
decimals
=
0
;
decimals
=
0
;
else
else
decimals
=
min
(
tmp
,
NOT_FIXED_DEC
);
decimals
=
min
(
tmp
,
NOT_FIXED_DEC
);
if
((
tmp
=
decimals
-
args
[
0
]
->
decimals
)
>
0
)
max_length
+=
tmp
;
}
}
}
}
...
...
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