Bug #39389 unlimited growth of error log due to innodb errors
Submitted: 11 Sep 2008 12:04 Modified: 11 Sep 2008 20:12
Reporter: Shane Bester (Platinum Quality Contributor) Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:5.0.66a, 5.1 OS:Any
Assigned to: CPU Architecture:Any

[11 Sep 2008 12:04] Shane Bester
Description:
it's possible for a user with alter table privileges to fill up the error log (and the disk) with messages when innodb is started without innodb_file_per_table

080911 13:18:26  InnoDB: Error: table `test/t`
InnoDB: is in the system tablespace 0 which cannot be discarded

How to repeat:
create table t(id int)engine=innodb;
drop procedure if exists `p`;
delimiter $
create procedure `p`()
begin
declare `i` int default 0;
declare continue handler for sqlexception begin end;
repeat
alter table `t` discard tablespace;
set `i`=`i`+1;
until `i`>1000000 end repeat;
end $
delimiter ;
call `p`();
[11 Sep 2008 12:09] Susanne Ebrecht
Verified as described by using MySQL 5.1 bzr tree.