Bug #4134 innodb table space segment handling not as obvious as could be
Submitted: 14 Jun 2004 23:17 Modified: 13 May 2010 16:03
Reporter: Matthew Lord Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:all OS:Any (all)
Assigned to: Assigned Account CPU Architecture:Any

[14 Jun 2004 23:17] Matthew Lord
Description:
When you have an error in your innodb_data_file_path innodb creates listed files and zeroes them out
before producing the error and dying.

I.E. You have the default ibdata1 at 10MB.  You want to add another 10MB file so you edit your cnf
and specify the var now as
innodb_data_file_path = ibddata1:10M:ibdata2:10M:autoexted

and restart.

Notice that I mis-spelled ibdata1, however, ibdata2 gets created and zeroed out before innodb
dies with the error.  When I fix the mis-spelling and restart innodb does not include ibdata2 as part of 
the table space nor does it produce an error.

How to repeat:
Install a default installation:

Start up the server so that innodb creates the default tablespace.

Specify innodb_data_file_path incorrectly such as mis-spelling ibdata1 while adding
ibdata2 and restart.

notice that it errors out but look at your datadir.

restart and look at the show table status output to see that it's not being used.

Suggested fix:
Either clean up the newly created files when erroring out or use them as part of the table space
when the innodb_data_file_path is corrected.
[15 Nov 2013 17:34] Sveta Smirnova
See also bug #60997