Lost connection on alter table ... create index

Lost connection on alter table ... create index

Postby lfelicetti » Wed 13 Apr 2005 09:23

Hello, i've got a problem with mydac. I'm woking wih big tables and a need to reindex that. I suppose to use an alter table query for delete old index and add new one. MyDAC tell me a Lost Connection during query.

This is my query:
ALTER TABLE `mydb`.`a` DROP INDEX `a`,
ADD INDEX `a`(`a`),
DROP INDEX `b`,
ADD INDEX `b`(`b`),
DROP INDEX `c`,
ADD INDEX `c`(`c`)
, DROP INDEX `d`,
ADD INDEX `d`(`d`);

Rows on mydb.a: 617747

The query on my system takes about 25secs

Delphi 2005 update pack 2
MyDAC 3.50.0.18

Any suggestion?
lfelicetti
 
Posts: 5
Joined: Tue 08 Mar 2005 12:07

Postby Ikar » Thu 14 Apr 2005 08:56

What value did you assign to CommandTimeout?
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Command Timeout

Postby lfelicetti » Thu 14 Apr 2005 09:53

the value 9999999
lfelicetti
 
Posts: 5
Joined: Tue 08 Mar 2005 12:07

Postby Ikar » Thu 14 Apr 2005 11:29

Please try to set TMyConnection.Options.Direct to False.
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56

Postby lfelicetti » Thu 14 Apr 2005 15:03

Tried also. Doesn't work.
lfelicetti
 
Posts: 5
Joined: Tue 08 Mar 2005 12:07

Postby Ikar » Thu 14 Apr 2005 15:28

> Tried also. Doesn't work.

Judging by these tests the error is somewhere in server settings. Try to learn MySQL Reference Manual, chapter A.2 Some Common Errors When Using MySQL (CR_SERVER_LOST)
Ikar
 
Posts: 1693
Joined: Thu 28 Oct 2004 13:56


Return to MySQL Data Access Components