db-torque-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Fox (Resolved) (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (TORQUE-106) Use "boolean" sql type not "bit" sql type with MySQL
Date Mon, 30 Jan 2012 18:40:10 GMT

     [ https://issues.apache.org/jira/browse/TORQUE-106?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel

Thomas Fox resolved TORQUE-106.

    Resolution: Cannot Reproduce
      Assignee: Thomas Fox

Cannot reproduce. org.apache.torque.datatypes.BitTest runs fine, on mysql 5.0.83 on windows.

If the problem persists, please reopen this ticket and provide a test case which indicates
what exactly is wrong.
> Use "boolean" sql type not "bit" sql type with MySQL
> ----------------------------------------------------
>                 Key: TORQUE-106
>                 URL: https://issues.apache.org/jira/browse/TORQUE-106
>             Project: Torque
>          Issue Type: Bug
>    Affects Versions: 3.2
>            Reporter: Will Glass-Husain
>            Assignee: Thomas Fox
>         Attachments: mysqlpatch.patch
> In MySQL 5.0.3 the meaning of the BIT data type changed.  It used to be equivalent to
tinyint(1) but now it is a new bitwise datatype.  This means that when Torque generates SQL
files with a "bit" data type (mapped to the Java boolean) it is incorrect.
> I suggest that Torque map the Torque "bit" type to the MySQL "Boolean" type instead when
generating SQL.  See the reference from the MySQL manual below.
> http://dev.mysql.com/doc/refman/5.0/en/numeric-type-overview.html
> * BIT[(M)]
>       A bit-field type. M indicates the number of bits per value, from 1 to 64. The default
is 1 if M is omitted.
>       This data type was added in MySQL 5.0.3 for MyISAM, and extended in 5.0.5 to MEMORY,
InnoDB, and BDB. Before 5.0.3, BIT is a synonym for TINYINT(1).
>       A very small integer. The signed range is -128 to 127. The unsigned range is 0
to 255.
>       These types are synonyms for TINYINT(1). A value of zero is considered false. Non-zero
values are considered true: 

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org

View raw message