Oracle 5.0 Reference Manual page 1251

Table of Contents

Advertisement

To enable multiple tablespaces, start the server with the
For example, add a line to the
[mysqld]
innodb_file_per_table
With multiple tablespaces enabled,
file in the database directory where the table belongs. This is similar to what the
tbl_name.ibd
storage engine does, but
MyISAM
index file. For InnoDB, the data and the indexes are stored together in the
tbl_name.MYI
The
file is still created as usual.
tbl_name.frm
You cannot freely move
files. This is because the table definition that is stored in the
the database name, and because
sequence numbers.
If you remove the
innodb_file_per_table
creates tables inside the shared tablespace files again.
InnoDB
The
--innodb_file_per_table
tables. If you start the server with this option, new tables are created using
still access tables that exist in the shared tablespace. If you start the server without this option, new
tables are created in the shared tablespace, but you can still access any tables that were created using
multiple tablespaces.
Note
InnoDB
dictionary and undo logs there. The
operate.
To move an
file and the associated table from one database to another, use a
.ibd
statement:
RENAME TABLE
db1.tbl_name
If you have a "clean" backup of an
originated as follows:
1. Issue this
ALTER TABLE
ALTER TABLE
tbl_name
2. Copy the backup
.ibd
3. Issue this
ALTER TABLE
ALTER TABLE
tbl_name
In this context, a "clean"
• There are no uncommitted modifications by transactions in the
• There are no unmerged insert buffer entries in the
• Purge has removed all delete-marked index records from the
has flushed all modified pages of the
mysqld
You can make a clean backup
1. Stop all activity from the
Configuration
InnoDB
section of my.cnf:
[mysqld]
stores each newly created table into its own
InnoDB
divides the table into a
MyISAM
files between database directories as you can with
.ibd
must preserve the consistency of transaction IDs and log
InnoDB
[1241]
[1241]
option affects only table creation, not access to existing
always needs the shared tablespace because it puts its internal data
TO db2.tbl_name;
file, you can restore it to the MySQL installation from which it
.ibd
statement to delete the current
DISCARD TABLESPACE;
file to the proper database directory.
statement to tell
InnoDB
IMPORT TABLESPACE;
file backup is one for which the following requirements are satisfied:
.ibd
file using the following method:
.ibd
server and commit all transactions.
mysqld
1231
--innodb_file_per_table
tbl_name.MYD
shared tablespace includes
InnoDB
line from
my.cnf
files are not sufficient for
.ibd
file:
.ibd
to use the new
.ibd
file.
.ibd
file.
.ibd
file.
.ibd
file from the buffer pool to the file.
.ibd
[1241]
data file and an
.ibd
table
MyISAM
and restart the server,
files, but you can
.ibd
to
InnoDB
RENAME TABLE
file for the table:
option.
file.

Advertisement

Table of Contents
loading

This manual is also suitable for:

Mysql 5.0

Table of Contents