Description:
In 5.1.34/40, I change a column name will not recreate table,
But in 5.1.46sp1, It will.
This function is disable? Or a bug?
In 5.1.34
create table a(id int unsigned not null primary key auto_increment, info varchar(32), test varchar(32));
insert into a...... //add data
*************************** 1. row ***************************
Table: a
Create Table: CREATE TABLE `a` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`info` varchar(32) DEFAULT NULL,
`test` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1015 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
alter table a change test test1 varchar(32);
Query OK, 0 rows affected (0.00 sec)
Records: 0 Duplicates: 0 Warnings: 0
But in 5.1.46sp1:
create table a(id int unsigned not null primary key auto_increment, info varchar(32), test varchar(32));
insert into a...... //add data
*************************** 1. row ***************************
Table: a
Create Table: CREATE TABLE `a` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`info` varchar(32) DEFAULT NULL,
`test` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1015 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
alter table a change test test1 varchar(32);
Query OK, 512 rows affected (0.38 sec)
Records: 512 Duplicates: 0 Warnings: 0
How to repeat:
In 5.1.34
create table a(id int unsigned not null primary key auto_increment, info varchar(32), test varchar(32));
insert into a...... //add data
*************************** 1. row ***************************
Table: a
Create Table: CREATE TABLE `a` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`info` varchar(32) DEFAULT NULL,
`test` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1015 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
alter table a change test test1 varchar(32);
Query OK, 0 rows affected (0.00 sec)
Records: 0 Duplicates: 0 Warnings: 0
But in 5.1.46sp1:
create table a(id int unsigned not null primary key auto_increment, info varchar(32), test varchar(32));
insert into a...... //add data
*************************** 1. row ***************************
Table: a
Create Table: CREATE TABLE `a` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`info` varchar(32) DEFAULT NULL,
`test` varchar(32) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=1015 DEFAULT CHARSET=utf8
1 row in set (0.00 sec)
alter table a change test test1 varchar(32);
Query OK, 512 rows affected (0.38 sec)
Records: 512 Duplicates: 0 Warnings: 0