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

            There are no comments yet on this issue.

            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.