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

Increase username length from 16 characters

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Fix Version/s: 5.5.31
    • Component/s: None
    • Labels:
      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.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

              Hide
              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

              Show
              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
              Hide
              elenst Elena Stepanova added a comment -

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

              Show
              elenst Elena Stepanova added a comment - Is it on purpose that I_S.PROCESSLIST still has `USER` varchar(16) NOT NULL DEFAULT ''?
              Hide
              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.

              Show
              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.
              Hide
              elenst Elena Stepanova added a comment -

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

              Show
              elenst Elena Stepanova added a comment - ... and mysql.servers (Username). (In proxies_priv there are two fields, User and Proxied_User).
              Hide
              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

              Show
              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
              Hide
              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.

              Show
              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.
              Hide
              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  '';
              
              Show
              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 '';
              Hide
              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)

              Show
              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)

                People

                • Assignee:
                  serg Sergei Golubchik
                  Reporter:
                  jani Jani Tolonen
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  7 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved:

                    Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 day, 1 hour
                    1d 1h