Bug #11136 Errors are ignored at 'Create Schema Objects' stage
Submitted: 7 Jun 2005 13:27 Modified: 15 Jun 2005 22:16
Reporter: Nikolai Saoukh Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S1 (Critical)
Version:1.0.7 OS:Windows (Win XP SP2)
Assigned to: Michael G. Zinner CPU Architecture:Any

[7 Jun 2005 13:27] Nikolai Saoukh
Description:
The tool ignores errors from sql statement execution at 'create schema objects' stage. The log except follows

Creating table NewNames ...
CREATE TABLE `dicts`.`NewNames` (
  `AutorText` VARCHAR(255) NULL,
  `AuthorText_id2` INTEGER(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`AutorText`)
)
ENGINE = INNODB
CHARACTER SET utf8 COLLATE utf8_general_ci;
An error occured while executing the SQL statement.
Incorrect table definition; there can be only one auto column and it must be defined as a key

How to repeat:
An access file with metadata from description of the bug will do the trick, I guess

Suggested fix:
none
[9 Jun 2005 20:06] Jorge del Conde
Thanks for your bug report.  While I didn't receive the error message that you stated, I got the following results that can easily explain why you received your error message:

mysql> desc table3;
+----------------+-------------+------+-----+---------+-------+
| Field          | Type        | Null | Key | Default | Extra |
+----------------+-------------+------+-----+---------+-------+
| AutorText      | varchar(50) | NO   | PRI |         |       |
| AuthorText_id2 | int(10)     | NO   |     |         |       |
+----------------+-------------+------+-----+---------+-------+
2 rows in set (0.01 sec)

As you can see, in my results AuthorText_id2 is not defined as an AUTO_INCREMENT field (which is right) but the tool should let the user know about this.  In your case, it tried to create AuthorText_id2 as AUTO_INCREMENT, and that's what caused the problem.
[10 Jun 2005 7:12] Nikolai Saoukh
Well,
is is my bug in bug report (metabug?). Problem is not in sql generated, rather in migration tool which still reports success in execution.
[15 Jun 2005 22:16] Michael G. Zinner
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html