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

Failure upon upgrade from 5.7.23 to 10.2 and 10.3, pagesize 4K

    Details

      Description

      https://travis-ci.org/elenst/travis-tests/jobs/409014461

      # 2018-07-28T04:59:50 [24239] Running mysql_upgrade:
      # 2018-07-28T04:59:50 [24239]   "/home/travis/server/bin/mysql_upgrade" --host=127.0.0.1 --port=19300 -uroot
      ERROR 1071 (42000) at line 596: Specified key was too long; max key length is 768 bytes
      ERROR 1071 (42000) at line 600: Specified key was too long; max key length is 768 bytes
      ERROR 1071 (42000) at line 603: Specified key was too long; max key length is 768 bytes
      FATAL ERROR: Upgrade failed
      # 2018-07-28T04:59:51 [24239][ERROR] mysql_upgrade failed
      

      Nothing special is needed on MySQL side, apart from bootstrap with page_size 4K. The pre-created datadir is attached. The exact steps to create it were these:

      • start MySQL 5.7.23 in initialize mode:

        /data/bld/mysql-5.7/bin/mysqld --no-defaults --basedir=/data/bld/mysql-5.7 --datadir=/data/bld/mysql-5.7/data --log-error=/data/bld/mysql-5.7/data/log.err --loose-lc-messages-dir= --loose-language= --port=3306 --socket=/tmp/mysql.sock --tmpdir=/tmp --loose-core-file --initialize --innodb-page-size=4K
        

      • start the same server in normal mode, with skip-grant-tables:

        /data/bld/mysql-5.7/bin/mysqld --no-defaults --basedir=/data/bld/mysql-5.7 --datadir=/data/bld/mysql-5.7/data --log-error=/data/bld/mysql-5.7/data/log.err --loose-lc-messages-dir= --loose-language= --port=3306 --socket=/tmp/mysql.sock --tmpdir=/tmp --loose-core-file --innodb-page-size=4K --skip-grant-tables
        

      • execute

        MySQL [(none)]> flush privileges;
        Query OK, 0 rows affected (0.01 sec)
         
        MySQL [(none)]> set password for root@localhost = '';
        Query OK, 0 rows affected (0.00 sec)
        

      • shut down the server normally.

      Note: Upon initialization, MySQL sets one-time password which it writes to the error log. MySQL one-time passwords don't work for me reliably on some reason, that's why I reset it using skip-grant-tables. It's not important for the upgrade issue.

      To reproduce the upgrade problem, start recent MariaDB 10.2 on the created datadir (which you either created as above, or unpacked from the attachment). Don't forget innodb_page_size=4K.

      The server should complain in the error log but start all right. Then run mysql_upgrade with root user without parameters, like

      bin/mysql_upgrade -uroot --protocol=tcp
      

      It complains a lot while running, but the real (fatal) problem happens on phase 4/7:

      Phase 4/7: Running 'mysql_fix_privilege_tables'
      ERROR 1071 (42000) at line 596: Specified key was too long; max key length is 768 bytes
      ERROR 1071 (42000) at line 600: Specified key was too long; max key length is 768 bytes
      ERROR 1071 (42000) at line 603: Specified key was too long; max key length is 768 bytes
      FATAL ERROR: Upgrade failed
      

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                marko Marko Mäkelä
                Reporter:
                elenst Elena Stepanova
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: