Commit Graph

7 Commits

Author SHA1 Message Date
b5f9b35a45 plan: refactor the code of building Insert. (#7068) 2018-07-25 22:41:42 +08:00
a9360655e8 plan: fix a bug when 'only_full_group_by' is set in sql_mode (#6734)
when 'only_full_group_by' is set in sql_mode, raise error for non-aggregated column in query without GROUP BY.

mysql> create table t(a bigint, b bigint, c bigint);                                                                                           Query OK, 0 rows affected (0.02 sec)

mysql> select a, max(b) from t;
ERROR 1140 (42000): In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column 'dc_test.t.a'; this is incompatible with sql_mode=only_full_group_by
2018-06-25 17:03:00 +08:00
db4888a697 plan, parser: fix the wrong result of the UNION statement (#6752)
tidb diff result with mysql when mix use union and union-all fix #6731
- rename `selectStmt.UnionDistinct` to `selectStmt.IsAfterUnionDistinct`
- add explain test
- remove useless `unionStmt.Distinct` and `selectList.Distinct`
- refactor use golang slice, remove dup code
- return WrongNumColumnInSelect error and add test case
2018-06-07 17:08:26 +08:00
006a6286bf plan: detect table alias duplication for 'JOIN' (#6716) 2018-06-05 15:25:49 +08:00
9b67f7c5e0 plan: check invalid task after physical optimization (#6702) 2018-05-31 13:28:53 +08:00
6248a74d6f plan: refactor errors (#6377) 2018-05-09 13:07:21 +08:00
e41b908c02 plan :fix the compatibility problem of UNION statement (#6370) 2018-04-25 14:29:15 +08:00