mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
Merge magare.gmz:/home/kgeorge/mysql/autopush/B31156-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B31156-5.1-opt mysql-test/r/func_group.result: Auto merged mysql-test/t/func_group.test: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_sum.cc: Auto merged
This commit is contained in:
@ -1368,4 +1368,14 @@ SELECT MIN(a), MIN(b) FROM t5 WHERE a = 1 and b > 1;
|
|||||||
MIN(a) MIN(b)
|
MIN(a) MIN(b)
|
||||||
1 2
|
1 2
|
||||||
DROP TABLE t1, t2, t3, t4, t5;
|
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
|
End of 5.0 tests
|
||||||
|
@ -867,5 +867,18 @@ SELECT MIN(a), MIN(b) FROM t5 WHERE a = 1 and b > 1;
|
|||||||
|
|
||||||
DROP TABLE t1, t2, t3, t4, t5;
|
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
|
--echo End of 5.0 tests
|
||||||
|
@ -915,7 +915,9 @@ bool Item_sum_distinct::setup(THD *thd)
|
|||||||
List<Create_field> field_list;
|
List<Create_field> field_list;
|
||||||
Create_field field_def; /* field definition */
|
Create_field field_def; /* field definition */
|
||||||
DBUG_ENTER("Item_sum_distinct::setup");
|
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
|
Virtual table and the tree are created anew on each re-execution of
|
||||||
@ -2462,6 +2464,7 @@ bool Item_sum_count_distinct::setup(THD *thd)
|
|||||||
/*
|
/*
|
||||||
Setup can be called twice for ROLLUP items. This is a bug.
|
Setup can be called twice for ROLLUP items. This is a bug.
|
||||||
Please add DBUG_ASSERT(tree == 0) here when it's fixed.
|
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)
|
if (tree || table || tmp_table_param)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
Reference in New Issue
Block a user