Zero results returned when results expected
Posted by: Tarran Benson-West
Date: January 17, 2013 11:19AM

Hey guys,

We are currently experiencing an issue in our production environment whereby we are seeing queries being returned with zero results when there should always be at least one row returned.

The query is incredibly simple:

SELECT * FROM TABLE WHERE ID = ?;

We have set up some simple test java apps to isolate the issue from our application layer and to test for different scenarios such as using different connection pools / drivers etc and different configurations.

We are running mysql 5.6.5m8 but this was also an issue in our old 5.1 percona release.

There doesn't seem to be any trend to this and it doesn't appear to coincide with any of our other processes.

On the test box we are executing the query every 50ms and have 12 different java test apps running the same query.

I turned on the slow_query_log and set it to log all queries that take less than one microsecond to complete, however when I did this the issue seemed to go away. Perhaps slowing down the server introduced a 'fix' to the issue. I am now testing again with the slow_query_log turned off. (this had been running for a few hours with the slow log off and I haven't seen any zero results since the change).

The mysql box is running on innodb, has 12GB of ram and 16 cores. It is a 64-bit environment.

The table I am querying has 1.9m rows but is indexed and normally returns a resultset in under a second.

The box also isn't under any load apart from the testing that is being carried out.

Any ideas on this would be appreciated as I'm stumped right now?

Options: ReplyQuote


Subject
Written By
Posted
Zero results returned when results expected
January 17, 2013 11:19AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.