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
a4da332e
Commit
a4da332e
authored
Oct 13, 2007
by
gkodinov/kgeorge@magare.gmz
Browse files
Options
Browse Files
Download
Plain Diff
Merge gkodinov@bk-internal.mysql.com:/home/bk/mysql-5.0-opt
into magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.0-opt
parents
737dd704
67302b12
Changes
3
Show 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
+10
-0
mysql-test/t/func_group.test
mysql-test/t/func_group.test
+13
-0
sql/item_sum.cc
sql/item_sum.cc
+4
-1
No files found.
mysql-test/r/func_group.result
View file @
a4da332e
...
...
@@ -1377,4 +1377,14 @@ SELECT MIN(a), MIN(b) FROM t5 WHERE a = 1 and b > 1;
MIN(a) MIN(b)
1 2
DROP TABLE t1, t2, t3, t4, t5;
CREATE TABLE t1 (a INT);
INSERT INTO t1 values (),(),();
SELECT (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) ) as x FROM t1
GROUP BY x;
x
0
SELECT 1 FROM t1 GROUP BY (SELECT SLEEP(0) FROM t1 ORDER BY AVG(DISTINCT a) );
1
1
DROP TABLE t1;
End of 5.0 tests
mysql-test/t/func_group.test
View file @
a4da332e
...
...
@@ -860,5 +860,18 @@ SELECT MIN(a), MIN(b) FROM t5 WHERE a = 1 and b > 1;
DROP
TABLE
t1
,
t2
,
t3
,
t4
,
t5
;
#
# Bug #31156: mysqld: item_sum.cc:918:
# virtual bool Item_sum_distinct::setup(THD*): Assertion
#
CREATE
TABLE
t1
(
a
INT
);
INSERT
INTO
t1
values
(),(),();
SELECT
(
SELECT
SLEEP
(
0
)
FROM
t1
ORDER
BY
AVG
(
DISTINCT
a
)
)
as
x
FROM
t1
GROUP
BY
x
;
SELECT
1
FROM
t1
GROUP
BY
(
SELECT
SLEEP
(
0
)
FROM
t1
ORDER
BY
AVG
(
DISTINCT
a
)
);
DROP
TABLE
t1
;
###
--
echo
End
of
5.0
tests
sql/item_sum.cc
View file @
a4da332e
...
...
@@ -905,7 +905,9 @@ bool Item_sum_distinct::setup(THD *thd)
List
<
create_field
>
field_list
;
create_field
field_def
;
/* field definition */
DBUG_ENTER
(
"Item_sum_distinct::setup"
);
DBUG_ASSERT
(
tree
==
0
);
/* It's legal to call setup() more than once when in a subquery */
if
(
tree
)
return
FALSE
;
/*
Virtual table and the tree are created anew on each re-execution of
...
...
@@ -2443,6 +2445,7 @@ bool Item_sum_count_distinct::setup(THD *thd)
/*
Setup can be called twice for ROLLUP items. This is a bug.
Please add DBUG_ASSERT(tree == 0) here when it's fixed.
It's legal to call setup() more than once when in a subquery
*/
if
(
tree
||
table
||
tmp_table_param
)
return
FALSE
;
...
...
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