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

Column Compression - ERROR 1265 (01000): Data truncated for column

Details

    Description

      Hello,

      Testing MariaDB 10.5, and first time implementing column compression as part of upgrade.

      Converting normal columns to COMPRESSED columns seem to work ok.

      However, when I want to do an ALTER TABLE later, it appears that I have problems with the compressed columns, even if I'm not changing them.

      Example:

      MariaDB [mydb]> ALTER TABLE `mytable`
      CHANGE `question` `question` VARCHAR(500) COMPRESSED CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
      CHANGE `col2` `col2` VARCHAR(50) COMPRESSED CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

      Query OK, 3708285 rows affected (1 min 8.067 sec)
      Records: 3708285 Duplicates: 0 Warnings: 0

      MariaDB [mydb]> ALTER TABLE `mytable`
      CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

      ERROR 1265 (01000): Data truncated for column 'question' at row 8362

      MariaDB [mydb]> ALTER TABLE `mytable`
      CHANGE `question` `question` VARCHAR(500) COMPRESSED CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
      CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

      ERROR 1265 (01000): Data truncated for column 'question' at row 8362

      Any ideas why?

      Attachments

        Issue Links

          Activity

            nunop Nuno created issue -
            nunop Nuno made changes -
            Field Original Value New Value
            Description Hello,

            Testing MariaDB 10.5, and first time implementing column compression as part of upgrade.

            Converting normal columns to COMPRESSED columns seem to work ok.

            However, when I want to do an ALTER TABLE later, it appears that I have problems with the compressed columns, even if I'm not changing them.

            Example:


            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `question` `question` VARCHAR(500) COMPRESSED CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
            CHANGE `col2` `col2` VARCHAR(50) COMPRESSED CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            Query OK, 3708285 rows affected (1 min 8.067 sec)
            Records: 3708285 Duplicates: 0 Warnings: 0

            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            ERROR 1265 (01000): Data truncated for column 'question' at row 8362

            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `question` `question` VARCHAR(500) COMPRESSED CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
            CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            ERROR 1265 (01000): Data truncated for column 'question' at row 8362


            --

            Any ideas why?
            Hello,

            Testing MariaDB 10.5, and first time implementing column compression as part of upgrade.

            Converting normal columns to COMPRESSED columns seem to work ok.

            However, when I want to do an ALTER TABLE later, it appears that I have problems with the compressed columns, even if I'm not changing them.

            Example:


            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `question` `question` VARCHAR(500) *COMPRESSED* CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
            CHANGE `col2` `col2` VARCHAR(50) COMPRESSED CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            Query OK, 3708285 rows affected (1 min 8.067 sec)
            Records: 3708285 Duplicates: 0 Warnings: 0

            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            ERROR 1265 (01000): Data truncated for column '{color:red}question{color}' at row 8362

            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `question` `question` VARCHAR(500) *COMPRESSED* CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
            CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            ERROR 1265 (01000): Data truncated for column 'question' at row 8362


            --

            Any ideas why?
            nunop Nuno made changes -
            Description Hello,

            Testing MariaDB 10.5, and first time implementing column compression as part of upgrade.

            Converting normal columns to COMPRESSED columns seem to work ok.

            However, when I want to do an ALTER TABLE later, it appears that I have problems with the compressed columns, even if I'm not changing them.

            Example:


            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `question` `question` VARCHAR(500) *COMPRESSED* CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
            CHANGE `col2` `col2` VARCHAR(50) COMPRESSED CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            Query OK, 3708285 rows affected (1 min 8.067 sec)
            Records: 3708285 Duplicates: 0 Warnings: 0

            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            ERROR 1265 (01000): Data truncated for column '{color:red}question{color}' at row 8362

            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `question` `question` VARCHAR(500) *COMPRESSED* CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
            CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            ERROR 1265 (01000): Data truncated for column 'question' at row 8362


            --

            Any ideas why?
            Hello,

            Testing MariaDB 10.5, and first time implementing column compression as part of upgrade.

            Converting normal columns to COMPRESSED columns seem to work ok.

            However, when I want to do an ALTER TABLE later, it appears that I have problems with the compressed columns, even if I'm not changing them.

            Example:


            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE {color:red}`question` `question`{color} VARCHAR(500) *COMPRESSED* CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
            CHANGE `col2` `col2` VARCHAR(50) COMPRESSED CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            Query OK, 3708285 rows affected (1 min 8.067 sec)
            Records: 3708285 Duplicates: 0 Warnings: 0

            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            ERROR 1265 (01000): Data truncated for column '{color:red}question{color}' at row 8362

            MariaDB [mydb]> ALTER TABLE `mytable`
            CHANGE {color:red}`question` `question`{color} VARCHAR(500) *COMPRESSED* CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NULL DEFAULT NULL,
            CHANGE `col2` `col2` VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

            ERROR 1265 (01000): Data truncated for column '{color:red}question{color}' at row 8362


            --

            Any ideas why?
            GeoffMontee Geoff Montee (Inactive) made changes -
            GeoffMontee Geoff Montee (Inactive) made changes -
            marko Marko Mäkelä made changes -
            marko Marko Mäkelä made changes -
            Issue Type Task [ 3 ] Bug [ 1 ]
            marko Marko Mäkelä made changes -
            Component/s Data Definition - Alter Table [ 10114 ]
            Component/s Data Manipulation - Insert [ 10101 ]
            Fix Version/s 10.3 [ 22126 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.7 [ 24805 ]
            Affects Version/s 10.3 [ 22126 ]
            Affects Version/s 10.4 [ 22408 ]
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.7 [ 24805 ]
            Labels need_feedback
            serg Sergei Golubchik made changes -
            Labels need_feedback
            marko Marko Mäkelä made changes -
            Assignee Oleksandr Byelkin [ sanja ]
            marko Marko Mäkelä made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 118873 ] MariaDB v4 [ 144337 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.7 [ 24805 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 10.3 [ 22126 ]
            danblack Daniel Black made changes -
            bar Alexander Barkov made changes -
            issue.field.resolutiondate 2023-08-15 06:34:28.0 2023-08-15 06:34:27.574
            bar Alexander Barkov made changes -
            Fix Version/s N/A [ 14700 ]
            Fix Version/s 10.4 [ 22408 ]
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Resolution Duplicate [ 3 ]
            Status Confirmed [ 10101 ] Closed [ 6 ]
            bar Alexander Barkov made changes -
            bar Alexander Barkov made changes -
            marko Marko Mäkelä made changes -
            Fix Version/s 10.4.32 [ 29300 ]
            Fix Version/s 10.5.23 [ 29012 ]
            Fix Version/s 10.6.16 [ 29014 ]
            Fix Version/s 10.10.7 [ 29018 ]
            Fix Version/s 10.11.6 [ 29020 ]
            Fix Version/s 11.0.4 [ 29021 ]
            Fix Version/s N/A [ 14700 ]
            bar Alexander Barkov made changes -
            Assignee Oleksandr Byelkin [ sanja ] Alexander Barkov [ bar ]

            People

              bar Alexander Barkov
              nunop Nuno
              Votes:
              0 Vote for this issue
              Watchers:
              7 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.