mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge magare.gmz:/home/kgeorge/mysql/work/B34747-5.0-opt
into magare.gmz:/home/kgeorge/mysql/work/B34747-5.1-opt libmysql/libmysql.c: Auto merged libmysqld/lib_sql.cc: Auto merged mysql-test/r/func_gconcat.result: Auto merged mysql-test/t/func_gconcat.test: Auto merged sql/item_sum.cc: Auto merged sql/log.cc: Auto merged sql/sql_yacc.yy: Auto merged mysql-test/r/subselect.result: merged bug 34747 and 33266 5.0-opt->5.1-opt mysql-test/t/subselect.test: merged bug 34747 and 33266 5.0-opt->5.1-opt
This commit is contained in:
@ -937,4 +937,19 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1;
|
||||
GROUP_CONCAT(DISTINCT b, a ORDER BY b)
|
||||
11,22,32
|
||||
DROP TABLE t1, t2, t3;
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (),();
|
||||
SELECT s1.d1 FROM
|
||||
(
|
||||
SELECT
|
||||
t1.a as d1,
|
||||
GROUP_CONCAT(DISTINCT t1.a) AS d2
|
||||
FROM
|
||||
t1 AS t1,
|
||||
t1 AS t2
|
||||
GROUP BY 1
|
||||
) AS s1;
|
||||
d1
|
||||
NULL
|
||||
DROP TABLE t1;
|
||||
End of 5.0 tests
|
||||
|
@ -640,4 +640,21 @@ SELECT GROUP_CONCAT(DISTINCT b, a ORDER BY b) FROM t1;
|
||||
|
||||
DROP TABLE t1, t2, t3;
|
||||
|
||||
#
|
||||
# Bug #34747: crash in debug assertion check after derived table
|
||||
#
|
||||
CREATE TABLE t1(a INT);
|
||||
INSERT INTO t1 VALUES (),();
|
||||
SELECT s1.d1 FROM
|
||||
(
|
||||
SELECT
|
||||
t1.a as d1,
|
||||
GROUP_CONCAT(DISTINCT t1.a) AS d2
|
||||
FROM
|
||||
t1 AS t1,
|
||||
t1 AS t2
|
||||
GROUP BY 1
|
||||
) AS s1;
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo End of 5.0 tests
|
||||
|
@ -3015,6 +3015,52 @@ INSERT INTO t2 VALUES (103, 203);
|
||||
SELECT ((a1,a2) IN (SELECT * FROM t2 WHERE b2 > 0)) IS NULL FROM t1;
|
||||
DROP TABLE t1, t2;
|
||||
|
||||
#
|
||||
# Bug31048: Many nested subqueries may cause server crash.
|
||||
#
|
||||
create table t1(a int,b int,key(a),key(b));
|
||||
insert into t1(a,b) values (1,2),(2,1),(2,3),(3,4),(5,4),(5,5),
|
||||
(6,7),(7,4),(5,3);
|
||||
|
||||
let $nesting= 26;
|
||||
let $should_work_nesting= 5;
|
||||
let $start= select sum(a),a from t1 where a> ( select sum(a) from t1 ;
|
||||
let $end= )group by a ;
|
||||
let $start_app= where a> ( select sum(a) from t1 ;
|
||||
let $end_pre= )group by b limit 1 ;
|
||||
|
||||
--disable_result_log
|
||||
--disable_query_log
|
||||
# At least 4 level nesting should work without errors
|
||||
while ($should_work_nesting)
|
||||
{
|
||||
--echo $should_work_nesting
|
||||
eval $start $end;
|
||||
eval explain $start $end;
|
||||
let $start= $start
|
||||
$start_app;
|
||||
let $end= $end_pre
|
||||
$end;
|
||||
dec $should_work_nesting;
|
||||
}
|
||||
# Other may fail with the 'stack overrun error'
|
||||
while ($nesting)
|
||||
{
|
||||
--echo $nesting
|
||||
--error 0,1436
|
||||
eval $start $end;
|
||||
--error 0,1436
|
||||
eval explain $start $end;
|
||||
let $start= $start
|
||||
$start_app;
|
||||
let $end= $end_pre
|
||||
$end;
|
||||
dec $nesting;
|
||||
}
|
||||
--enable_result_log
|
||||
--enable_query_log
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug #28076: inconsistent binary/varbinary comparison
|
||||
#
|
||||
|
@ -3494,6 +3494,6 @@ void Item_func_group_concat::print(String *str)
|
||||
|
||||
Item_func_group_concat::~Item_func_group_concat()
|
||||
{
|
||||
if (unique_filter)
|
||||
if (!original && unique_filter)
|
||||
delete unique_filter;
|
||||
}
|
||||
|
Reference in New Issue
Block a user