[MDEV-2408] LP:798597 - Incorrect "Duplicate entry" error with views and GROUP BY in maria-5.3 Created: 2011-06-17 Updated: 2015-02-02 Resolved: 2012-10-04 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major |
| Reporter: | Philip Stoev (Inactive) | Assignee: | Michael Widenius |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | Launchpad | ||
| Attachments: |
|
| Description |
|
The following query: SELECT COUNT returns the following error: 1062: 'Duplicate entry 'NULL-NULL-0' for key 'group_key' The "group_key" is not reflected in the EXPLAIN and derived* optimizer switches have no effect. explain: id select_type table type possible_keys key key_len ref rows Extra test case: CREATE TABLE t1 ( f1 int) ; CREATE TABLE t2 (f1 int not null, f3 int, f10 int) ; CREATE TABLE t3 (f1 int); EXPLAIN SELECT COUNT --error 0 |
| Comments |
| Comment by Philip Stoev (Inactive) [ 2011-06-17 ] |
|
Incorrect "Duplicate entry" error with views and GROUP BY in maria-5.3 Not repeatable in maria-5.2, mysql-5.1. The following query: SELECT COUNT returns the following error: 1062: 'Duplicate entry 'NULL-NULL-0' for key 'group_key' The "group_key" is not reflected in the EXPLAIN and derived* optimizer switches have no effect. explain: id select_type table type possible_keys key key_len ref rows Extra test case: CREATE TABLE t1 ( f1 int) ; CREATE TABLE t2 (f1 int not null, f3 int, f10 int) ; CREATE TABLE t3 (f1 int); EXPLAIN SELECT COUNT --error 0 |
| Comment by Igor Babaev [ 2011-06-23 ] |
|
Re: Incorrect "Duplicate entry" error with views and GROUP BY in maria-5.3 Server version: 5.1.58-MariaDB-debug Source distribution This software comes with ABSOLUTELY NO WARRANTY. This is free software, Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. MariaDB [test]> CREATE TABLE t1 ( f1 int NOT NULL , f2 int NOT NULL ) ; MariaDB [test]> INSERT INTO t1 VALUES (214,0),(6,6); MariaDB [test]> MariaDB [test]> INSERT INTO t2 VALUES (88),(88); MariaDB [test]> MariaDB [test]> SELECT f1 , MIN(f2) FROM v2 GROUP BY f1; The bug is not reproducible with the latest mysql-5.1. |
| Comment by Michael Widenius [ 2011-07-18 ] |
|
Re: Incorrect "Duplicate entry" error with views and GROUP BY in maria-5.3 |
| Comment by Rasmus Johansson (Inactive) [ 2011-12-01 ] |
|
Launchpad bug id: 798597 |