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

Avoid copying when altering CHAR column in InnoDB table

    XMLWordPrintable

    Details

      Description

      We do not allow instant character set changes of CHAR columns in InnoDB. Initially, we allowed it for ROW_FORMAT=REDUNDANT as part of MDEV-15563, but that had to be reverted in MDEV-18627.

      In the DYNAMIC, COMPACT and COMPRESSED formats, CHAR columns could be instantly extended in those special cases when they are internally stored as variable-length:

      • when the column length (chars*mbmaxlen) exceeds 255 bytes
      • when using a variable-length character set (mbminlen!=mbmaxlen), such as UTF-8
      • when the column type is CHAR(0)

      For the REDUNDANT format, it is best to disallow such instantaneous changes for CHAR columns, and let them remain fixed-size, always explicitly storing the same length for every column. The mbminlen!=mbmaxlen optimization was introduced for COMPACT,DYNAMIC,COMPRESSED only.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              kevg Eugene Kosov
              Reporter:
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated: