When trying to execute consecutive "ALTER TABLE 
tableName ADD INDEX indexName (fieldName)" SQL 
commands on the same table with existing data using 
JDBC and the same connection I get this windows error:
- Program Error
- mysqld-nt.exe has generated errors and will be 
closed by Windows. You will need to restart the
- program.
-
- An error log is being created.
and the mySQL process in windows exits. Then I receive 
a "java.sql.SQLException: Communication link failure: 
java.net.SocketException" because the database process 
is terminated. After restarting the mySQL process and 
checking the database, the first index has been 
correctly added. It seems that the consecutive 
commands are stepping on one another's toes when the 
table is copied to add the index. I've only seen this 
problem when trying to add indexes to tables. These 
commands work correctly in the mysql command line 
viewer. Any advice or suggestions would be greatly 
appreciated. Thanks.
Environment:
Win2000 sp2
mySQL 3.23
jdk 1.3.1
mm.mysql-2.0.12-bin.jar
-Todd Harrison
Logged In: YES
user_id=116907
Does your program wait for the ALTER table to complete
before attempting another ALTER table statement?