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

JSON_TABLE: Values for regular columns are truncated for no reason

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • JSON
    • None

    Description

      The column is of sufficient length, there should be no truncation.

      bb-10.5-hf 6dfb3fab2

      +------+
      | a    |
      +------+
      | fo   |
      +------+
      1 row in set (0.002 sec)
      

      MySQL 8.0.19

      MySQL [test]> select * from json_table('{"a":"foo"}',"$" columns(a varchar(8) path '$.a')) x;
      +------+
      | a    |
      +------+
      | foo  |
      +------+
      1 row in set (0.001 sec)
      

      It works in MariaDB, too, with slightly longer column:

      MariaDB [test]> select * from json_table('{"a":"foo"}',"$" columns(a varchar(12) path '$.a')) x;
      +------+
      | a    |
      +------+
      | foo  |
      +------+
      1 row in set (0.002 sec)
      

      set names doesn't seem to change the outcome, tried latin1, utf8, utf8mb4.

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            holyfoot Alexey Botchkov made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            holyfoot Alexey Botchkov made changes -
            issue.field.resolutiondate 2020-04-27 19:10:00.0 2020-04-27 19:10:00.635
            holyfoot Alexey Botchkov made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.5 [ 23123 ]
            Resolution Fixed [ 1 ]
            Status In Progress [ 3 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 107389 ] MariaDB v4 [ 157636 ]

            People

              holyfoot Alexey Botchkov
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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