On Apr 26, 2006, at 3:54 AM, Dr. Frank Ullrich wrote:

Duzenbury, Rich wrote:
Hi all,
I've inherited an innodb database that is configured like:
innodb_file_per_table
innodb_data_file_path =
ibdata1:3000M;ibdata2:3000M;ibdata3:3000M;ibdata4:3000M:autoextend
Um, doesn't this allocate 12G that winds up being unused, since
innodb_file_per_table is set? If so, what is the correct way to reclaim
the 12G?
Thanks!
Regards,
Rich Duzenbury

Hi,

but you don't know __when__ innodb_file_per_table was set!
So it's possible that many innodb tables actually reside in ibdata [1-4]. Check your data directory to see the individual innodb files/tables (*.ibd).

This is true, and even on a fresh install that has always had innodb_file_per_table, InnoDB still needs the shared tablespace (though it probably doesn't need to be that large). Once you have an InnoDB tablespace the only way to reduce the size of the shared tablespace is to completely dump the data and recreate the tablespace. Roughly the sequence is:

mysqldump to text...be very careful to keep a consistent snapshot, handle blobs, quoting names, etc.... Test this.
Shut down mysql
Rename/move old mysql data and log directories, create new, empty ones (copy over
  mysql database...it's not innodb and will keep the same users)
Alter my.cnf, point to include new InnoDB shared table definition
Start mysql, make sure InnoDB initializes correctly (check .err file)
Read in dump file you took in step 1

Again, be careful with this. It essentially involves exporting and importing all your data, so make sure you have a valid export file.

Good luck,
Ware

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to