List:General Discussion« Previous MessageNext Message »
From:Nuno Pereira Date:July 27 2005 10:30am
Subject:Re: concat function problems
View as plain text  
Hello Averyanov,

averyanov@stripped wrote:
> Hello Nuno,
> 
> Tuesday, July 26, 2005, 8:53:33 PM, you wrote:
> 
> 
>>averyanov@stripped wrote:
>>(...)
>>
>>>When i try to execute the following query 
>>
>>(...)
>>
>>>i get this error:
>>>
>>>ERROR 2006 (HY000): MySQL server has gone away
>>>No connection. Trying to reconnect...
>>>Connection id:    6
>>>Current database: test
>>>ERROR 2013 (HY000): Lost connection to MySQL server during query
>>>
>>>
>>>but if i change my query to this one everything is fine
>>>SELECT 
>>>        COUNT(DISTINCT field1) as value1,
>>>        CONCAT(field2, '') as value2
>>>FROM 
>>>        table1,
>>>        table2
>>>GROUP 
>>>        BY value2
>>>
>>>(here CONCAT(field2, '-') is replaced with CONCAT(field2, '') )
>>>
>>>does anyone know what the matter is?
> 
> 
>>Did you try to make the first query for a second time, when you execute
>>the second query? It seems that the server abords or closes the 
>>connection meanwhile. Did you waited too long to write/send the query?
> 
> Each time i try to execute the 'buggy' query the server crashet.
> It crashes IMMEDIATELY (without any human-perceptible timeout)

Can you provide the output of the logs?

>>Check this for more help
>>http://dev.mysql.com/doc/mysql/en/gone-away.html

Does following the steps in that page helps?

>>Try this query and output the result
> 
> 
>>SHOW VARIABLES LIKE '%time%';
> 
> mysql> SHOW VARIABLES LIKE '%time%';
> +--------------------------+-------------------+
> | Variable_name            | Value             |
> +--------------------------+-------------------+
> | connect_timeout          | 5                 |
> | datetime_format          | %Y-%m-%d %H:%i:%s |
> | delayed_insert_timeout   | 300               |
> | flush_time               | 0                 |
> | innodb_lock_wait_timeout | 50                |
> | interactive_timeout      | 28800             |
> | long_query_time          | 10                |
> | net_read_timeout         | 30                |
> | net_write_timeout        | 60                |
> | slave_net_timeout        | 3600              |
> | slow_launch_time         | 2                 |
> | sync_replication_timeout | 0                 |
> | system_time_zone         | MSD               |
> | time_format              | %H:%i:%s          |
> | time_zone                | SYSTEM            |
> | wait_timeout             | 28800             |
> +--------------------------+-------------------+
> 16 rows in set (0.00 sec)

The variables seems OK.

Next time reply TO THE LIST, others could help.

-- 
Nuno Pereira
email: nuno.pereira@stripped
Thread
concat function problemsaveryanov26 Jul
  • Re: concat function problemsMichael Stassen26 Jul
  • Re: concat function problemsNuno Pereira26 Jul
Re: concat function problemsaveryanov27 Jul
Re: concat function problemsNuno Pereira27 Jul
Re: concat function problemsaveryanov27 Jul
Re: concat function problemsaveryanov29 Jul
Re: concat function problemsaveryanov29 Jul