I am running mysql-client (Ver 14.14 Distrib 5.7.19) and mysql-server versions 5.7.19 with user root from localhost on Ubuntu server 16.04.2 LTS.
I have noticed that mysql doesn't return the data I'm asking unless I explicitly specify the database in the query. I have replicated the behavior below over and over again.
Can someone please explain why this is happening ?
use db1; select database(); db1 select count(*) from users; 145 select * from users; Empty set, 28416 warnings select * from users; ERROR 2006 (HY000): MySQL server has gone away
The result is changing every time you run the query above. One empty set, one Error2006, one empty set, one Error2006,...
show warnings; ERROR 2013 (HY000): Lost connection to MySQL server during query show warnings; Warning 1287 'COM_FIELD_LIST' is deprecated and will be removed in a future release. Please use SHOW COLUMNS FROM statement instead
There's 64 rows of this warning. I get Error2013 only the first time that I run "show warnings". There is no pause or delay. All subsequent runs return the same 64 rows.
select * from db1.users;
This returns the full table (145 rows) with no problems whatsoever.