Description:
On current 5.7.3 tree, the default for log_error_verbosity (aka log_warnings) is 2 which causes huge amount of spam when running randomized queries.
performance_schema can be used to track query errors. Also, this is good enough information that is fetch-able by the client:
mysql> select group_concat(distinct t1.a) a
-> from t1 where t1.a = (select a from t1)
-> group by b;
ERROR 1242 (21000): Subquery returns more than 1 row
mysql> show warnings;
+-------+------+------------------------------------------------+
| Level | Code | Message |
+-------+------+------------------------------------------------+
| Error | 1242 | Subquery returns more than 1 row |
| Error | 1028 | Sort aborted: Subquery returns more than 1 row |
+-------+------+------------------------------------------------+
2 rows in set (0.00 sec)
Error log does NOT need this, which can lead to a DoS type of problem:
2013-08-28T07:55:35.003767Z 3 [ERROR] mysqld.exe: Sort aborted: Subquery returns more than 1 row
2013-08-28T07:55:35.004267Z 3 [Note] Sort aborted, host: , user: , thread: 3, query: select group_concat(distinct t1.a) a
from t1 where t1.a = (select a from t1)
group by b
How to repeat:
drop table if exists `t1`;
create table `t1` (`a` int,`b` int) engine=myisam;
insert into `t1` values (2,4),(7,8);
select group_concat(distinct t1.a) a
from t1 where t1.a = (select a from t1)
group by b;
Description: On current 5.7.3 tree, the default for log_error_verbosity (aka log_warnings) is 2 which causes huge amount of spam when running randomized queries. performance_schema can be used to track query errors. Also, this is good enough information that is fetch-able by the client: mysql> select group_concat(distinct t1.a) a -> from t1 where t1.a = (select a from t1) -> group by b; ERROR 1242 (21000): Subquery returns more than 1 row mysql> show warnings; +-------+------+------------------------------------------------+ | Level | Code | Message | +-------+------+------------------------------------------------+ | Error | 1242 | Subquery returns more than 1 row | | Error | 1028 | Sort aborted: Subquery returns more than 1 row | +-------+------+------------------------------------------------+ 2 rows in set (0.00 sec) Error log does NOT need this, which can lead to a DoS type of problem: 2013-08-28T07:55:35.003767Z 3 [ERROR] mysqld.exe: Sort aborted: Subquery returns more than 1 row 2013-08-28T07:55:35.004267Z 3 [Note] Sort aborted, host: , user: , thread: 3, query: select group_concat(distinct t1.a) a from t1 where t1.a = (select a from t1) group by b How to repeat: drop table if exists `t1`; create table `t1` (`a` int,`b` int) engine=myisam; insert into `t1` values (2,4),(7,8); select group_concat(distinct t1.a) a from t1 where t1.a = (select a from t1) group by b;