Commit 0a992ff5 authored by Tatiana A. Nurnberg's avatar Tatiana A. Nurnberg

auto-merge

parents c55ba71e ab6feabb
if (`SELECT @@binlog_format = 'ROW'`)
{
skip Test cannot run with binlog_format row;
}
......@@ -356,6 +356,8 @@ sub post_check_client_group {
}
if (IS_WINDOWS)
{
if (! $self->{ARGS}->{embedded})
{
# Shared memory base may or may not be defined (e.g not defined in embedded)
my $shm = $group_to_copy_from->option("shared-memory-base-name");
......@@ -364,6 +366,7 @@ sub post_check_client_group {
$config->insert($client_group_name,"shared-memory-base-name", $shm->value());
}
}
}
}
......
......@@ -28,5 +28,5 @@ SELECT d FROM t2,t1 WHERE d=(SELECT MAX(a) FROM t1 WHERE t1.a > t2.d);
ERROR 40001: Deadlock found when trying to get lock; try restarting transaction
# in thread2
d
# in default
# in thread1;
DROP TABLE t1,t2;
......@@ -978,4 +978,21 @@ GROUP BY t1.a
1
1
DROP TABLE t1, t2;
CREATE TABLE t1 (f1 INT);
INSERT INTO t1 VALUES (),();
EXPLAIN EXTENDED SELECT 1 FROM
(SELECT DISTINCT GROUP_CONCAT(td.f1) FROM t1,t1 AS td GROUP BY td.f1) AS d,t1;
id select_type table type possible_keys key key_len ref rows filtered Extra
1 PRIMARY <derived2> system NULL NULL NULL NULL 1 100.00
1 PRIMARY t1 ALL NULL NULL NULL NULL 2 100.00
2 DERIVED t1 ALL NULL NULL NULL NULL 2 100.00 Using temporary; Using filesort; Distinct
2 DERIVED td ALL NULL NULL NULL NULL 2 100.00 Distinct; Using join buffer
Warnings:
Note 1003 select 1 AS `1` from (select distinct group_concat(`test`.`td`.`f1` separator ',') AS `GROUP_CONCAT(td.f1)` from `test`.`t1` join `test`.`t1` `td` group by `test`.`td`.`f1`) `d` join `test`.`t1`
SELECT 1 FROM
(SELECT DISTINCT GROUP_CONCAT(td.f1) FROM t1,t1 AS td GROUP BY td.f1) AS d,t1;
1
1
1
DROP TABLE t1;
End of 5.0 tests
-- source include/have_log_bin.inc
-- source include/have_innodb.inc
-- source include/not_binlog_format_row.inc
--echo #
--echo # Bug #39022: Mysql randomly crashing in lock_sec_rec_cons_read_sees
......@@ -49,10 +50,14 @@ connection thread2;
--echo # in thread2
REAP;
connection default;
--echo # in default
disconnect thread2;
--source include/wait_until_disconnected.inc
connection thread1;
--echo # in thread1;
disconnect thread1;
disconnect thread2;
--source include/wait_until_disconnected.inc
connection default;
DROP TABLE t1,t2;
......@@ -693,4 +693,19 @@ SELECT 1 FROM t1 WHERE t1.a NOT IN
DROP TABLE t1, t2;
#
# Bug #49487: crash with explain extended and group_concat in a derived table
#
CREATE TABLE t1 (f1 INT);
INSERT INTO t1 VALUES (),();
EXPLAIN EXTENDED SELECT 1 FROM
(SELECT DISTINCT GROUP_CONCAT(td.f1) FROM t1,t1 AS td GROUP BY td.f1) AS d,t1;
SELECT 1 FROM
(SELECT DISTINCT GROUP_CONCAT(td.f1) FROM t1,t1 AS td GROUP BY td.f1) AS d,t1;
DROP TABLE t1;
--echo End of 5.0 tests
......@@ -3402,6 +3402,8 @@ String* Item_func_group_concat::val_str(String* str)
void Item_func_group_concat::print(String *str, enum_query_type query_type)
{
/* orig_args is not filled with valid values until fix_fields() */
Item **pargs= fixed ? orig_args : args;
str->append(STRING_WITH_LEN("group_concat("));
if (distinct)
str->append(STRING_WITH_LEN("distinct "));
......@@ -3409,7 +3411,7 @@ void Item_func_group_concat::print(String *str, enum_query_type query_type)
{
if (i)
str->append(',');
args[i]->print(str, query_type);
pargs[i]->print(str, query_type);
}
if (arg_count_order)
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment