Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have MySQL 5.5.20 and this table:

mysql> desc country;
+----------------+-------------+------+-----+---------+-------+
| Field          | Type        | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-------+
| id             | int(255)    | NO   | PRI | NULL    |       |
| iso            | varchar(2)  | NO   |     | NULL    |       |
| name           | varchar(80) | NO   |     | NULL    |       |
| printable_name | varchar(80) | NO   |     | NULL    |       |
| iso3           | varchar(3)  | YES  |     | NULL    |       |
| numcode        | smallint(6) | YES  |     | NULL    |       |
+----------------+-------------+------+-----+---------+-------+

If I run a query like this

SELECT country.ID, country.ISO, country.NAME,
       country.PRINTABLE_NAME, country.ISO3, country.NUMCODE
FROM country;

It returns:

ERROR 2013 (HY000): Lost connection to MySQL server during query

If I change the order of the columns (ISO3 before PRINTABLE_NAME for example) like this:

SELECT country.ID, country.ISO, country.NAME,
       country.PRINTABLE_NAME,  country.NUMCODE, country.ISO3
FROM country;

It works fine!

Or if I rewrite the query using lower-case letters for columns, it works as well.

This issue appears from time to time (about once a month) and the only solution to fix it is to restart MySQL! i have checked error log and nothing added to error log upon this error!! I am really confused and don't know why this happens! Any ideas on how this could be fixed?

share|improve this question
    
yes... but nothing beneficial,,, it says: 130310 11:01:23 [Warning] /usr/sbin/mysqld: Forcing close of thread 401108 user: 'root' –  Alaa Mar 10 '13 at 16:11
    
(Side note: please capitalize your "I"s. It's always written in uppercase in English, never "i".) –  Mat Mar 10 '13 at 16:14
    
maybe a good time to update MySQL as you are hitting bugs with an old version –  borrel Mar 12 '13 at 1:51
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.