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
393ed84c
Commit
393ed84c
authored
May 05, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
a fix (Bug #3435: STDDEV|VARIANCE(constant) returns constant if no rows)
parent
575541b9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
0 deletions
+18
-0
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+8
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+9
-0
sql/item_sum.h
sql/item_sum.h
+1
-0
No files found.
mysql-test/r/func_group.result
View file @
393ed84c
...
...
@@ -648,3 +648,11 @@ select a from t1 having a=1;
a
1
drop table t1;
create table t1 (a int);
select variance(2) from t1;
variance(2)
NULL
select stddev(2) from t1;
stddev(2)
NULL
drop table t1;
mysql-test/t/func_group.test
View file @
393ed84c
...
...
@@ -387,3 +387,12 @@ insert into t1 values (1);
select
max
(
a
)
as
b
from
t1
having
b
=
1
;
select
a
from
t1
having
a
=
1
;
drop
table
t1
;
#
# Bug #3435: variance(const), stddev(const) and an empty table
#
create
table
t1
(
a
int
);
select
variance
(
2
)
from
t1
;
select
stddev
(
2
)
from
t1
;
drop
table
t1
;
sql/item_sum.h
View file @
393ed84c
...
...
@@ -351,6 +351,7 @@ class Item_sum_variance : public Item_sum_num
void
update_field
();
Item
*
result_item
(
Field
*
field
)
{
return
new
Item_variance_field
(
this
);
}
void
no_rows_in_result
()
{}
const
char
*
func_name
()
const
{
return
"variance"
;
}
Item
*
copy_or_same
(
THD
*
thd
);
};
...
...
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