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

Increase username length from 16 characters

Details

    • Task
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 5.5.31
    • None
    • None

    Description

      To increase username length from 16 characters to 64 or 128 characters. Included preliminary patch for mariadb 5.5.

      In 5.5 we will not change system tables though. Which means that the user would need to alter system tables manually to use that. A test case (in mysql-test) will have to use ALTER TABLE mysql.user too.

      In 10.0 we'll remove this limitation.

      Attachments

        Issue Links

          Activity

            jani Jani Tolonen created issue -
            serg Sergei Golubchik made changes -
            Field Original Value New Value
            Assignee Sergei Golubchik [ serg ] Alexander Barkov [ bar ]
            serg Sergei Golubchik made changes -
            Description To increase username length from 16 characters to 48 characters. Included preliminary patch for mariadb 5.5. To increase username length from 16 characters to 48 characters. Included preliminary patch for mariadb 5.5.

            In 5.5 we will not change system tables though. Which means that the user would need to alter system tables manually to use that. A test case (in mysql-test) will have to use ALTER TABLE mysql.user too.

            In 10.0 we'll remove this limitation.
            serg Sergei Golubchik made changes -
            Description To increase username length from 16 characters to 48 characters. Included preliminary patch for mariadb 5.5.

            In 5.5 we will not change system tables though. Which means that the user would need to alter system tables manually to use that. A test case (in mysql-test) will have to use ALTER TABLE mysql.user too.

            In 10.0 we'll remove this limitation.
            To increase username length from 16 characters to 64 or 128 characters. Included preliminary patch for mariadb 5.5.

            In 5.5 we will not change system tables though. Which means that the user would need to alter system tables manually to use that. A test case (in mysql-test) will have to use ALTER TABLE mysql.user too.

            In 10.0 we'll remove this limitation.
            serg Sergei Golubchik made changes -
            Assignee Alexander Barkov [ bar ] Alexey Botchkov [ holyfoot ]
            serg Sergei Golubchik made changes -
            Summary Increase username length from 16 characters to 48 characters Increase username length from 16 characters
            serg Sergei Golubchik made changes -
            Assignee Alexey Botchkov [ holyfoot ] Sergei Golubchik [ serg ]

            username length is increased in the server to 128, although practically it cannot be larger that 80 now, otherwise columns_priv table hits a max index length limitation.

            pushed in 5.5

            serg Sergei Golubchik added a comment - username length is increased in the server to 128, although practically it cannot be larger that 80 now, otherwise columns_priv table hits a max index length limitation. pushed in 5.5
            serg Sergei Golubchik made changes -
            Resolution Fixed [ 1 ]
            Status Open [ 1 ] Closed [ 6 ]

            Is it on purpose that I_S.PROCESSLIST still has `USER` varchar(16) NOT NULL DEFAULT ''?

            elenst Elena Stepanova added a comment - Is it on purpose that I_S.PROCESSLIST still has `USER` varchar(16) NOT NULL DEFAULT ''?

            proxies_priv table also needs to be altered. It's not a bug for 5.5 since ALTER is done manually anyway, just something not to forget in instructions. In 10.x, I suppose, it should be done along with other system tables.

            elenst Elena Stepanova added a comment - proxies_priv table also needs to be altered. It's not a bug for 5.5 since ALTER is done manually anyway, just something not to forget in instructions. In 10.x, I suppose, it should be done along with other system tables.
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -

            ... and mysql.servers (Username).
            (In proxies_priv there are two fields, User and Proxied_User).

            elenst Elena Stepanova added a comment - ... and mysql.servers (Username). (In proxies_priv there are two fields, User and Proxied_User).

            Actually, in proxies_priv there are 3 fields – also Grantor, which should be longer than 80, because it also includes the host, e.g. root@localhost

            elenst Elena Stepanova added a comment - Actually, in proxies_priv there are 3 fields – also Grantor, which should be longer than 80, because it also includes the host, e.g. root@localhost

            procs_priv and tables_priv also have Grantor column (currently char(77)), they should apparently be modified as well.

            elenst Elena Stepanova added a comment - procs_priv and tables_priv also have Grantor column (currently char(77)), they should apparently be modified as well.
            elenst Elena Stepanova made changes -

            Here's a full listing:

             
            USE mysql;
            ALTER TABLE  `user` CHANGE  `User`  `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT  '';
            ALTER TABLE  `procs_priv` CHANGE  `User`  `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT  '';
            ALTER TABLE  `proxies_priv` CHANGE  `Proxied_user` `Proxied_User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT  '';
            ALTER TABLE  `proxies_priv` CHANGE  `Grantor` `Grantor` VARCHAR( 141 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT  '';
            ALTER TABLE  `tables_priv` CHANGE  `Grantor` `Grantor` VARCHAR( 141 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT  '';
            ALTER TABLE  `tables_priv` CHANGE  `User` `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT  '';
            ALTER TABLE  `db` CHANGE  `User` `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT  '';
            ALTER TABLE  `columns_priv` CHANGE  `User` `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT  '';

            igalic Igor Galić added a comment - Here's a full listing:   USE mysql; ALTER TABLE `user` CHANGE `User` `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; ALTER TABLE `procs_priv` CHANGE `User` `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; ALTER TABLE `proxies_priv` CHANGE `Proxied_user` `Proxied_User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; ALTER TABLE `proxies_priv` CHANGE `Grantor` `Grantor` VARCHAR( 141 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; ALTER TABLE `tables_priv` CHANGE `Grantor` `Grantor` VARCHAR( 141 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; ALTER TABLE `tables_priv` CHANGE `User` `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; ALTER TABLE `db` CHANGE `User` `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT ''; ALTER TABLE `columns_priv` CHANGE `User` `User` VARCHAR( 80 ) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '';

            There are actually some more, it's listed here: https://mariadb.com/kb/en/create-user/#user-names (at the bottom of the page)

            elenst Elena Stepanova added a comment - There are actually some more, it's listed here: https://mariadb.com/kb/en/create-user/#user-names (at the bottom of the page)
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            serg Sergei Golubchik made changes -
            Workflow defaullt [ 26808 ] MariaDB v2 [ 42411 ]
            ratzpo Rasmus Johansson (Inactive) made changes -
            Workflow MariaDB v2 [ 42411 ] MariaDB v3 [ 61349 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 61349 ] MariaDB v4 [ 132091 ]

            People

              serg Sergei Golubchik
              jani Jani Tolonen
              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.