Bug #27688 TINYINT incorrectly formatted in SQL create script from MS SQL bit field
Submitted: 6 Apr 2007 16:53 Modified: 9 Apr 2007 13:34
Reporter: Matthew Grdinic Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Migration Toolkit Severity:S3 (Non-critical)
Version:1.1.11 OS:Windows (XP SP2)
Assigned to: CPU Architecture:Any

[6 Apr 2007 16:53] Matthew Grdinic
Description:
In SQL Server 2005 I have a bit field "Priority", which can be set as true or false (in this case false). When Migration Toolkit runs its "Create Script File for Create Statements" procedure, it incorrectly outputs:
 `Priority` TINYINT NOT NULL DEFAULT (0),

which causes this error in MySQL query browser when i execute the script:
Script line: 52	You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '(0),
  `Cust_ID` INT(10) NULL,
  `Is_Live` INT(10) NOT NULL DEFAULT 0,
  `Ad_' at line 81

The `Priority` TINYINT NOT NULL DEFAULT (0), statement is the offending line. 

Seems to be similar to the closed bug #24746.

How to repeat:
Any MS SQL data field labeled as a BIT and set to true or false reproduces the error. 

Suggested fix:
The fix is to simply remove the parentheses around the zero. It should, of course, look like the Is_Live field in the error message.
[9 Apr 2007 13:34] Sveta Smirnova
Please do not submit the same bug more than once. An existing bug report already describes this very problem. Even if you feel that your issue is somewhat different, the resolution is likely
to be the same. Because of this, we hope you add your comments to the original bug instead.

Thank you for your interest in MySQL.

Duplicate of Bug #26308