Uploaded image for project: 'SonarQube'
  1. SonarQube
  2. SONAR-7630

Do not use MySQL TINYINT(1) for non-boolean columns

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.5
    • Fix Version/s: 5.6
    • Component/s: Database
    • Labels:

      Description

      The type TINYINT(1) is badly managed by JDBC driver connector/J. It considers values as boolean when calling `ResultSet#getObject()`.
      This type was used in the past only for real boolean columns. In order to keep consistency and avoid potential bugs,the columns ISSUES.ISSUE_TYPE and RULES.RULE_TYPE, which have been introduced in 5.5, must use TINYINT(2).

        Attachments

          Activity

            People

            Assignee:
            simon.brandhof Simon Brandhof (Inactive)
            Reporter:
            simon.brandhof Simon Brandhof (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Due:
              Created:
              Updated:
              Resolved: