Bug #12207 alter table ... discard table space on MyISAM table causes ERROR 2013 (HY000):
Submitted: 27 Jul 2005 15:15 Modified: 1 Sep 2005 0:42
Reporter: Gleb Paharenko Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.9/BK source OS:Linux (Linux?windows)
Assigned to: Andrey Hristov CPU Architecture:Any

[27 Jul 2005 15:15] Gleb Paharenko
Description:
Performing an 'alter table ... discard tablespace' on MyISAM table causes loosing the connection. I think it is wrong behavior, and server should tell client about wrong engine for this  
type of operation

How to repeat:
mysql> create table atest(a int);
Query OK, 0 rows affected (0.04 sec)

mysql> alter table atest discard tablespace;

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

mysql> show create table atest\G;
*************************** 1. row ***************************
       Table: atest
Create Table: CREATE TABLE `atest` (
  `a` int(11) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

In error logs:

050727 18:07:54 [Warning] Aborted connection 6 to db: 'test' user: 'root' host:
`localhost' (Got timeout reading communication packets)

Suggested fix:
Server should produce an error about wrong table type for such operation
[27 Jul 2005 17:25] MySQL Verification Team
The current behavior is the mysql client hanging and on Windows sometimes
after the CTRL+C crashes the client.
[8 Aug 2005 14:50] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/27997
[8 Aug 2005 20:16] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/28031
[29 Aug 2005 19:35] Andrey Hristov
http://lists.mysql.com/internals/28994
[1 Sep 2005 0:42] Paul DuBois
Noted in 5.0.13 changelog.