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

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

    XMLWordPrintable

    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

              People

              Assignee:
              sanja Oleksandr Byelkin
              Reporter:
              nunop Nuno
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Dates

                Created:
                Updated:

                  Git Integration