[ 
https://issues.apache.org/jira/browse/SQOOP-2018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14280457#comment-14280457
 ] 

Qian Xu edited comment on SQOOP-2018 at 1/16/15 4:20 PM:
---------------------------------------------------------

{{INT(11)}} means a Integer has at most 11 digits. This is copied directly from 
HeideSQL. Ops, sorry for the confusion. 

You can import the following SQL into MySQL and test:
{code}
CREATE TABLE IF NOT EXISTS `guba_watchers` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `stock_id` int(11) NOT NULL,
  `num` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `guba_watchers_80945c99` (`stock_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED;

INSERT INTO `guba_watchers` (`id`, `stock_id`, `num`) VALUES
    (1, 1, 1194756),
    (2, 2, 1760443);
{code}


was (Author: stanleyxu2005):
{{INT(11)}} means a Integer has at most 11 digits. This is copied directly from 
HeideSQL. Ops, sorry for the confusion. 

> GenericJDBCConnector SqlTypes INTEGER should be set 4 bytes
> -----------------------------------------------------------
>
>                 Key: SQOOP-2018
>                 URL: https://issues.apache.org/jira/browse/SQOOP-2018
>             Project: Sqoop
>          Issue Type: Bug
>            Reporter: Veena Basavaraj
>            Assignee: Veena Basavaraj
>             Fix For: 1.99.5
>
>         Attachments: SQOOP-2018-take2patch, SQOOP-2018.patch
>
>
> treat INT as 4 bytes since both MySQL and Oracle and Postgres do it so
> http://dev.mysql.com/doc/refman/5.0/en/integer-types.html
> https://docs.oracle.com/cd/E17952_01/refman-5.5-en/storage-requirements.html
> http://www.postgresql.org/docs/9.1/static/datatype-numeric.html



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to