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

Extending indexed VARCHAR column should be instantaneous

Details

    Description

      MySQL 5.7 (which was merged to MariaDB 10.2.2) implements an instantaneous change of the maximum length of a VARCHAR column when the length is increasing and not crossing the 255-byte boundary.

      Alas, when the VARCHAR column was indexed, the indexes would be dropped and added. This should be avoided.

      MySQL 5.7.23 addressed this by changing the storage engine API. We would prefer a less intrusive change. InnoDB should be able to ‘optimize away’ pairs of DROP INDEX and ADD INDEX operations. (While doing that, InnoDB in MariaDB should support the renaming of indexes as well, without introducing the RENAME INDEX syntax from MySQL 5.7.)

      Attachments

        Issue Links

          Activity

            While implementing this, please see if in ROW_FORMAT=REDUNDANT, we can also extend VARCHAR from any size to any size. The limitation regarding the 255-byte maximum length only applies to other ROW_FORMAT.

            marko Marko Mäkelä added a comment - While implementing this, please see if in ROW_FORMAT=REDUNDANT , we can also extend VARCHAR  from any size to any size. The limitation regarding the 255-byte maximum length only applies to other ROW_FORMAT .

            Somehow, the commit in MySQL 5.7.23 was cherry-picked and pushed to 5.7.24. These commits are equivalent according to the output of the following command:

            diff -u <(git show 913071c0b16cc03e703308250d795bc381627e37) <(git show 005ef9f0ed06df640503afaf65491205c422104b)
            

            marko Marko Mäkelä added a comment - Somehow, the commit in MySQL 5.7.23 was cherry-picked and pushed to 5.7.24 . These commits are equivalent according to the output of the following command: diff -u <(git show 913071c0b16cc03e703308250d795bc381627e37) <(git show 005ef9f0ed06df640503afaf65491205c422104b)
            thiru Thirunarayanan Balathandayuthapani added a comment - Patch is in bb-10.2-MDEV-16849

            There is only a trivial change to InnoDB; the rest is done in the SQL layer.
            The MySQL patch is bigger, changing all storage engines.

            marko Marko Mäkelä added a comment - There is only a trivial change to InnoDB; the rest is done in the SQL layer. The MySQL patch is bigger, changing all storage engines.

            Addressed the review comments.

            thiru Thirunarayanan Balathandayuthapani added a comment - Addressed the review comments.

            People

              thiru Thirunarayanan Balathandayuthapani
              marko Marko Mäkelä
              Votes:
              0 Vote for this issue
              Watchers:
              6 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.