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

Data Truncation when using UNION SELECT

Details

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 10.3.23, 10.4.13, 10.6.7, 10.8.3
    • 10.5
    • Data types
    • None
    • Linux

    Description

      This issue is a little bit similar to MDEV-17226

      When selecting a large number of string characters witih an UNION the data gets truncated.
      I did not found any variable which can change this behaviour and I did not get any answers on my stackoverflow question regarding this:
      https://stackoverflow.com/questions/62404168/mariadb-cuts-of-text-when-select-with-union

      Example is attached.
      Simple example:
      SELECT 'LARGETEXT' works fine.
      SELECT 'SHORTTEXT' UNION SELECT 'LARGETEXT' truncated the text after about 34797 Bytes.
      The order of the columns does not make any difference. So also
      SELECT 'LARGETEXT' UNION SELECT 'SHORTTEXT'
      does fail.

      This seems to be critical for me because the user is not noticed about loss of data.

      Attachments

        Issue Links

          Activity

            ThomasChr Thomas Christlieb created issue -
            ThomasChr Thomas Christlieb made changes -
            Field Original Value New Value
            Comment [ It seems to be that
            mysqld Ver 10.2.32-MariaDB-1:10.2.32+maria~bionic for debian-linux-gnu on x86_64 (mariadb.org binary distribution)
            is unaffected.
            Also mysql does not seem to have the same problem. ]
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -
            Assignee Alexander Barkov [ bar ]
            serg Sergei Golubchik made changes -
            Description This issue is a little bit similar to https://jira.mariadb.org/browse/MDEV-17226

            When selecting a large number of string characters witih an UNION the data gets truncated.
            I did not found any variable which can change this behaviour and I did not get any answers on my stackoverflow question regarding this:
            https://stackoverflow.com/questions/62404168/mariadb-cuts-of-text-when-select-with-union

            Example is attached.
            Simple example:
            SELECT 'LARGETEXT' works fine.
            SELECT 'SHORTTEXT' UNION SELECT 'LARGETEXT' truncated the text after about 34797 Bytes.
            The order of the columns does not make any difference. So also
            SELECT 'LARGETEXT' UNION SELECT 'SHORTTEXT'
            does fail.

            This seems to be critical for me because the user is not noticed about loss of data.
            This issue is a little bit similar to MDEV-17226

            When selecting a large number of string characters witih an UNION the data gets truncated.
            I did not found any variable which can change this behaviour and I did not get any answers on my stackoverflow question regarding this:
            https://stackoverflow.com/questions/62404168/mariadb-cuts-of-text-when-select-with-union

            Example is attached.
            Simple example:
            SELECT 'LARGETEXT' works fine.
            SELECT 'SHORTTEXT' UNION SELECT 'LARGETEXT' truncated the text after about 34797 Bytes.
            The order of the columns does not make any difference. So also
            SELECT 'LARGETEXT' UNION SELECT 'SHORTTEXT'
            does fail.

            This seems to be critical for me because the user is not noticed about loss of data.
            serg Sergei Golubchik made changes -
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            greenman Ian Gilfillan made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            bar Alexander Barkov made changes -
            Assignee Alexander Barkov [ bar ] Oleksandr Byelkin [ sanja ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 110139 ] MariaDB v4 [ 142023 ]
            ThomasChr Thomas Christlieb made changes -
            Affects Version/s 10.8.3 [ 27502 ]
            Affects Version/s 10.6.7 [ 26812 ]
            serg Sergei Golubchik made changes -
            Priority Critical [ 2 ] Major [ 3 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.3 [ 22126 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.4 [ 22408 ]

            People

              sanja Oleksandr Byelkin
              ThomasChr Thomas Christlieb
              Votes:
              4 Vote for this issue
              Watchers:
              9 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.