Bug #42763 Indexe won't be migrated

Submitted: 11 Feb 2009 13:58 Modified: 6 Feb 2013 23:07
Reporter: Susanne Ebrecht Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Workbench Severity:S2 (Serious)
Version:1.1.17 OS:Any
Assigned to: CPU Architecture:Any

[11 Feb 2009 13:58] Susanne Ebrecht
Description:
Setup a PostgreSQL table:

CREATE TABLE t(i integer, n integer);

Fill with some rows:

INSERT INTO t VALUES (generate_series(1,100), random()*100);

ALTER TABLE t ADD PRIMARY KEY(i);

CREATE INDEX i_n ON t(n);

Now use migration tool for migration to MySQL

SHOW CREATE TABLE t;

You will see that only the primary key got migrated not the other index.

How to repeat:
See above

Suggested fix:
Migrate all indexes as well
[2 Apr 2009 7:43] Valeriy Kravchuk
Latest MT migrates table defined as:

SQL> create table t(i number, n number);

Table created.

SQL> alter table t add primary key(i);

Table altered.

SQL> create index i_n on t(n);

Index created.

in Oracle into MySQL equivalent:

DROP TABLE IF EXISTS `system`.`t`;
CREATE TABLE `system`.`t` (
  `i` DECIMAL(22, 0) NOT NULL,
  `n` DECIMAL(22, 0) NULL,
  PRIMARY KEY (`i`),
  INDEX `i_n` (`n`)
)
ENGINE = INNODB;

So, the bug is PostgreSQL-related.
[2 Apr 2009 9:59] Susanne Ebrecht
Many thanks Valeriy.

Your test means that this is only common JDBC related.

Set back to verified.
[6 Feb 2013 23:07] Alfredo Kojima
No longer applies in WB

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.043 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.