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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
47d6f7a6
Commit
47d6f7a6
authored
Jul 21, 2006
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into rakia.(none):/home/kgeorge/mysql/autopush/B20868-5.0-opt
parents
f57bb347
8024aabb
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
1 deletion
+27
-1
mysql-test/r/func_group.result
mysql-test/r/func_group.result
+11
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+15
-0
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/r/func_group.result
View file @
47d6f7a6
...
...
@@ -988,3 +988,14 @@ SUM(a)
6
DROP TABLE t1;
set div_precision_increment= @sav_dpi;
CREATE TABLE t1 (a INT PRIMARY KEY, b INT);
INSERT INTO t1 VALUES (1,1), (2,2);
CREATE TABLE t2 (a INT PRIMARY KEY, b INT);
INSERT INTO t2 VALUES (1,1), (3,3);
SELECT SQL_NO_CACHE
(SELECT SUM(c.a) FROM t1 ttt, t2 ccc
WHERE ttt.a = ccc.b AND ttt.a = t.a GROUP BY ttt.a) AS minid
FROM t1 t, t2 c WHERE t.a = c.b;
minid
NULL
DROP TABLE t1,t2;
mysql-test/t/func_group.test
View file @
47d6f7a6
...
...
@@ -660,3 +660,18 @@ SELECT SUM(a) FROM t1 GROUP BY b/c;
DROP
TABLE
t1
;
set
div_precision_increment
=
@
sav_dpi
;
#
# Bug #20868: Client connection is broken on SQL query error
#
CREATE
TABLE
t1
(
a
INT
PRIMARY
KEY
,
b
INT
);
INSERT
INTO
t1
VALUES
(
1
,
1
),
(
2
,
2
);
CREATE
TABLE
t2
(
a
INT
PRIMARY
KEY
,
b
INT
);
INSERT
INTO
t2
VALUES
(
1
,
1
),
(
3
,
3
);
SELECT
SQL_NO_CACHE
(
SELECT
SUM
(
c
.
a
)
FROM
t1
ttt
,
t2
ccc
WHERE
ttt
.
a
=
ccc
.
b
AND
ttt
.
a
=
t
.
a
GROUP
BY
ttt
.
a
)
AS
minid
FROM
t1
t
,
t2
c
WHERE
t
.
a
=
c
.
b
;
DROP
TABLE
t1
,
t2
;
sql/sql_select.cc
View file @
47d6f7a6
...
...
@@ -12806,7 +12806,7 @@ count_field_types(TMP_TABLE_PARAM *param, List<Item> &fields,
{
if
(
!
field
->
const_item
())
{
Item_sum
*
sum_item
=
(
Item_sum
*
)
field
;
Item_sum
*
sum_item
=
(
Item_sum
*
)
field
->
real_item
()
;
if
(
!
sum_item
->
quick_group
)
param
->
quick_group
=
0
;
// UDF SUM function
param
->
sum_func_count
++
;
...
...
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