mirror of
https://github.com/MariaDB/server.git
synced 2025-01-21 06:22:28 +01:00
0c8a6f6cca
Detailed revision comments: r6783 | jyang | 2010-03-09 17:54:14 +0200 (Tue, 09 Mar 2010) | 9 lines branches/5.1: Fix bug #47621 "MySQL and InnoDB data dictionaries will become out of sync when renaming columns". MySQL does not provide new column name information to storage engine to update the system table. To avoid column name mismatch, we shall just request a table copy for now. rb://246 approved by Marko.
21 lines
777 B
Text
21 lines
777 B
Text
CREATE TABLE bug47621 (salesperson INT) ENGINE=InnoDB;
|
|
ALTER TABLE bug47621 CHANGE salesperson sales_acct_id INT;
|
|
create index orgs on bug47621(sales_acct_id);
|
|
ALTER TABLE bug47621 CHANGE sales_acct_id salesperson INT;
|
|
drop table bug47621;
|
|
CREATE TABLE bug47621_sale (
|
|
salesperson INT,
|
|
PRIMARY KEY(salesperson)) engine = innodb;
|
|
CREATE TABLE bug47621_shirt(
|
|
id SMALLINT,
|
|
owner INT,
|
|
FOREIGN KEY(owner)
|
|
references bug47621_sale(salesperson) ON DELETE RESTRICT)
|
|
engine = innodb;
|
|
insert into bug47621_sale values(9);
|
|
insert into bug47621_shirt values(1, 9);
|
|
ALTER TABLE bug47621_shirt CHANGE id new_id INT;
|
|
drop table bug47621_shirt;
|
|
ALTER TABLE bug47621_sale CHANGE salesperson sales_acct_id INT;
|
|
ALTER TABLE bug47621_sale ADD INDEX idx (sales_acct_id);
|
|
drop table bug47621_sale;
|