Processing CREATE INDEXConsider an example. If you use the ALTER TABLE command to
redefine the primary key of table T (or otherwise cause the clustered index to be recreated, for example by compressing an uncompressed table),
the InnoDB Plugin will perform the following sequence of steps:
Lock table T in exclusive mode.
Create a new temporary table T1, with the new index structure.
Copy data from table T to temporary table T1.
Rename the original table T to temporary table T2.
Rename table T1 (the new table) to T (the original table name).
Drop table T2 (the original table, with the old index structure).
[@more@]
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/7916042/viewspace-1058344/,如需转载,请注明出处,否则将追究法律责任。