Bug #16232 | GROUP BY on a view with a WHERE restriction gives incorrect results | ||
---|---|---|---|
Submitted: | 5 Jan 2006 17:11 | Modified: | 31 Aug 2006 16:26 |
Reporter: | Tim Martin | Email Updates: | |
Status: | Can't repeat | Impact on me: | |
Category: | MySQL Server: Views | Severity: | S3 (Non-critical) |
Version: | 5.0.17/5.0.19 BK | OS: | Linux (Linux 2.6) |
Assigned to: | Igor Babaev | CPU Architecture: | Any |
[5 Jan 2006 17:11]
Tim Martin
[10 Mar 2006 21:12]
Richard Wesley
We have a variation of this, but it looks more complex. We did notice that changing the where clause to a range (i.e. where a >= 1 and a <= 1) causes the query to work correctly.
[10 Mar 2006 21:13]
Richard Wesley
We have also observed this on 5.0.15-nt and 5.0.18 under Linux.
[31 Aug 2006 16:26]
Igor Babaev
I can't reapeat it with the current bk tree: mysql> SELECT VERSION(); +--------------+ | VERSION() | +--------------+ | 5.0.25-debug | +--------------+ 1 row in set (0.01 sec) mysql> SELECT * FROM myview WHERE a=1 GROUP BY b; +---+-------+--------+ | a | b | new_c | +---+-------+--------+ | 1 | 12345 | 197530 | | 1 | 23456 | 175308 | | 1 | 34567 | 153086 | +---+-------+--------+ 3 rows in set (0.00 sec)