Uploaded image for project: 'MariaDB Connector/J'
  1. MariaDB Connector/J
  2. CONJ-1219

Suggestions about bit and boolean data at MariaDB database

    XMLWordPrintable

Details

    • Task
    • Status: Open (View Workflow)
    • Critical
    • Resolution: Unresolved
    • 3.5.0
    • None
    • None
    • None
    • My application
      https://www.tekinsil.com

    Description

      What I noticed is MariaDB types include "BOOL" type which integer type is standard "BOOLEAN" type in JDBC. "BOOLEAN" does not exist in the list pulled from MariaDB, "BOOL" shows up instead. But, when a table including "BOOL" data type is created in MariaDB, "BOOLEAN" shows up instead of "BOOL". So, I hope MariaDB developers keep the same data type name.

      I get exceptions for tables with Bit columns, when adding data in BIT columns. I found a solution: When I used integer values of the bits in setObject method (in statement class) it worked. No exception occurred. When querying data from tables with BITs column, the data includes b'' in the data. Unfortunately, if the bit value is "0" the data obtained is b'' (no "0" inside like in b'1' for "1" the value or multiple bits example b'11011' for five bits column). I suggest b'' for null/empty bit in the table

      Attachments

        Issue Links

          Activity

            People

              diego dupin Diego Dupin
              zmanabq Dr. Azzouz Nezar
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.