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
a810a2a4
Commit
a810a2a4
authored
Jul 23, 2006
by
ramil/ram@mysql.com/myoffice.izhnet.ru
Browse files
Options
Browse Files
Download
Plain Diff
Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint
into mysql.com:/usr/home/ram/work/5.0.b10966
parents
d5b41988
ca345ded
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
26 additions
and
4 deletions
+26
-4
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+14
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+11
-0
sql/item_sum.cc
sql/item_sum.cc
+0
-3
sql/item_sum.h
sql/item_sum.h
+1
-1
No files found.
mysql-test/r/func_group.result
View file @
a810a2a4
...
...
@@ -988,3 +988,17 @@ SUM(a)
6
DROP TABLE t1;
set div_precision_increment= @sav_dpi;
create table t1 select variance(0);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`variance(0)` double(8,4) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
create table t1 select stddev(0);
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`stddev(0)` double(8,4) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop table t1;
mysql-test/t/func_group.test
View file @
a810a2a4
...
...
@@ -660,3 +660,14 @@ SELECT SUM(a) FROM t1 GROUP BY b/c;
DROP
TABLE
t1
;
set
div_precision_increment
=
@
sav_dpi
;
#
# Bug #10966: Variance functions return wrong data type
#
create
table
t1
select
variance
(
0
);
show
create
table
t1
;
drop
table
t1
;
create
table
t1
select
stddev
(
0
);
show
create
table
t1
;
drop
table
t1
;
\ No newline at end of file
sql/item_sum.cc
View file @
a810a2a4
...
...
@@ -1256,9 +1256,6 @@ Field *Item_sum_variance::create_tmp_field(bool group, TABLE *table,
sizeof
(
double
)
*
2
)
+
sizeof
(
longlong
),
0
,
name
,
table
,
&
my_charset_bin
);
}
if
(
hybrid_type
==
DECIMAL_RESULT
)
return
new
Field_new_decimal
(
max_length
,
maybe_null
,
name
,
table
,
decimals
,
unsigned_flag
);
return
new
Field_double
(
max_length
,
maybe_null
,
name
,
table
,
decimals
);
}
...
...
sql/item_sum.h
View file @
a810a2a4
...
...
@@ -688,7 +688,7 @@ class Item_sum_variance : public Item_sum_num
{
return
sample
?
"var_samp("
:
"variance("
;
}
Item
*
copy_or_same
(
THD
*
thd
);
Field
*
create_tmp_field
(
bool
group
,
TABLE
*
table
,
uint
convert_blob_length
);
enum
Item_result
result_type
()
const
{
return
hybrid_type
;
}
enum
Item_result
result_type
()
const
{
return
REAL_RESULT
;
}
};
class
Item_sum_std
;
...
...
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