Bug #59688 Support import +export of synonyms such as SERIAL, BOOLEAN, etc

Submitted: 24 Jan 2011 3:53 Modified: 24 Jan 2011 5:00
Reporter: Andrew Voumard Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Workbench: Modeling Severity:S4 (Feature request)
Version:5.2.31 CE OS:Windows
Assigned to: CPU Architecture:Any

[24 Jan 2011 3:53] Andrew Voumard
Description:
When trying to import an SQL database creation script that contains type synonyms such as SERIAL or BOOLEAN, I get a warning. If I change the synonym for it's expanded definition, ie:

SERIAL -> BIGINT UNSIGNED NOT NULL AUTO_INCREMENT UNIQUE
BOOLEAN _> TINYINT(1)

Then the import works.

Please support importing schemas that use these synonyms, as it makes them far terser to read. Similarly, please support the exporting of these synonymns, rather than expanding the synonym - maybe an export option which attempts to generate synonyms where possible could be added.

How to repeat:
Try to import this:
===================

SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL';

CREATE  TABLE IF NOT EXISTS `mydb`.`mytable` (
  `id` SERIAL);

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;

And you get this warning:
=========================

Started parsing MySQL SQL script.

WARNING: Mapping failed for datatype `SERIAL`

Created MySQL Table: mydb.mytable

Finished parsing MySQL SQL script. Totally processed statements: successful (1), errors (0), warnings (1).
[24 Jan 2011 5:00] Valeriy Kravchuk
Thank you for the feature request.

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

Page generated in 0.039 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.