Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-39969

Incorrect result of JSON_TABLE with BIT

    XMLWordPrintable

Details

    Description

      Hi,

      I found that JSON_TABLE can return incorrect results with the BIT type. This is an example:

      SELECT ord, i, b+0, HEX(b) 
      FROM JSON_TABLE(
             '[0,1]',
             '$[*]' COLUMNS (
               ord FOR ORDINALITY,
               i INT PATH '$',
               b BIT(1) PATH '$'
             )
           ) AS jt
      ORDER BY ord;
      -- 1	  0	1    1
      -- 2	  1	1    1
      

      For the first row of the results, I expect it should be 1 0 0 0, as the first row of the table is 0.

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            ChiZhang Chi Zhang
            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.