Bug #660 [test_data] ERROR 2003: Can't connect to MySQL server on 'xxxx' (10061)
Submitted: 16 Jun 2003 8:12 Modified: 16 Jun 2003 10:50
Reporter: t t Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQLCC Severity:S2 (Serious)
Version:4.1 alpha OS:Microsoft Windows (windows)
Assigned to: CPU Architecture:Any

[16 Jun 2003 8:12] t t
Description:
select (sum(t1.val)/14) ,
        class from 
(select id,class,min(m) as val from test_Data.membership where colid in (2,1)   
 and class=0  group by id,class) t1 
 group by class

query dows not seem to work which can be done in alpha release only...

How to repeat:
select from (select ...)
[16 Jun 2003 8:14] t t
query runs only once and can not connect service stops
[16 Jun 2003 8:17] t t
other queries run well but select from (select fom )
[16 Jun 2003 8:40] Miguel Solorzano
Could you please send a more detailed test case with table structure
if possible. Thanks.
[16 Jun 2003 8:51] t t
I created my table as the following and put auto increment feature on the id.
My aim was to get select sum (min()).

select sum(t1.val) as ret,class 
from 
   (select id,class,min(m) as val from test_Data.membership where colid in 
   (2,1) and class=1 group by id,class) t1 group by class

so I generate the col_id part. It runs at first and then gives error 2003. 
(I took it from mysql center, so it is fresh. Now I try it in the program. Hope it works otherwise so much pain)

-- DDL scripts file for the table membership for MySQL database
-- Generated by (c) Ispirer Chyfo Pro 2.9.2
-- Timestamp: Mon Jun 16 00:01:30 2003

-- Create table statement

CREATE TABLE membership
(
  id DECIMAL(10,0) NOT NULL,
  colid INT NOT NULL,
  m DECIMAL(7,3) NOT NULL,
  class INT NOT NULL,
  weight DECIMAL(7,3) NOT NULL
);

-- Primary key

ALTER TABLE membership ADD PRIMARY KEY (id, colid);

-- Create index statements

CREATE INDEX class ON membership
(class ASC, colid ASC);
[16 Jun 2003 10:50] Miguel Solorzano
Testing with MySQLCC 0.9.2-beta I wasn't able for to repeat the
error reported.
However when using the mysql.exe client I did the mistake using
your original statement (I create the table in the "test" DB)
and in this case I got the message for you reported:

mysql> select sum(t1.val) as ret,class from (select id,class,min(m)
    -> as val from test_Data.membership where colid in (2,1) and
    -> class=1 group by id,class) t1 group by class;
ERROR 1044: Access denied for user: '@127.0.0.1' to database 'test_data'
mysql> select sum(t1.val) as ret,class from (select id,class,min(m)
    -> as val from test_Data.membership where colid in (2,1) and
    -> class=1 group by id,class) t1 group by class;
ERROR 2013: Lost connection to MySQL server during query

However you said that the service was down so I need more details how
this happened. What version of MySQLCC you used ? Are you sure you
queried for the correct database and you have the privileges for.
Are you using the grant tables shipped together with 4.1 or using
grant tables from another version ?