Skip to content

ONLY_FULL_GROUP_BY check fails due to negative value #62617

@pcqz

Description

@pcqz

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

create table t(a int);
explain select a,min(a) from t where a=-1;

2. What did you expect to see? (Required)

No error

3. What did you see instead (Required)

ERROR 8123 (HY000): In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'a'; this is incompatible with sql_mode=only_full_group_by

4. What is your TiDB version? (Required)

v7.5.5

Metadata

Metadata

Assignees

Labels

affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.severity/moderatesig/plannerSIG: Plannertype/bugThe issue is confirmed as a bug.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions