Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Not a Bug
-
10.2.13, 10.2.14
-
Ubuntu Server 16.04 LTS
Description
We've hit an inconsistent bug where a simple "SELECT COUNT( * ) FROM view" returns 1 as a result, even though there are 1000+ rows in the view.
The view contains a basic set of inner joins, if you do a "SELECT * FROM view" you can see that there are 1000+ returned, so no hidden WHERE/HAVING clauses or such.
Unfortunately this is inconsistent behavior, I have tried restarting the mysql service and I also ran the query from terminal using the mysql client, it also returned 1 as count. When I added a WHERE clause it fixed everything and the original SQL also started working correctly so I think this may be related to caching.
Note that I tried COUNT( * ) from several views and on different servers and from the terminal client just to rule out my database IDE as a possible problem.
(Please see attached screenshot)